Skip to content

Commit

Permalink
Check length of memcmp
Browse files Browse the repository at this point in the history
  • Loading branch information
bel2125 committed Jun 16, 2018
1 parent 9fc1e25 commit 8fd069f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/civetweb.c
Original file line number Diff line number Diff line change
Expand Up @@ -11611,10 +11611,10 @@ send_ssi_file(struct mg_connection *conn,
/* Handle SSI tag */
buf[len] = 0;

if (!memcmp(buf + 5, "include", 7)) {
if ((len > 12) && !memcmp(buf + 5, "include", 7)) {
do_ssi_include(conn, path, buf + 12, include_level + 1);
#if !defined(NO_POPEN)
} else if (!memcmp(buf + 5, "exec", 4)) {
} else if ((len > 9) && !memcmp(buf + 5, "exec", 4)) {
do_ssi_exec(conn, buf + 9);
#endif /* !NO_POPEN */
} else {
Expand Down

0 comments on commit 8fd069f

Please sign in to comment.