com php-src: fix assert, zero diff would be valid, too: ext/standard/uuencode.c
| From: | Anatol Belski | Date: | Wed, 22 Oct 2014 18:46:32 +0000 |
| Subject: | com php-src: fix assert, zero diff would be valid, too: ext/standard/uuencode.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82451@lists.php.net to get a copy of this message | ||
Commit: 58b82272404739fcc2907e68ae8e569c2161ddf2
Author: Anatol Belski <ab@php.net> Wed, 22 Oct 2014 20:11:43 +0200
Parents: 5b4b0f83688e9a545589019af53d8d26e56fadd4
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=58b82272404739fcc2907e68ae8e569c2161ddf2
Log:
fix assert, zero diff would be valid, too
Changed paths:
M ext/standard/uuencode.c
Diff:
diff --git a/ext/standard/uuencode.c b/ext/standard/uuencode.c
index c30225c..ea171a6 100644
--- a/ext/standard/uuencode.c
+++ b/ext/standard/uuencode.c
@@ -173,7 +173,7 @@ PHPAPI zend_string *php_uudecode(char *src, size_t src_len) /* {{{ */
s++;
}
- assert(p > dest->val);
+ assert(p >= dest->val);
if ((len = total_len > (size_t)(p - dest->val))) {
*p++ = PHP_UU_DEC(*s) << 2 | PHP_UU_DEC(*(s + 1)) >> 4;
if (len > 1) {