commit bf1a86dad0d53887db2b4bcb4f5a9dbd1651f607
parent fe0f62b1449558adcccacfa83a3cca96735f5599
Author: Andrej Kacian <ticho@claws-mail.org>
Date: Wed, 22 Aug 2018 15:00:58 +0200
Add null pointer checks to pkcs5_pbkdf2().
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/common/pkcs5_pbkdf2.c b/src/common/pkcs5_pbkdf2.c
@@ -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)