Skip to content

Commit

Permalink
Merge pull request allinurl#2180 from cgzones/asan
Browse files Browse the repository at this point in the history
Avoid buffer underflow
  • Loading branch information
allinurl authored Sep 11, 2021
2 parents 1ce51ed + 7ac10de commit 4be45b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ verify_static_content (const char *req) {
continue;
}

if (!strncasecmp (nul - elen, ext, elen))
if (nul - req > elen && !strncasecmp (nul - elen, ext, elen))
return 1;
}

Expand Down

0 comments on commit 4be45b4

Please sign in to comment.