From: Marcus Boerger Date: Thu, 5 Dec 2002 21:02:02 +0000 (+0000) Subject: MFH: both the check and php_error in the comment X-Git-Tag: php-4.3.0RC3~59 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=81b7c2abc18ba23c5c7ad66cd7911b97ff090258;p=php MFH: both the check and php_error in the comment --- 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.