Bug #71994 [Opn]: Octal escape sequences are not checked for overflow

From: Date: Wed, 13 Apr 2016 02:38:50 +0000
Subject: Bug #71994 [Opn]: Octal escape sequences are not checked for overflow
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200514@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
 Updated by:         pollita@php.net
 Reported by:        temp at temp dot ru
 Summary:            Octal escape sequences are not checked for overflow
 Status:             Open
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   Any
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

Under discussion: https://wiki.php.net/rfc/octal.overload-checking


Previous Comments:
------------------------------------------------------------------------
[2016-04-08 19:58:09] temp at temp dot ru

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


Thread (4 messages)

« previous php.bugs (#200514) next »