Skip to content

Commit

Permalink
Merge pull request #166 from flaviojs/fix-out-of-bounds-read-hex_decode
Browse files Browse the repository at this point in the history
Fix out-of-bounds read in hex_decode
  • Loading branch information
grossmj authored Mar 12, 2024
2 parents 4084412 + 1c98f20 commit 1588cdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ int hex_decode(unsigned char *out,const unsigned char *in,int maxlen)
int empty = TRUE;

for(;len < maxlen;) {
if (*in > sizeof(hexval) || hexval[*in] == BAD)
if (*in >= sizeof(hexval) || hexval[*in] == BAD)
break;

if (empty) {
Expand Down

0 comments on commit 1588cdf

Please sign in to comment.