curl-library
Re: Potential integer overflow with write callback
From: <richardcavell_at_mail.com>
Date: Sun, 27 Mar 2011 04:55:45 -0400
Date: Sun, 27 Mar 2011 04:55:45 -0400
> size_t is guaranteed only to be at least 16 bits according to the
standard
> Have you ever seen libcurl run on a system with size_t being 16 bit?
Well, no. Still, some of those systems are pretty obscure.
This is what you need:
if (CURL_MAX_WRITE_SIZE > (size_t) -1)
{
// potential buffer overflow
}
Richard
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-03-27