mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-29 21:38:05 +00:00
Fix NULL deref if base64_decode returns -1.
This commit is contained in:
parent
47835ff289
commit
28f6ee5f9e
@ -1403,8 +1403,9 @@ 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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user