Commit 12897464 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Tighten asserts related to pipelined rxbuf.

parent bd0ce368
......@@ -192,6 +192,8 @@ HTC_RxInit(struct http_conn *htc, struct ws *ws)
htc->rxbuf_b = ws->f;
htc->rxbuf_e = ws->f;
if (htc->pipeline_b != NULL) {
AN(htc->pipeline_e);
assert(WS_Inside(ws, htc->pipeline_b, htc->pipeline_e));
l = htc->pipeline_e - htc->pipeline_b;
assert(l > 0);
assert(l <= ws->r - htc->rxbuf_b);
......@@ -210,12 +212,12 @@ HTC_RxPipeline(struct http_conn *htc, void *p)
if (p == NULL || (char*)p == htc->rxbuf_e) {
htc->pipeline_b = NULL;
htc->pipeline_e = NULL;
return;
} else {
assert((char*)p >= htc->rxbuf_b);
assert((char*)p < htc->rxbuf_e);
htc->pipeline_b = p;
htc->pipeline_e = htc->rxbuf_e;
}
assert((char*)p >= htc->rxbuf_b);
assert((char*)p < htc->rxbuf_e);
htc->pipeline_b = p;
htc->pipeline_e = htc->rxbuf_e;
}
/*----------------------------------------------------------------------
......
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