curl-library
Re: Patrick: Diff for /curl/lib/url.c between version 1.656 and 1.657
Date: Fri, 19 Oct 2007 14:49:52 +0200
2007/10/18, Patrick Monnerat wrote:
> > Since you exactly know which should be the behaviour of option
> > CURLOPT_COPYPOSTFIELDS even with a zero postfieldsize and its
> > implications. Couldn't you change the logic to avoid the zero size
> > malloc ?
>
> Done: http://cool.haxx.se/cvs.cgi/curl/lib/url.c.diff?r1=1.663&r2=1.664
Patrick, it certainly _avoids_ the zero size malloc.
But I think that this 1 byte malloc isn't the long term proper fix. I
don't have now the time needed to dive into all this
CURLOPT_POSTFIELDS/CURLOPT_COPYPOSTFIELDS and
CURLOPT_POSTFIELDSIZE/CURLOPT_POSTFIELDSIZE_LARGE code.
If data->set.postfieldsize being -1, 0 or >0 is not enough to
differentiate the COPYPOSTFIELDS mode, maybe some check should be
changed or some 'copypostfields_mode' introduced. Just guessing.
-- -=[Yang]=-Received on 2007-10-19