diff options
Diffstat (limited to 'crypto/hmac-gnutls.c')
-rw-r--r-- | crypto/hmac-gnutls.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/hmac-gnutls.c b/crypto/hmac-gnutls.c index 8229955..3c5bcbe 100644 --- a/crypto/hmac-gnutls.c +++ b/crypto/hmac-gnutls.c @@ -119,7 +119,9 @@ qcrypto_gnutls_hmac_bytesv(QCryptoHmac *hmac, return -1; } - if (*resultlen == 0) { + if (resultlen == NULL) { + return 0; + } else if (*resultlen == 0) { *resultlen = ret; *result = g_new0(uint8_t, *resultlen); } else if (*resultlen != ret) { |