File: bug81422.phpt

package info (click to toggle)
php-mailparse 3.1.4%2B2.1.7~dev20160128-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,484 kB
  • sloc: ansic: 4,080; xml: 363; php: 38; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 424 bytes parent folder | download | duplicates (2)
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
--TEST--
Bug #81422 (Potential double-free in mailparse_uudecode_all())
--SKIPIF--
<?php
if (!extension_loaded("mailparse")) die("skip mailparse extension not available");
?>
--FILE--
<?php
$data = <<<'EOD'
begin 644 foo
`
end

begin 644 bar
`
end

EOD;
$stream = fopen('php://memory', 'w+');
fwrite($stream, $data);
rewind($stream);
$parsed = mailparse_uudecode_all($stream);
var_dump(count($parsed));
?>
--EXPECT--
int(3)