We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 494dd97 commit 0f5a7d0Copy full SHA for 0f5a7d0
1 file changed
ext/zlib/tests/gzseek_seek_oob.phpt
@@ -0,0 +1,20 @@
1
+--TEST--
2
+Test function gzseek() by seeking out of bounds
3
+--EXTENSIONS--
4
+zlib
5
+--FILE--
6
+<?php
7
+$f = __DIR__."/004.txt.gz";
8
+$h = gzopen($f, 'r');
9
+
10
+var_dump(gzseek($h, -100, SEEK_CUR));
11
+var_dump(gzseek($h, 0, SEEK_CUR));
12
+var_dump(gztell($h));
13
14
+gzclose($h);
15
+?>
16
+--EXPECTF--
17
+int(-1)
18
+php: %s: _php_stream_seek: Assertion `stream->position >= 0' failed.
19
20
+Termsig=6
0 commit comments