Fixed bug #38488 (Access to "php://stdin" and family crashes PHP on win32)

This commit is contained in:
Dmitry Stogov 2006-08-22 06:15:26 +00:00
parent 4180155a47
commit 7dfbf5b2e4
2 changed files with 3 additions and 2 deletions

2
NEWS
View file

@ -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)

View 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