Bug #71994 [Csd]: Octal escape sequences are not checked for overflow
| From: | dragondreamer at live dot com | Date: | Fri, 23 Nov 2018 09:23:16 +0000 |
| Subject: | Bug #71994 [Csd]: Octal escape sequences are not checked for overflow | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-218098@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71994&edit=1
ID: 71994
User updated by: dragondreamer at live dot com
Reported by: dragondreamer at live dot com
Summary: Octal escape sequences are not checked for overflow
Status: Closed
Type: Bug
Package: Scripting Engine problem
Operating System: Any
PHP Version: Irrelevant
Assigned To: pollita
Block user comment: N
Private report: N
New Comment:
Edit e-mail address
Previous Comments:
------------------------------------------------------------------------
[2016-05-14 00:28:37] pollita@php.net
Agreed course of action is that as of PHP 7.1 we'll raise a compile time warning, but continue
to allow the value to overflow. At a later time, this may be promoted to a full error, but for now
we're keeping BC.
------------------------------------------------------------------------
[2016-04-13 02:38:49] pollita@php.net
Under discussion: https://wiki.php.net/rfc/octal.overload-checking
------------------------------------------------------------------------
[2016-04-08 19:58:09] dragondreamer at live dot com
Description:
------------
Octal escape sequences in double quotes or backticks are not checked for overflow.
Test script:
---------------
<?php
echo ord("\777"[0]) . PHP_EOL;
echo ord("\666"[0]) . PHP_EOL;
echo ord("\555"[0]) . PHP_EOL;
Expected result:
----------------
Some kind of error, because all of \777, \666, \555 sequences are invalid, their value is greater
than 255.
Actual result:
--------------
255
182
109
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71994&edit=1