summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2006-08-22 06:16:19 +0000
committerDmitry Stogov <dmitry@php.net>2006-08-22 06:16:19 +0000
commita0fb889d93fbba8f81361f81b93ab7c0bfd11ffa (patch)
treec3d7b8ce3ecd031e23620d8c76fd114ebfd3969d
parent72fd82a63c4ade1a67fada915a1a734f0111937c (diff)
downloadphp-git-a0fb889d93fbba8f81361f81b93ab7c0bfd11ffa.tar.gz
Fixed bug #38488 (Access to "php://stdin" and family crashes PHP on win32)
-rw-r--r--NEWS2
-rw-r--r--main/streams/plain_wrapper.c3
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