Commit 9acb2283 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Use esi_syntax bit 0x8 to control input block-length fuzzing for debugging

purposes.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5747 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 1450d8a5
......@@ -890,19 +890,17 @@ vfp_esi_bytes_uu(struct sess *sp, struct http_conn *htc, size_t bytes)
if (vep->hack_p == NULL)
vep->hack_p = (const char *)st->ptr + st->len;
vep->ver_p = (const char *)st->ptr + st->len;
#if 0
{
ssize_t d;
for (l = 0; l < w; l += d) {
d = 1;
if (l + d >= w)
d = 1;
vep_parse(vep, (const char *)st->ptr + st->len + l, d);
}
}
#else
vep_parse(vep, (const char *)st->ptr + st->len, w);
#endif
if (params->esi_syntax & 0x8) {
ssize_t d;
for (l = 0; l < w; l += d) {
d = (random() & 3) + 1;
if (l + d >= w)
d = 1;
vep_parse(vep,
(const char *)st->ptr + st->len + l, d);
}
} else
vep_parse(vep, (const char *)st->ptr + st->len, w);
st->len += w;
sp->obj->len += w;
if (st->len == st->space) {
......
......@@ -643,6 +643,7 @@ static const struct parspec input_parspec[] = {
" 0x00000001 - Don't check if it looks like XML\n"
" 0x00000002 - Ignore non-esi elements\n"
" 0x00000004 - Emit parsing debug records\n"
" 0x00000008 - Force-dplit parser input (debugging)\n"
"Use 0x notation and do the bitor in your head :-)\n",
0,
"0", "bitmap" },
......
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