diff --git a/src/misc/pkcs12/pkcs12_kdf.c b/src/misc/pkcs12/pkcs12_kdf.c index d097e8a9f..a67b4fa88 100644 --- a/src/misc/pkcs12/pkcs12_kdf.c +++ b/src/misc/pkcs12/pkcs12_kdf.c @@ -27,7 +27,7 @@ int pkcs12_kdf( int hash_id, unsigned int tmp, i, j, n; unsigned char ch; unsigned char D[MAXBLOCKSIZE], A[MAXBLOCKSIZE], B[MAXBLOCKSIZE]; - unsigned char *I = NULL, *key = NULL; + unsigned char *I, *key; int err = CRYPT_ERROR; LTC_ARGCHK(pw != NULL); diff --git a/src/pk/rsa/rsa_import_pkcs8.c b/src/pk/rsa/rsa_import_pkcs8.c index 525e0db4f..dded69b5b 100644 --- a/src/pk/rsa/rsa_import_pkcs8.c +++ b/src/pk/rsa/rsa_import_pkcs8.c @@ -113,7 +113,7 @@ int rsa_import_pkcs8(const unsigned char *in, unsigned long inlen, if (err != CRYPT_OK) { goto LBL_ERR; } /* check alg oid */ - if ((err = pk_oid_cmp_with_asn1(rsaoid, &alg_seq[0]))) { + if ((err = pk_oid_cmp_with_asn1(rsaoid, &alg_seq[0])) != CRYPT_OK) { goto LBL_ERR; }