ID: 46385
Updated by: [EMAIL PROTECTED]
Reported By: delilahblue at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Strings related
Operating System: Gentoo Linux
PHP Version: 5.2.6
New Comment:
See bug #46267
Previous Comments:
------------------------------------------------------------------------
[2008-10-25 14:22:18] delilahblue at gmail dot com
Description:
------------
sscanf does not work with %b in the format string.
PHP 5.2.6-pl7-gentoo (cli) (built: Sep 27 2008 23:46:17)
Linux version 2.6.24-tuxonice-r9 (gcc version 4.1.2 (Gentoo 4.1.2)) #1
SMP PREEMPT Fri Oct 3 11:58:28 CEST 2008
USE-flags: apache2 bcmath berkdb bzip2 cli crypt ctype curl gd gdbm
hash iconv ipv6 mysql mysqli ncurses nls pcre readline reflection
session sockets spell spl ssl truetype unicode xml zlib
other people on freenode#php have the same issue
for example with php-5.2.4-2ubuntu5.3 on
Linux dev 2.6.24-19-386 #1 Wed Aug 20 21:59:50 UTC 2008 i686 GNU/Linux
Reproduce code:
---------------
echo sscanf("01010101", "%b");
Expected result:
----------------
It should output "85".
Actual result:
--------------
Warning: sscanf(): Bad scan conversion character "b" in php shell code
on line 1
Call Stack:
3740.1460 179568 1. {main}() php shell code:0
3740.1460 179568 2. sscanf() php shell code:1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46385&edit=1