Skip to content

Commit

Permalink
- MFH: Fixed bug #47152 (gzseek/fseek using SEEK_END produces strange…
Browse files Browse the repository at this point in the history
… results)
  • Loading branch information
felipensp committed Jan 20, 2009
1 parent d4e765f commit 0b3afcf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ext/zlib/zlib_fopen_wrapper.c
Expand Up @@ -60,6 +60,10 @@ static int php_gziop_seek(php_stream *stream, off_t offset, int whence, off_t *n

assert(self != NULL);

if (whence == SEEK_END) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "SEEK_END is not supported");
return -1;
}
*newoffs = gzseek(self->gz_file, offset, whence);

return (*newoffs < 0) ? -1 : 0;
Expand Down

0 comments on commit 0b3afcf

Please sign in to comment.