2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-30 05:48:18 +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) { if (len == (size_t)-1) {
free(result); free(result);
result = NULL; result = NULL;
} } else {
result[len] = '\0'; result[len] = '\0';
} }
}
debug_return_str((char *)result); debug_return_str((char *)result);
} }