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

Commit

Permalink
[#128] fix parser bug which skipped bytes in long uris
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFrench committed Mar 8, 2019
1 parent 0f52e86 commit f4907ee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions parser.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <ctype.h>
Expand Down Expand Up @@ -1234,6 +1235,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 f4907ee

Please sign in to comment.