From 81b7c2abc18ba23c5c7ad66cd7911b97ff090258 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Thu, 5 Dec 2002 21:02:02 +0000 Subject: [PATCH] MFH: both the check and php_error in the comment --- ext/standard/base64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/base64.c b/ext/standard/base64.c index 18f1e9c532..4defc3f5bb 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -119,7 +119,7 @@ void php_base64_init() ch += 16; } sprintf(sp, "};"); - php_error(E_NOTICE,"reverse_table:\n%s", s); + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Reverse_table:\n%s", s); efree(s); } */ @@ -140,7 +140,7 @@ unsigned char *php_base64_decode(const unsigned char *str, int length, int *ret_ } /* run through the whole string, converting as we go */ - while ((ch = *current++) != '\0') { + while ((ch = *current++) != '\0' && length-- > 0) { if (ch == base64_pad) break; /* When Base64 gets POSTed, all pluses are interpreted as spaces. -- 2.50.1