ell/pkcs5.c: In function ‘pkcs12_pbkdf’:
ell/pkcs5.c:240:3: error: ‘bmpstring’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
240 | explicit_bzero(bmpstring, passwd_len);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
ell/pkcs5.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ell/pkcs5.c b/ell/pkcs5.c
index 25bf431..47d66ae 100644
--- a/ell/pkcs5.c
+++ b/ell/pkcs5.c
@@ -190,7 +190,7 @@ uint8_t *pkcs12_pbkdf(const char *password, const struct pkcs12_hash
*hash,
{
/* All lengths in bytes instead of bits */
size_t passwd_len = password ? 2 * strlen(password) + 2 : 0;
- uint8_t *bmpstring;
+ uint8_t *bmpstring = NULL;
/* Documented as v(ceiling(s/v)), usually will just equal v */
unsigned int s_len = (salt_len + hash->v - 1) & ~(hash->v - 1);
/* Documented as p(ceiling(s/p)), usually will just equal v */
--
2.25.4
Show replies by date