]> granicus.if.org Git - php/commitdiff
-fix bug 54935, php_win_err can lead to crash
authorPierre Joye <pajoye@php.net>
Thu, 26 May 2011 14:37:13 +0000 (14:37 +0000)
committerPierre Joye <pajoye@php.net>
Thu, 26 May 2011 14:37:13 +0000 (14:37 +0000)
ext/standard/dl.c

index 9099edfafd79f8a8db6f10f205c0ad4fecd97732..b59cf585674830a82878752b1877345d15c0cb0c 100644 (file)
@@ -145,7 +145,7 @@ PHPAPI int php_load_extension(char *filename, int type, int start_now TSRMLS_DC)
        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 {