- Fixed bug #47152 (gzseek/fseek using SEEK_END produces strange results)

This commit is contained in:
Felipe Pena 2009-01-20 15:41:04 +00:00
parent 9c2283fe02
commit 2d150236d9

View File

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