cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: zero-length files

From: Michal Marek <mmarek_at_suse.cz>
Date: Thu, 13 Nov 2008 09:23:22 +0100

Daniel Stenberg napsal(a):
> On Wed, 12 Nov 2008, Michal Marek wrote:
>> Also this looks like a bug in Curl_client_write():
>>
>> if(data->req.keepon & KEEP_READ_PAUSE) {
>> ...
>> newlen = len + data->state.tempwritesize;
>> ...
>> memcpy(newptr + data->state.tempwritesize, ptr, len);
>> ...
>> }
>>
>> if(0 == len)
>> len = strlen(ptr);
>>
>> The check for 0 == len should IMO be done first, otherwise we might lose
>> data.
>
> I fully agree. Will you do the commit?

OK, fixed this one. Let's see what we can do with the zero-byte stuff...

Michal
Received on 2008-11-13