]> granicus.if.org Git - php/commitdiff
- Fixed bug #55187, readlink returns weird characters when false result
authorPierre Joye <pajoye@php.net>
Tue, 12 Jul 2011 15:15:17 +0000 (15:15 +0000)
committerPierre Joye <pajoye@php.net>
Tue, 12 Jul 2011 15:15:17 +0000 (15:15 +0000)
NEWS
ext/standard/link_win32.c

diff --git a/NEWS b/NEWS
index 97c4031d59e47224c8cd63752c93a481f91e5f6c..45d2d4c4346c01b258d09b4fa96422421ae495bd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,8 @@ PHP                                                                        NEWS
     though the class has none). (Felipe)
 
 - Core
+  . Fixed bug #55187 (readlink returns weird characters when false result).
+   (Pierre)
   . Fixed bug #55014 (Compile failure due to improper use of ctime_r()). (Ilia)
   . Fixed bug #54332 (Crash in zend_mm_check_ptr // Heap corruption). (Dmitry)
   . Fixed bug #54305 (Crash in gc_remove_zval_from_buffer). (Dmitry)
@@ -15,6 +17,7 @@ PHP                                                                        NEWS
   . Fixed bug #52935 (call exit in user_error_handler cause stream relate
     core). (Gustavo)
 
+
 - MCrypt
   . Change E_ERROR to E_WARNING in mcrypt_create_iv when not enough data
     has been fetched (Windows). (Pierre)
index 84a0235381b0333b1a4652394d0d7bbfa7655727..42e168a65c7822af63771bb0c70047aa3f62469d 100644 (file)
@@ -69,6 +69,7 @@ PHP_FUNCTION(readlink)
 
        if (php_sys_readlink(link, target, MAXPATHLEN) == -1) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "readlink failed to read the symbolic link (%s), error %d)", link, GetLastError());
+               RETURN_FALSE;
        }
        RETURN_STRING(target, 1);
 }