aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-08-22 14:09:13 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-08-22 14:09:13 +0000
commitc347db2e0ade83a9b2d3cc44f51bbb541b5ca6f4 (patch)
tree566e037a0ed2959440b78bf01cbfdfa067777f58 /tests
parent232a4553b8015fff36e7b76a292d64b68486c386 (diff)
added a size > buffer size check to make it easier to track this in the
future
Diffstat (limited to 'tests')
-rw-r--r--tests/server/sockfilt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c
index 1c170c767..bd54f8812 100644
--- a/tests/server/sockfilt.c
+++ b/tests/server/sockfilt.c
@@ -307,6 +307,12 @@ static int juggle(curl_socket_t *sockfdp,
}
logmsg("> %d bytes data, server => client", buffer_len);
+ if(buffer_len > (ssize_t)sizeof(buffer)) {
+ logmsg("ERROR: %d bytes of data does not fit within the %d "
+ "bytes buffer", buffer_len, sizeof(buffer));
+ return FALSE;
+ }
+
/*
* To properly support huge data chunks, we need to repeat the call
* to read() until we're done or it fails.