cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Patrick: Diff for /curl/lib/url.c between version 1.656 and 1.657

From: Patrick Monnerat <Patrick.Monnerat_at_datasphere.ch>
Date: Wed, 17 Oct 2007 21:57:59 +0200

 
> If postfieldsize is zero also return CURLE_OUT_OF_MEMORY.

I think it should'nt: For example, you can use a POST with no data
because the server does not allow you to issue method GET.
Moreover this can be achieved with postfieldsize == -1 and a
null-terminated string, or using the CURLOPT_POSTFIELDS, so I do not
think it should be rejected here.

In addition, the overflow test is mainly to protect passing a wrong
number to malloc(). A malloc(0) call is generally successful, but if not
(this case is libc-dependent), this is of no matter to delay the error
detection to after the malloc() call.
Received on 2007-10-17