diff --git a/getid3/getid3.php b/getid3/getid3.php index 94f55f0c..8304b9ce 100644 --- a/getid3/getid3.php +++ b/getid3/getid3.php @@ -2255,7 +2255,15 @@ protected function fseek($bytes, $whence=SEEK_SET) { throw new getid3_exception('cannot fseek('.$pos.') because beyond PHP filesystem limit', 10); } } - return fseek($this->getid3->fp, $bytes, $whence); + + $result = fseek($this->getid3->fp, $bytes, $whence); + + // fseek returns 0 on success + if ($result !== 0) { + throw new getid3_exception('cannot fseek('.$pos.'). resource/stream does not appear to support seeking', 10); + } + + return $result; } /**