cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: OS400 ftp server related problem

From: Patrick Monnerat <Patrick.Monnerat_at_datasphere.ch>
Date: Tue, 18 Aug 2009 18:46:26 +0200

Daniel Stenberg wrote:

> I only spotted one nit: it calls malloc() and assumes it'll always
work so it will quickly fail a "torture test".

Not true, unless I missed something:

       char *os = malloc(nread+1);
       char *store=os;
       char *ptr=&data->state.buffer[4];

       if(!os)
         return CURLE_OUT_OF_MEMORY;

> Also, it would be neat if you could write up a test case that verifies
this functionality to prevent us from accidentally breaking it later
on...

Will try to write one or two of them, although I'm not a "test language"
guru...
Received on 2009-08-18