aboutsummaryrefslogtreecommitdiff
path: root/tests/server
diff options
context:
space:
mode:
Diffstat (limited to 'tests/server')
-rw-r--r--tests/server/sws.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/server/sws.c b/tests/server/sws.c
index 55c05b199..5598328cc 100644
--- a/tests/server/sws.c
+++ b/tests/server/sws.c
@@ -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");