From 5d2f50294ddc0a6689ef5c30cc890f008a6ee173 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 6 Sep 2009 14:29:53 -0700 Subject: http: extra assertion when advancing p manually Just in case, it'll be easier to track down if bugs pop up. --- ext/unicorn_http/unicorn_http.rl | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/unicorn_http/unicorn_http.rl b/ext/unicorn_http/unicorn_http.rl index f8649fe..1f22dfb 100644 --- a/ext/unicorn_http/unicorn_http.rl +++ b/ext/unicorn_http/unicorn_http.rl @@ -302,6 +302,7 @@ static void write_value(VALUE req, struct http_parser *hp, cs = http_parser_first_final; } ++p; + assert(p <= pe && "buffer overflow after chunked body"); goto post_exec; } -- cgit v1.2.3-24-ge0c7