]> granicus.if.org Git - php/commitdiff
MFH: - Fixed bug #31413 (curl POSTFIELDS crashes on 64-bit platforms).
authorJoe Orton <jorton@php.net>
Thu, 6 Jan 2005 10:34:03 +0000 (10:34 +0000)
committerJoe Orton <jorton@php.net>
Thu, 6 Jan 2005 10:34:03 +0000 (10:34 +0000)
NEWS
ext/curl/curl.c

diff --git a/NEWS b/NEWS
index 5785d11e542f614caf5821fefd51e52840f637e5..891760ca8a0798619057069767a762e3413797af 100644 (file)
--- 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)
index b0330c267875251ddee188a8f30789e35ad66c64..d17bfa541a169413460a174b10154bbd0c9fecd0 100644 (file)
@@ -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);
                                        }
                                }