summaryrefslogtreecommitdiff
path: root/lib/socks.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-01-19 17:02:21 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-01-19 17:02:21 +0100
commit0f34102c926d307023a15778a36ac8163a9e02fe (patch)
tree5b20bcfb6e4c2707f7be35dbff772983010dbc39 /lib/socks.c
parent72fad34b2e32f464595b25d237aefb49572c3eb6 (diff)
downloadcurl-bagder/socks-buffer.tar.gz
fixup assert that the minimum buffer size is larger enough for SOCKSbagder/socks-buffer
Diffstat (limited to 'lib/socks.c')
-rw-r--r--lib/socks.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/socks.c b/lib/socks.c
index 64ebbec74..9252e2c17 100644
--- a/lib/socks.c
+++ b/lib/socks.c
@@ -203,6 +203,9 @@ CURLproxycode Curl_SOCKS4(const char *proxy_user,
ssize_t actualread;
ssize_t written;
+ /* make sure that the buffer is at least 600 bytes */
+ DEBUGASSERT(READBUFFER_MIN >= 600);
+
if(!SOCKS_STATE(sx->state) && !*done)
sxstate(data, CONNECT_SOCKS_INIT);