File: igbinary_074.phpt

package info (click to toggle)
php-igbinary 3.2.16-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,024 kB
  • sloc: ansic: 3,373; xml: 1,106; pascal: 10; makefile: 2; php: 2; sh: 1
file content (33 lines) | stat: -rw-r--r-- 1,072 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--TEST--
igbinary and not enough data for array
--FILE--
<?php
echo "One byte\n";
igbinary_unserialize("\x00\x00\x00\x02\x14");
echo "Two byte\n";
igbinary_unserialize("\x00\x00\x00\x02\x15\x01");
igbinary_unserialize("\x00\x00\x00\x02\x15");
igbinary_unserialize("\x00\x00\x00\x02\x15\x00\x01");
echo "Four byte\n";
igbinary_unserialize("\x00\x00\x00\x02\x16\x00");
igbinary_unserialize("\x00\x00\x00\x02\x16\x00\x00\x01");
igbinary_unserialize("\x00\x00\x00\x02\x16\x00\x00\x00\x01");
?>
--EXPECTF--
One byte

Warning: igbinary_unserialize_array: end-of-data in %s on line 3
Two byte

Warning: igbinary_unserialize_array: end-of-data in %s on line 5

Warning: igbinary_unserialize_array: end-of-data in %s on line 6

Warning: igbinary_unserialize_array: data size 0 smaller that requested array length 1. in %s on line 7
Four byte

Warning: igbinary_unserialize_array: end-of-data in %s on line 9

Warning: igbinary_unserialize_array: end-of-data in %s on line 10

Warning: igbinary_unserialize_array: data size 0 smaller that requested array length 1. in %s on line 11