summaryrefslogtreecommitdiff
path: root/ext/standard/base64.c
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2016-07-22 18:20:34 +0200
committerNikita Popov <nikic@php.net>2016-07-22 18:20:34 +0200
commitbb51da29dc73a5cb9c26e4926d9f0aa4d54f600b (patch)
tree621faea02de3503630c28256adc3cd8347582616 /ext/standard/base64.c
parente1216f6fc15599ab87ec106b75383efc9b2d8c5b (diff)
downloadphp-git-bb51da29dc73a5cb9c26e4926d9f0aa4d54f600b.tar.gz
Make base64_decode() in non-strict mode binary safe
Diffstat (limited to 'ext/standard/base64.c')
-rw-r--r--ext/standard/base64.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/ext/standard/base64.c b/ext/standard/base64.c
index 87cc1e8639..64f21044e7 100644
--- a/ext/standard/base64.c
+++ b/ext/standard/base64.c
@@ -144,10 +144,6 @@ PHPAPI zend_string *php_base64_decode_ex(const unsigned char *str, size_t length
/* run through the whole string, converting as we go */
while (length-- > 0) {
ch = *current++;
- /* stop on null byte in non-strict mode (FIXME: is this really desired?) */
- if (ch == 0 && !strict) {
- break;
- }
if (ch == base64_pad) {
padding++;
continue;