]> granicus.if.org Git - php/commitdiff
Fixed bug #38488 (Access to "php://stdin" and family crashes PHP on win32)
authorDmitry Stogov <dmitry@php.net>
Tue, 22 Aug 2006 06:15:26 +0000 (06:15 +0000)
committerDmitry Stogov <dmitry@php.net>
Tue, 22 Aug 2006 06:15:26 +0000 (06:15 +0000)
NEWS
main/streams/plain_wrapper.c

diff --git a/NEWS b/NEWS
index baa861e446f61857be40fff2c0f597572e751ddd..2fceb35ee92a41b8efabfdc01036ac7f32b40dde 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,8 @@ PHP                                                                        NEWS
   inside a failed query executed via query() method). (Ilia)
 - Fixed bug #38524 (strptime() does not initialize the internal date storage
   structure). (Ilia)
+- Fixed bug #38488 (Access to "php://stdin" and family crashes PHP on win32).
+  (Dmitry)
 - Fixed PECL bug #8112 (OCI8 persistent connections misbehave when Apache 
   process times out). (Tony)
 
index 99fcf7ee104effadd6b3fe15c6ce2cc7c405781f..54cc39b7f61d3518830027b65e1828a5bbeeb74d 100644 (file)
@@ -194,10 +194,9 @@ PHPAPI php_stream *_php_stream_fopen_from_fd(int fd, const char *mode, const cha
 #elif defined(PHP_WIN32)
        {
                long handle = _get_osfhandle(self->fd);
-               DWORD in_buf_size, out_buf_size;
 
                if (handle != 0xFFFFFFFF) {
-                       self->is_pipe = GetNamedPipeInfo((HANDLE)handle, NULL, &out_buf_size, &in_buf_size, NULL);
+                       self->is_pipe = GetFileType((HANDLE)handle) == FILE_TYPE_PIPE;
                }
        }
 #endif