com php-src: Add length check for bzcompress too - fix for bug #73356: ext/bz2/bz2.c
| From: | Stanislav Malyshev | Date: | Fri, 04 Nov 2016 05:10:22 +0000 |
| Subject: | com php-src: Add length check for bzcompress too - fix for bug #73356: ext/bz2/bz2.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95394@lists.php.net to get a copy of this message | ||
Commit: 40f7fea89719da13505a521115101e74260d3fdb
Author: Stanislav Malyshev <stas@php.net> Thu, 3 Nov 2016 22:10:22 -0700
Parents: 1fd18821e08c72e026de30ab915b73ec32dcf0ad
Branches: PHP-5.6 PHP-7.0 PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=40f7fea89719da13505a521115101e74260d3fdb
Log:
Add length check for bzcompress too - fix for bug #73356
Bugs:
https://bugs.php.net/73356
Changed paths:
M ext/bz2/bz2.c
Diff:
diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c
index 2e39f4a..13b9f38 100644
--- a/ext/bz2/bz2.c
+++ b/ext/bz2/bz2.c
@@ -533,7 +533,7 @@ static PHP_FUNCTION(bzcompress)
so we erealloc() the buffer to the proper size */
dest = erealloc(dest, dest_len + 1);
dest[dest_len] = 0;
- RETURN_STRINGL(dest, dest_len, 0);
+ RETURN_STRINGL_CHECK(dest, dest_len, 0);
}
}
/* }}} */