com php-src: Merge branch 'PHP-5.5' into PHP-5.6: Zend/zend_o perators.c ext/phar/tar.c ext/standard/basic_function s.c ext/standard/dir.c
ext/standard/file.c ext/stan dard/pack.c ext/standard/string.c main/rfc1867 .c
| From: | Stanislav Malyshev | Date: | Tue, 12 May 2015 21:26:06 +0000 |
| Subject: | com php-src: Merge branch 'PHP-5.5' into PHP-5.6: Zend/zend_o perators.c ext/phar/tar.c ext/standard/basic_function s.c ext/standard/dir.c ext/standard/file.c ext/stan dard/pack.c ext/standard/string.c main/rfc1867 .c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-86713@lists.php.net to get a copy of this message | ||
Commit: 587ddf6ddccd707d67d48dccd4f4ca0a90224ac9
Author: Stanislav Malyshev <stas@php.net> Tue, 12 May 2015 14:26:06 -0700
Parents: adbb301a70e16ada22f14a7e623b73d84580f12d c08f9c2c786b0f7cbb401c18f6634cb5773f5baf
Branches: PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=587ddf6ddccd707d67d48dccd4f4ca0a90224ac9
Log:
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
Bugs:
https://bugs.php.net/69522
https://bugs.php.net/69403
https://bugs.php.net/69418
https://bugs.php.net/69364
https://bugs.php.net/69453
https://bugs.php.net/69545
Changed paths:
MM Zend/zend_operators.c
MM ext/phar/tar.c
MM ext/standard/basic_functions.c
MM ext/standard/dir.c
MM ext/standard/file.c
MM ext/standard/pack.c
MM ext/standard/string.c
MM main/rfc1867.c
Diff:
diff --cc ext/standard/dir.c
index 960fc4a,ddf884f..dc3b4ca
--- 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 a40a964,69fa675..457392b
--- 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 919768e,86101dc..ca8f28b
--- 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)