Detect, log and avoid storing a request with a negative size.
This commit is contained in:
parent
faaaf62655
commit
1d49c04545
@ -468,6 +468,11 @@ void storerequest(char *reqbuf, ssize_t totalsize)
|
||||
|
||||
if (totalsize == 0)
|
||||
return;
|
||||
else if (totalsize < 0) {
|
||||
logmsg("Invalid size (%d bytes) for request input. Not written to %s",
|
||||
totalsize, REQUEST_DUMP);
|
||||
return;
|
||||
}
|
||||
|
||||
do {
|
||||
dump = fopen(REQUEST_DUMP, "ab");
|
||||
|
Loading…
x
Reference in New Issue
Block a user