cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [EXAMPLE] Bug in getinmemory.c

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 10 May 2011 22:15:41 +0200 (CEST)

On Tue, 10 May 2011, Martin Möller wrote:

> "If the new size is larger, the contents of the newly allocated portion of
> the memory are undefined."

Right, and that is why the example uses memcpy() to populate the newly
allocated portion of the memory.

I see no problem with the existing code.

-- 
  / daniel.haxx.se

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-05-10