diff options
| author | Arnaud Le Blanc <lbarnaud@php.net> | 2009-05-16 20:22:29 +0000 |
|---|---|---|
| committer | Arnaud Le Blanc <lbarnaud@php.net> | 2009-05-16 20:22:29 +0000 |
| commit | 804ed57ad31c5e24645da336f9f04b7616e396fb (patch) | |
| tree | b62977c0a748c3042252e0d88b62d3f424e5f850 /main/streams/streams.c | |
| parent | dd8ba68ca741d8b0cd4ff9759a936055327c7f80 (diff) | |
| download | php-git-804ed57ad31c5e24645da336f9f04b7616e396fb.tar.gz | |
Fixed bug #48307 (stream_copy_to_stream() copies 0 bytes when $source
is a socket)
Diffstat (limited to 'main/streams/streams.c')
| -rwxr-xr-x | main/streams/streams.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c index 9dd9135097..e953a1690f 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -1794,11 +1794,8 @@ PHPAPI size_t _php_stream_ucopy_to_stream_ex(php_stream *src, php_stream *dest, if (php_stream_stat(src, &ssbuf) == 0) { if (ssbuf.sb.st_size == 0 -#ifdef S_ISFIFO - && !S_ISFIFO(ssbuf.sb.st_mode) -#endif -#ifdef S_ISCHR - && !S_ISCHR(ssbuf.sb.st_mode) +#ifdef S_ISREG + && S_ISREG(ssbuf.sb.st_mode) #endif ) { *len = 0; @@ -1901,11 +1898,8 @@ PHPAPI size_t _php_stream_copy_to_stream_ex(php_stream *src, php_stream *dest, s if (php_stream_stat(src, &ssbuf) == 0) { if (ssbuf.sb.st_size == 0 -#ifdef S_ISFIFO - && !S_ISFIFO(ssbuf.sb.st_mode) -#endif -#ifdef S_ISCHR - && !S_ISCHR(ssbuf.sb.st_mode) +#ifdef S_ISREG + && S_ISREG(ssbuf.sb.st_mode) #endif ) { *len = 0; |
