From: gereon dot steffens at onvista dot de Operating system: All PHP version: 4.3.3RC1 PHP Bug Type: Unknown/Other Function Bug description: Base64 decoder doesn't ignore all input characters that it should ignore
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 bug report at http://bugs.php.net/?id=24312&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24312&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24312&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24312&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24312&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24312&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24312&r=support Expected behavior: http://bugs.php.net/fix.php?id=24312&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24312&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24312&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24312&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24312&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24312&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24312&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24312&r=gnused