mirror of
https://github.com/curl/curl.git
synced 2026-07-23 21:17:17 +03:00
Detect, log and avoid storing a request with a negative size.
This commit is contained in:
parent
faaaf62655
commit
1d49c04545
1 changed files with 5 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue