2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-29 13:28:10 +00:00

Fix NULL deref if base64_decode returns -1.

This commit is contained in:
Todd C. Miller 2014-07-22 14:53:15 -06:00
parent 47835ff289
commit 28f6ee5f9e

View File

@ -1403,9 +1403,10 @@ sudo_ldap_decode_secret(const char *secret)
if (len == (size_t)-1) {
free(result);
result = NULL;
}
} else {
result[len] = '\0';
}
}
debug_return_str((char *)result);
}