Update following review

This commit is contained in:
kaleb-himes
2017-09-15 10:52:33 -06:00
parent 1f7d73f626
commit 63e8d63943

View File

@ -54,7 +54,7 @@
} }
int wc_HmacUpdate(Hmac* hmac, const byte* in, word32 sz) int wc_HmacUpdate(Hmac* hmac, const byte* in, word32 sz)
{ {
if (hmac == NULL) { if (hmac == NULL || (in == NULL && sz > 0)) {
return BAD_FUNC_ARG; return BAD_FUNC_ARG;
} }
@ -523,7 +523,7 @@ int wc_HmacUpdate(Hmac* hmac, const byte* msg, word32 length)
{ {
int ret = 0; int ret = 0;
if (hmac == NULL) { if (hmac == NULL || (msg == NULL && length > 0)) {
return BAD_FUNC_ARG; return BAD_FUNC_ARG;
} }