From a0fb889d93fbba8f81361f81b93ab7c0bfd11ffa Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 22 Aug 2006 06:16:19 +0000 Subject: Fixed bug #38488 (Access to "php://stdin" and family crashes PHP on win32) --- NEWS | 2 ++ main/streams/plain_wrapper.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 3da1c206c6..a57cb66f3d 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2006, PHP 5.1.6 +- Fixed bug #38488 (Access to "php://stdin" and family crashes PHP on win32). + (Dmitry) 17 Aug 2006, PHP 5.1.5 - Fixed memory_limit on 64bit systems. (Stefan E.) diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index ac5ad825db..9881ea5728 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -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 -- cgit v1.2.1