]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.6' into PHP-7.0
authorChristoph M. Becker <cmbecker69@gmx.de>
Sat, 13 Aug 2016 14:22:49 +0000 (16:22 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Sat, 13 Aug 2016 14:23:15 +0000 (16:23 +0200)
1  2 
NEWS
ext/standard/image.c

diff --cc NEWS
index 420912876399118421b15286b723ff14678188bd,d91bdda54e54e08242a126901b342be17388db4b..9bea75ea297c44df26d208cc0435a1dacbe88ddd
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -21,34 -9,16 +21,35 @@@ PH
    . Fixed bug #60665 (call to empty() on NULL result using PDO::FETCH_LAZY
      returns false). (cmb)
  
 +- Session:
 +  . Fixed bug #72724 (PHP7: session-uploadprogress kills httpd). (Nikita)
 +
  - Standard:
 -  . Fixed bug #72823 (strtr out-of-bound access). (cmb)
 +  . Fixed bug #55451 (substr_compare NULL length interpreted as 0). (Lauri
 +    Kenttä)
+   . Fixed bug #72278 (getimagesize returning FALSE on valid jpg). (cmb)
  
 -18 Aug 2016, PHP 5.6.25
 +- Streams:
 +  . Fixed bug #72764 (ftps:// opendir wrapper data channel encryption fails
 +    with IIS FTP 7.5, 8.5). (vhuk)
 +
 +
 +?? ??? 2016 PHP 7.0.10
  
  - Core:
 +  . Fixed bug #72629 (Caught exception assignment to variables ignores
 +    references). (Laruence)
 +  . Fixed bug #72594 (Calling an earlier instance of an included anonymous
 +    class fatals). (Laruence)
    . Fixed bug #72581 (previous property undefined in Exception after
      deserialization). (Laruence)
 +  . Fixed bug #72496 (Cannot declare public method with signature incompatible
 +    with parent private method). (Pedro Magalhães)
    . Fixed bug #72024 (microtime() leaks memory). (maroszek at gmx dot net)
 +  . Fixed bug #71911 (Unable to set --enable-debug on building extensions by
 +    phpize on Windows). (Yuji Uchiyama)
 +  . Fixed bug causing ClosedGeneratorException being thrown into the calling
 +    code instead of the Generator yielding from. (Bob)
    . Implemented FR #72614 (Support "nmake test" on building extensions by
      phpize). (Yuji Uchiyama)
    . Fixed bug #72641 (phpize (on Windows) ignores PHP_PREFIX).
index 3e19ccaf48752b9efffdd96e62e5928a1d86cf4b,d58d543abdcae9d6c6e072768ce235e6637ae937..f39c6709795e9c1dcafef15abbe6bf20666dd66f
@@@ -380,23 -374,25 +380,25 @@@ static unsigned short php_read2(php_str
  
  /* {{{ php_next_marker
   * get next marker byte from file */
- static unsigned int php_next_marker(php_stream * stream, int last_marker, int comment_correction, int ff_read)
 -static unsigned int php_next_marker(php_stream * stream, int last_marker, int ff_read TSRMLS_DC)
++static unsigned int php_next_marker(php_stream * stream, int last_marker, int ff_read)
  {
        int a=0, marker;
  
        /* get marker byte, swallowing possible padding                           */
-       if (last_marker==M_COM && comment_correction) {
-               /* some software does not count the length bytes of COM section           */
-               /* one company doing so is very much envolved in JPEG... so we accept too */
-               /* by the way: some of those companies changed their code now...          */
-               comment_correction = 2;
-       } else {
-               last_marker = 0;
-               comment_correction = 0;
+       if (!ff_read) {
 -        size_t extraneous = 0;
++              size_t extraneous = 0;
+               while ((marker = php_stream_getc(stream)) != 0xff) {
+                       if (marker == EOF) {
+                               return M_EOI;/* we hit EOF */
 -                      }
 +      }
-       if (ff_read) {
-               a = 1; /* already read 0xff in filetype detection */
+                       extraneous++;
 -              }
++      }
+               if (extraneous) {
 -                      php_error_docref(NULL TSRMLS_CC, E_WARNING, "corrupt JPEG data: %zu extraneous bytes before marker", extraneous);
++                      php_error_docref(NULL, E_WARNING, "corrupt JPEG data: %zu extraneous bytes before marker", extraneous);
+               }
        }
+       a = 1;
        do {
                if ((marker = php_stream_getc(stream)) == EOF)
                {
@@@ -484,7 -466,7 +472,7 @@@ static struct gfxinfo *php_handle_jpeg 
        unsigned short length, ff_read=1;
  
        for (;;) {
-               marker = php_next_marker(stream, marker, 1, ff_read);
 -              marker = php_next_marker(stream, marker, ff_read TSRMLS_CC);
++              marker = php_next_marker(stream, marker, ff_read);
                ff_read = 0;
                switch (marker) {
                        case M_SOF0: