Skip to content

Commit 0507f33

Browse files
authored
Merge pull request #304 from wolfSSL/Zero-check
Fix off-by-one in wh_Utils_memeqzero that skipped checking buffer[0]
2 parents dba55a8 + 0552824 commit 0507f33

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wh_utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ uint32_t wh_Utils_ntohl(uint32_t networklong) {
8383

8484
int wh_Utils_memeqzero(uint8_t* buffer, uint32_t size)
8585
{
86-
while (size > 1) {
86+
while (size > 0) {
8787
size--;
8888
if (buffer[size] != 0)
8989
return 0;

0 commit comments

Comments
 (0)