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
|
|
@ -351,10 +351,11 @@ api_http_data_file(clicon_handle h,
|
|||
clicon_err(OE_UNIX, errno, "malloc");
|
||||
goto done;
|
||||
}
|
||||
if ((sz = fread(buf, fsize, 1, f)) < 0){
|
||||
if ((ret = fread(buf, fsize, 1, f)) < 0){
|
||||
clicon_err(OE_UNIX, errno, "fread");
|
||||
goto done;
|
||||
}
|
||||
sz = (size_t)ret;
|
||||
if (sz != 1){
|
||||
clicon_debug(1, "%s Error fread(%s) sz:%zu", __FUNCTION__, filename, sz);
|
||||
if (api_http_data_err(h, req, 500) < 0) /* Internal error? */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue