]> granicus.if.org Git - curl/commitdiff
CURLOPT_BUFFERSIZE must not be smaller than 0 (zero) as that is impossible
authorDaniel Stenberg <daniel@haxx.se>
Thu, 28 Aug 2003 11:28:55 +0000 (11:28 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 28 Aug 2003 11:28:55 +0000 (11:28 +0000)
for us to deal with

lib/url.c

index 3c5240b780273a5b9b12453f43a1c728cf3dff1c..2b8a09794dd046944fd3c0d9347b1fdb2493fb41 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -1177,7 +1177,8 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
      */
     data->set.buffer_size = va_arg(param, long);
 
-    if(data->set.buffer_size> (BUFSIZE -1 ))
+    if((data->set.buffer_size> (BUFSIZE -1 )) ||
+       (data->set.buffer_size < 1))
       data->set.buffer_size = 0; /* huge internal default */
 
     break;