mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
add new test
This commit is contained in:
parent
9bd82acc33
commit
fa6d24b330
1 changed files with 13 additions and 0 deletions
13
ext/standard/tests/strings/bug38322.phpt
Normal file
13
ext/standard/tests/strings/bug38322.phpt
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
--TEST--
|
||||||
|
Bug #38322 (reading past array in sscanf() leads to segfault/arbitary code execution)
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$str = "a b c d e";
|
||||||
|
var_dump(sscanf("a ",'%1$s',$str));
|
||||||
|
|
||||||
|
echo "Done\n";
|
||||||
|
?>
|
||||||
|
--EXPECTF--
|
||||||
|
int(1)
|
||||||
|
Done
|
Loading…
Add table
Add a link
Reference in a new issue