Yasuo Ohgaki [Wed, 10 Aug 2016 00:39:17 +0000 (09:39 +0900)]
Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src: (1423 commits)
Add NEWS
Fix ASSERT logic
Bugfix 72791: fix memory leak in PDO persistent connections
Don't copy mime types in CLI server
Class constant visibility modifiers are now supported
Remove obsolete Id tags
Bump version in OCI8 test
Update NEWS
Fixed bug #72788 (Invalid memory access when using persistent PDO connection)
Remove typo'd commit
Fix bug 72788: Invalid memory access when database_object_handle is undefined. Also fix memory leak in dbh_free when using persistent PDO connections.
Swap min/max if min > max
Allow min > max for mt_rand(). Bug #72784
Replace dead branch with ZEND_ASSERT()
Fix array_column() packed hash initialization
Add test for bug #69107: finfo no longer detects PHP files
check malloc result
Implement #38992: invoke() and invokeArgs() static method calls should match
Fix bug #55451
Fix stream_socket_enable_crypto() test
...
Xinchen Hui [Tue, 9 Aug 2016 03:33:38 +0000 (11:33 +0800)]
Merge branch 'PHP-7.1'
* PHP-7.1:
Update NEWS
Fixed bug #72788 (Invalid memory access when using persistent PDO connection)
Remove typo'd commit
Fix bug 72788: Invalid memory access when database_object_handle is undefined. Also fix memory leak in dbh_free when using persistent PDO connections.
Xinchen Hui [Tue, 9 Aug 2016 03:32:34 +0000 (11:32 +0800)]
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
Fixed bug #72788 (Invalid memory access when using persistent PDO connection)
Remove typo'd commit
Fix bug 72788: Invalid memory access when database_object_handle is undefined. Also fix memory leak in dbh_free when using persistent PDO connections.
Xinchen Hui [Tue, 9 Aug 2016 03:25:32 +0000 (11:25 +0800)]
Merge branch 'bug72788' of https://github.com/keyurdg/php-src into PHP-7.0
* 'bug72788' of https://github.com/keyurdg/php-src:
Remove typo'd commit
Fix bug 72788: Invalid memory access when database_object_handle is undefined. Also fix memory leak in dbh_free when using persistent PDO connections.
Implement #38992: invoke() and invokeArgs() static method calls should match
We don't want ReflectionMethod::invoke() to simply ignore its first argument,
if the method to invoke is a static method. Instead we match its ZPP with
that of ReflectionMethod::invokeArgs(). Furthermore, we apply the DRY
principle by factoring out the code to a common helper function to prevent
inadvertent future divergence of the implementations of both methods.
As can be seen from the necessity to adapt some test cases, this causes a
BC break for some pathological cases. Therefore we apply this patch to PHP
7.1 only, which is still in beta phase.
Fixed bug #71534 (Type confusion in exif_read_data() leading to heap overflow in debug mode)
Unlike the original patch, this does not return an unknown format in case an unsigned compatible type cannot be found (cases for SINGLE and DOUBLE removed), as these seems rare cases according to the inline comments.
Note, the test does not test if PHP is in debug mode, although the report originally states it only occurs there only.
The fix is based on a patch by hlt99 at blinkenshell dot org
Fixed bug #5453 (WSA cleanup executes before MSHUTDOWN)
This moves the WSACleanup() call to after zend_shutdown() in main.c, I did some testing and I could not find any issues with this. I don't expect this to cause any issues on Netware either, although untested as I do not have such an env available (do we even support Netware anymore? Last release was in 2009 and it is now discontinued)
Besides the movie, then this commit also contains a fix to the check of WSAStartup() where we don't actually confirm we get the desired version of the winsock.dll (We use 2.0).
pefree() these (with persistent=0), as internally in zend_multibyte.c they do the same, and at the same time also cast them to void pointers to silence the compiler warnings.
Fixed bug #68547 (Exif Header component value check error) (Patch by sjh21a at gmail dot com)
This patch changes processing a little and causes some crafted tags to not be parsed and generate a warning.
This is a slight BC break from earlier versions, since it will no longer return the tags of that it was mismatching (see bug68799.phpt), namely the "WINXP" section and the "Author" tag is no longer returned due to this. Although this BC break is merely only for crafted tags, this can also have some real life effects on pictures re-saved from editors that can cause bad exif data writes, so lets keep it here.
Added support for Sony pictures in EXIF as per requested in bug #72735
Sony is a little more interesting, as it is have a large range of tags it support in different models. For now I have added all the tags found within the Exif.Sony1 namespace.