Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
[#128] fix other (potential) problems related #128
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFrench committed Mar 9, 2019
1 parent f4907ee commit 00ccb5c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,10 @@ htparser_run(htparser * p, htparse_hooks * hooks, const char * data, size_t len)
HTP_SET_BUF(ch);
}

if (evhtp_unlikely(i + 1 >= len)) {
break;
}

ch = data[++i];
} while (i < len);

Expand Down Expand Up @@ -1319,6 +1323,10 @@ htparser_run(htparser * p, htparse_hooks * hooks, const char * data, size_t len)
break;
}

if (evhtp_unlikely(i + 1 >= len)) {
break;
}

ch = data[++i];
} while (i < len);

Expand Down Expand Up @@ -1734,6 +1742,10 @@ htparser_run(htparser * p, htparse_hooks * hooks, const char * data, size_t len)
break;
}

if (evhtp_unlikely(i + 1 >= len)) {
break;
}

ch = data[++i];
} while (i < len);

Expand Down

0 comments on commit 00ccb5c

Please sign in to comment.