From: Joe Orton Date: Thu, 6 Jan 2005 10:34:03 +0000 (+0000) Subject: MFH: - Fixed bug #31413 (curl POSTFIELDS crashes on 64-bit platforms). X-Git-Tag: php-4.3.11RC1~196 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc95def9ca488bf743de10b5eaae78ee637a8a1f;p=php MFH: - Fixed bug #31413 (curl POSTFIELDS crashes on 64-bit platforms). --- diff --git a/NEWS b/NEWS index 5785d11e54..891760ca8a 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ PHP 4 NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, Version 4.3.11 - Added Oracle Instant Client support. (cjbj at hotmail dot com, Tony) +- Fixed bug #31413 (curl POSTFIELDS crashes on 64-bit platforms). (Joe) - Fixed bug #31396 (compile fails with gd 2.0.33 without freetype). (Jani) - Fixed bug #31371 (highlight_file() trims new line after heredoc). (Ilia) - Fixed bug #31270 (missing safe_mode/open_basedir check in swf_openfile()). (Ilia) diff --git a/ext/curl/curl.c b/ext/curl/curl.c index b0330c2678..d17bfa541a 100644 --- a/ext/curl/curl.c +++ b/ext/curl/curl.c @@ -955,16 +955,16 @@ PHP_FUNCTION(curl_setopt) if (*postval == '@') { error = curl_formadd(&first, &last, CURLFORM_COPYNAME, string_key, - CURLFORM_NAMELENGTH, string_key_len - 1, + CURLFORM_NAMELENGTH, (long)string_key_len - 1, CURLFORM_FILE, ++postval, CURLFORM_END); } else { error = curl_formadd(&first, &last, CURLFORM_COPYNAME, string_key, - CURLFORM_NAMELENGTH, string_key_len - 1, + CURLFORM_NAMELENGTH, (long)string_key_len - 1, CURLFORM_COPYCONTENTS, postval, - CURLFORM_CONTENTSLENGTH, Z_STRLEN_PP(current), + CURLFORM_CONTENTSLENGTH, (long)Z_STRLEN_PP(current), CURLFORM_END); } }