diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2021-01-05 12:24:23 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-01-05 12:25:19 +0100 |
commit | 0067c3ced17ff69516854865e607887a9702cd0c (patch) | |
tree | f8892bab7f950c07c898abf8038fb5a6761cf2d7 /Zend/tests | |
parent | ed4f18b4635d7a873705eeaa128a33eb0c8deaa5 (diff) | |
download | php-git-0067c3ced17ff69516854865e607887a9702cd0c.tar.gz |
Fix lexing of zero octal followed by whitespace
We'd call strtol starting at the whitespace, and strtol strips
whitespace...
Fixes oss-fuzz #29272.
Diffstat (limited to 'Zend/tests')
-rw-r--r-- | Zend/tests/oct_whitespace.phpt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Zend/tests/oct_whitespace.phpt b/Zend/tests/oct_whitespace.phpt new file mode 100644 index 0000000000..cb0bf4ad7a --- /dev/null +++ b/Zend/tests/oct_whitespace.phpt @@ -0,0 +1,8 @@ +--TEST-- +Octal literal followed by whitespace and another number +--FILE-- +<?php +var_dump(0o0 2); +?> +--EXPECTF-- +Parse error: syntax error, unexpected integer "2", expecting ")" in %s on line %d |