#24312 [Opn->Csd]: Base64 decoder doesn't ignore all input characters that it should ignore
| From: | iliaa@php.net | Date: | Tue, 24 Jun 2003 15:26:14 +0000 |
| Subject: | #24312 [Opn->Csd]: Base64 decoder doesn't ignore all input characters that it should ignore | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-42446@lists.php.net to get a copy of this message | ||
ID: 24312
Updated by: iliaa@php.net
Reported By: gereon dot steffens at onvista dot de
-Status: Open
+Status: Closed
Bug Type: Unknown/Other Function
Operating System: All
PHP Version: 4.3.3RC1
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2003-06-24 04:46:17] gereon dot steffens at onvista dot de
Description:
------------
ext/standard/base64.c contains a mapping array called
base64_reverse_table that has 256 elements, but only 240 initializers.
This means that input characters in the range 0xF0 to 0xFF map to 0
(because the compiler fills the remaining elements) instead of -1 and
therefore are not ignored as they should be.
Here's a diff for the trivial patch:
*** base64.c.orig Tue Jun 24 11:01:32 2003
--- base64.c Tue Jun 24 11:02:26 2003
***************
*** 48,53 ****
--- 48,54 ----
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
};
/* }}} */
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24312&edit=1