diff options
author | Dmitry Stogov <dmitry@php.net> | 2006-08-22 06:16:19 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2006-08-22 06:16:19 +0000 |
commit | a0fb889d93fbba8f81361f81b93ab7c0bfd11ffa (patch) | |
tree | c3d7b8ce3ecd031e23620d8c76fd114ebfd3969d | |
parent | 72fd82a63c4ade1a67fada915a1a734f0111937c (diff) | |
download | php-git-a0fb889d93fbba8f81361f81b93ab7c0bfd11ffa.tar.gz |
Fixed bug #38488 (Access to "php://stdin" and family crashes PHP on win32)
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | main/streams/plain_wrapper.c | 3 |
2 files changed, 3 insertions, 2 deletions
@@ -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 |