Commit 9d1b135d authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Fixups from 'Fix PROXY and HTTP/1 proto dissectors'

Remove old and now invalid assert.

Change order of evaluation in if-statement to make sure we don't step
outside rxbuf_e.
parent 09a75daa
......@@ -76,7 +76,7 @@ vpx_proto1(const struct worker *wrk, const struct req *req)
*q++ = '\0';
/* Nuke the CRLF */
if (*q != '\n' || q == req->htc->rxbuf_e)
if (q == req->htc->rxbuf_e || *q != '\n')
return (-1);
*q++ = '\0';
......@@ -515,7 +515,6 @@ vpx_complete(struct http_conn *htc)
if (j == 0)
return (HTC_S_JUNK);
if (j == 1 && i == sizeof vpx1_sig) {
assert (htc->rxbuf_e < htc->ws->r);
q = memchr(p + i, '\n', htc->rxbuf_e - (p + i));
if (q != NULL && (q - htc->rxbuf_b) > 107)
return (HTC_S_OVERFLOW);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment