Fixed xpath crashes discovered by fuzzing
Added fuzz code for xpath Test: added negative xpath tests
This commit is contained in:
parent
05cdbf5c4f
commit
779fcf5458
16 changed files with 197 additions and 29 deletions
|
|
@ -367,8 +367,16 @@ main(int argc,
|
|||
}
|
||||
else
|
||||
x = x0;
|
||||
#if 0 // filter syntax errors
|
||||
{
|
||||
xpath_tree *xptree = NULL;
|
||||
if (xpath_parse(xpath, &xptree) < 0)
|
||||
goto ok; // Parse errors returns OK
|
||||
}
|
||||
#endif
|
||||
if (xpath_vec_ctx(x, nsc, xpath, 0, &xc) < 0)
|
||||
return -1;
|
||||
|
||||
/* Check inverse, eg XML back to xpath and compare with original, only if nodes */
|
||||
if (xpath_inverse && xc->xc_type == XT_NODESET){
|
||||
cxobj *xi;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue