talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 4d7a7a503767f22270d87846a20eb3e1bde4647e
parent 3271b0bc8edcf49264abe4f60f87977561e238b4
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Wed, 22 Aug 2018 15:00:58 +0200

Add null pointer checks to pkcs5_pbkdf2().

Diffstat:
Msrc/common/pkcs5_pbkdf2.c | 2++
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)