curl-library
Re: libcurl appends weird junk to downloaded file
From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Sun, 19 Jun 2005 00:45:19 +0200 (CEST)
Date: Sun, 19 Jun 2005 00:45:19 +0200 (CEST)
On Sat, 18 Jun 2005, kryptech wrote:
> static size_t write_data(void *ptr, size_t size, size_t nmemb, void
> *data)
> {
> int bytesize = size * nmemb;
> FILE *fp = (FILE *) data;
>
> fprintf(fp, "%s", (char*) ptr);
Don't assume that you get the data passed to the write callback zero
terminated.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2005-06-19