com php-src: Merge branch 'PHP-5.6' into PHP-7.0: NEWS ext/standard/image.c

From: Date: Sat, 13 Aug 2016 14:23:15 +0000
Subject: com php-src: Merge branch 'PHP-5.6' into PHP-7.0: NEWS ext/standard/image.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-93768@lists.php.net to get a copy of this message
Commit: 33508a3d4730f8d15d37e2e5c4c2b18a545fd989 Author: Christoph M. Becker <cmbecker69@gmx.de> Sat, 13 Aug 2016 16:22:49 +0200 Parents: a93c62aafa90ba1a67f111929f3c07401f193df6 82df4e263886a0da21a00c98189649287666ba5c Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=33508a3d4730f8d15d37e2e5c4c2b18a545fd989 Log: Merge branch 'PHP-5.6' into PHP-7.0 Changed paths: MM NEWS MM ext/standard/image.c Diff: diff --cc NEWS index 4209128,d91bdda..9bea75e --- a/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). diff --cc ext/standard/image.c index 3e19cca,d58d543..f39c670 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@@ -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:

« previous php.cvs (#93768) next »