Add null pointer checks to pkcs5_pbkdf2().

This commit is contained in:
Andrej Kacian 2018-08-22 15:00:58 +02:00
parent 3271b0bc8e
commit 4d7a7a5037

View file

@ -93,6 +93,8 @@ pkcs5_pbkdf2(const gchar *pass, size_t pass_len, const guchar *salt,
guint count;
size_t r;
if (pass == NULL || salt == NULL || key == NULL)
return -1;
if (rounds < 1 || key_len == 0)
return -1;
if (salt_len == 0 || salt_len > SIZE_MAX - 4)