diff options
Diffstat (limited to 'crypto/hmac-nettle.c')
-rw-r--r-- | crypto/hmac-nettle.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/hmac-nettle.c b/crypto/hmac-nettle.c index dd5b2ab..2cff793 100644 --- a/crypto/hmac-nettle.c +++ b/crypto/hmac-nettle.c @@ -164,7 +164,9 @@ qcrypto_nettle_hmac_bytesv(QCryptoHmac *hmac, } } - if (*resultlen == 0) { + if (resultlen == NULL) { + return 0; + } else if (*resultlen == 0) { *resultlen = qcrypto_hmac_alg_map[hmac->alg].len; *result = g_new0(uint8_t, *resultlen); } else if (*resultlen != qcrypto_hmac_alg_map[hmac->alg].len) { |