curl-library
RE: Windows build failures!
Date: Sun, 29 Dec 2013 23:08:27 +0000
On Sun, 29 Dec 2013, Daniel Stenberg wrote:
> > As always any feedback is welcome.
>
> Are you really sure of the memcmp() uses? Shouldn't they
> rather be strncmp() to better work with really short format
> strings as you otherwise risk reading beyond the buffer
> boundary?
Cheers - I'm always forgetting out that sort of thing, You would think I
would know better at my age ;-)
I was just about to push my fix, when I got thinking as to why SMTP's MAIL
SIZE wasn't failing and found that it uses FORMAT_OFF_T which is defined in
curl_setup.h with the following comment:
/*
* Set up internal curl_off_t formatting string directives for
* exclusive use with libcurl's internal *printf functions.
*/
Rather than have two separate defines for printf()ing a curl_off_t I would
recommend that we try and be consistent and use one. I quick grep of the
source code reveals that FORMAT_OFF_T is used far more (x 83 times) than
CURL_FORMAT_CURL_OFF_T (x 3).
I think we should use FORMAT_OFF_T rather than CURL_FORMAT_CURL_OFF_T, set
FORMAT_OFF_T to be CURL_FORMAT_CURL_OFF_T rather than a separate value and
optionally move the definition of FORMAT_OFF_T to curlbuild.h given that
curl_setup.h includes curlbuild.h.
Kind Regards
Steve
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-12-30