Commit 02609b8e authored by Pål Hermunn Johansen's avatar Pål Hermunn Johansen

Release memory instead of crashing on malformed ESI

When an ESI tag contains an unterminated quote or misses its ending
'>', we release the relevant buffers instead of crashing.

Fixes: #1904
parent 9f933fd2
......@@ -1080,8 +1080,11 @@ VEP_Finish(struct vep_state *vep)
CHECK_OBJ_NOTNULL(vep, VEP_MAGIC);
AZ(vep->include_src);
AZ(vep->attr_vsb);
if (vep->include_src)
VSB_destroy(&vep->include_src);
if (vep->attr_vsb)
VSB_destroy(&vep->attr_vsb);
if (vep->o_pending)
vep_mark_common(vep, vep->ver_p, vep->last_mark);
if (vep->o_wait > 0) {
......
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