pajoye                                   Thu, 26 May 2011 14:37:13 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=311444

Log:
-fix bug 54935, php_win_err can lead to crash

Bug: http://bugs.php.net/54935 (Open) php_win_err can lead to crash
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/NEWS
    U   php/php-src/branches/PHP_5_3/ext/standard/dl.c
    U   php/php-src/branches/PHP_5_4/ext/standard/dl.c
    U   php/php-src/trunk/ext/standard/dl.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS   2011-05-26 14:17:51 UTC (rev 311443)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-05-26 14:37:13 UTC (rev 311444)
@@ -21,10 +21,13 @@
     (Dmitry)

 - Core:
-  . Fixed a crash inside dtor for error handling. (Ilia)
   . Implemented FR #54459 (Range function accuracy). (Adam)
   . Added PHP_MANDIR constant telling where the manpages were installed into,
     and an --man-dir argument to php-config. (Hannes)
+
+  . Fixed a crash inside dtor for error handling. (Ilia)
+
+  . Fixed bug #54935 php_win_err can lead to crash. (Pierre)
   . Fixed bug #54895 (Fix compiling with older gcc version without need for
     membar_producer macro). (mhei at heimpold dot de)
   . Fixed bug #54723 (getimagesize() doesn't check the full ico signature).
@@ -35,13 +38,13 @@
     (CVE-2011-1148)
   . Fixed bug #54180 (parse_url() incorrectly parses path when ? in fragment).
     (tomas dot brastavicius at quantum dot lt, Pierrick)
-  . Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using
-    TMPDIR on Windows). (Pierre)
   . Fixed bug #54866 (incorrect accounting for realpath_cache_size) (Dustin 
Ward)
   . Fixed bug #54721 (Different Hashes on Windows, BSD and Linux on wrong Salt 
size)
     (Pierre, os at irj dot ru)
   . Fixed bug #50363 (Invalid parsing in convert.quoted-printable-decode 
filter).
     (slusarz at curecanti dot org)
+  . Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using
+    TMPDIR on Windows). (Pierre)

 - Apache2 Handler SAPI:
   . Fixed bug #54529 (SAPI crashes on apache_config.c:197).

Modified: php/php-src/branches/PHP_5_3/ext/standard/dl.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/dl.c      2011-05-26 14:17:51 UTC 
(rev 311443)
+++ php/php-src/branches/PHP_5_3/ext/standard/dl.c      2011-05-26 14:37:13 UTC 
(rev 311444)
@@ -148,7 +148,7 @@
        if (!handle) {
 #if PHP_WIN32
                char *err = GET_DL_ERROR();
-               if (err) {
+               if (err && (*err != "")) {
                        php_error_docref(NULL TSRMLS_CC, error_type, "Unable to 
load dynamic library '%s' - %s", libpath, err);
                        LocalFree(err);
                } else {

Modified: php/php-src/branches/PHP_5_4/ext/standard/dl.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/standard/dl.c      2011-05-26 14:17:51 UTC 
(rev 311443)
+++ php/php-src/branches/PHP_5_4/ext/standard/dl.c      2011-05-26 14:37:13 UTC 
(rev 311444)
@@ -145,7 +145,7 @@
        if (!handle) {
 #if PHP_WIN32
                char *err = GET_DL_ERROR();
-               if (err) {
+               if (err && (*err != "")) {
                        php_error_docref(NULL TSRMLS_CC, error_type, "Unable to 
load dynamic library '%s' - %s", libpath, err);
                        LocalFree(err);
                } else {

Modified: php/php-src/trunk/ext/standard/dl.c
===================================================================
--- php/php-src/trunk/ext/standard/dl.c 2011-05-26 14:17:51 UTC (rev 311443)
+++ php/php-src/trunk/ext/standard/dl.c 2011-05-26 14:37:13 UTC (rev 311444)
@@ -145,7 +145,7 @@
        if (!handle) {
 #if PHP_WIN32
                char *err = GET_DL_ERROR();
-               if (err) {
+               if (err && (*err != "")) {
                        php_error_docref(NULL TSRMLS_CC, error_type, "Unable to 
load dynamic library '%s' - %s", libpath, err);
                        LocalFree(err);
                } else {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to