From 63e8d63943dfd3b53d37b43bb1bc8b54d303c921 Mon Sep 17 00:00:00 2001 From: kaleb-himes Date: Fri, 15 Sep 2017 10:52:33 -0600 Subject: [PATCH] Update following review --- wolfcrypt/src/hmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/src/hmac.c b/wolfcrypt/src/hmac.c index b46db6a3c..8985a25bd 100755 --- a/wolfcrypt/src/hmac.c +++ b/wolfcrypt/src/hmac.c @@ -54,7 +54,7 @@ } int wc_HmacUpdate(Hmac* hmac, const byte* in, word32 sz) { - if (hmac == NULL) { + if (hmac == NULL || (in == NULL && sz > 0)) { return BAD_FUNC_ARG; } @@ -523,7 +523,7 @@ int wc_HmacUpdate(Hmac* hmac, const byte* msg, word32 length) { int ret = 0; - if (hmac == NULL) { + if (hmac == NULL || (msg == NULL && length > 0)) { return BAD_FUNC_ARG; }