From fa162e8febe054b04130355ef3a917201820c688 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 28 Aug 2003 11:28:55 +0000 Subject: [PATCH] CURLOPT_BUFFERSIZE must not be smaller than 0 (zero) as that is impossible for us to deal with --- lib/url.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/url.c b/lib/url.c index 3c5240b78..2b8a09794 100644 --- 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;