From: Stanislav Malyshev Date: Tue, 12 May 2015 21:26:06 +0000 (-0700) Subject: Merge branch 'PHP-5.5' into PHP-5.6 X-Git-Tag: php-5.6.10RC1~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=587ddf6ddccd707d67d48dccd4f4ca0a90224ac9;p=php Merge branch 'PHP-5.5' into PHP-5.6 * PHP-5.5: fix format update NEWS Add test for bug #69522 Update tests Fix bug #69522 - do not allow int overflow Forgot test file Fix bug #69403 and other int overflows Fixed bug #69418 - more s->p fixes for filenames Fixed bug #69364 - use smart_str to assemble strings Fix bug #69453 - don't try to cut empty string Fix bug #69545 - avoid overflow when reading list Conflicts: ext/standard/pack.c --- 587ddf6ddccd707d67d48dccd4f4ca0a90224ac9 diff --cc ext/standard/dir.c index 960fc4a7ba,ddf884f150..dc3b4cad39 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@@ -515,13 -515,13 +515,13 @@@ no_results continue; } } - /* we need to do this everytime since GLOB_ONLYDIR does not guarantee that + /* we need to do this every time since GLOB_ONLYDIR does not guarantee that * all directories will be filtered. GNU libc documentation states the - * following: - * If the information about the type of the file is easily available - * non-directories will be rejected but no extra work will be done to - * determine the information for each file. I.e., the caller must still be - * able to filter directories out. + * following: + * If the information about the type of the file is easily available + * non-directories will be rejected but no extra work will be done to + * determine the information for each file. I.e., the caller must still be + * able to filter directories out. */ if (flags & GLOB_ONLYDIR) { struct stat s; diff --cc ext/standard/pack.c index a40a964b07,69fa675193..457392bd84 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@@ -206,31 -199,20 +206,31 @@@ PHP_FUNCTION(pack break; /* Use as many args as specified */ - case 'c': - case 'C': - case 's': - case 'S': - case 'i': + case 'q': + case 'Q': + case 'J': + case 'P': +#if SIZEOF_LONG < 8 + efree(argv); + efree(formatcodes); + efree(formatargs); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "64-bit format codes are not available for 32-bit versions of PHP"); + RETURN_FALSE; +#endif + case 'c': + case 'C': + case 's': + case 'S': + case 'i': case 'I': - case 'l': - case 'L': - case 'n': - case 'N': - case 'v': + case 'l': + case 'L': + case 'n': + case 'N': + case 'v': case 'V': - case 'f': - case 'd': + case 'f': + case 'd': if (arg < 0) { arg = num_args - currentarg; } diff --cc main/rfc1867.c index 919768e171,86101dc817..ca8f28b553 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@@ -33,12 -33,8 +33,13 @@@ #include "php_variables.h" #include "rfc1867.h" #include "ext/standard/php_string.h" + #include "ext/standard/php_smart_str.h" +#if defined(PHP_WIN32) && !defined(HAVE_ATOLL) +# define atoll(s) _atoi64(s) +# define HAVE_ATOLL 1 +#endif + #define DEBUG_FILE_UPLOAD ZEND_DEBUG static int dummy_encoding_translation(TSRMLS_D)