]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.5' into PHP-5.6
authorStanislav Malyshev <stas@php.net>
Tue, 12 May 2015 21:26:06 +0000 (14:26 -0700)
committerStanislav Malyshev <stas@php.net>
Tue, 12 May 2015 21:26:06 +0000 (14:26 -0700)
* 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

1  2 
Zend/zend_operators.c
ext/phar/tar.c
ext/standard/basic_functions.c
ext/standard/dir.c
ext/standard/file.c
ext/standard/pack.c
ext/standard/string.c
main/rfc1867.c

Simple merge
diff --cc ext/phar/tar.c
Simple merge
Simple merge
index 960fc4a7bad63b9a5d57828fb5512f634c93d617,ddf884f150e4479ac046c72cb72d09921a37c733..dc3b4cad396984d84ba5cf631645b4a561065054
@@@ -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;
Simple merge
index a40a964b078cc7901e9b8049471be9b354c3bc85,69fa675193e028ceae36dcbf91c9e6a2444f5167..457392bd84550f71ce1c8ff6329523e16743896d
@@@ -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;
                                }
Simple merge
diff --cc main/rfc1867.c
index 919768e17186bd91003e5192b8ba44f2d07e3cfb,86101dc817daa1cda937e0410e454152f3ac1125..ca8f28b5534621f342d754dc17c4c169b78800a7
  #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)