com php-src: Add length check for bzcompress too - fix for bug #73356: ext/bz2/bz2.c
| From: | Ferenc Kovacs | Date: | Wed, 09 Nov 2016 00:47:10 +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-95465@lists.php.net to get a copy of this message | ||
Commit: f14da6f0b01e329c3809de93c1b928ad4b4fa6fa
Author: Stanislav Malyshev <stas@php.net> Thu, 3 Nov 2016 22:10:22 -0700
Committer: Ferenc Kovacs <tyra3l@gmail.com> Wed, 9 Nov 2016 01:47:10 +0100
Parents: 18fef10644d865f9d25e49ed501f4f739efe44fc
Branches: PHP-5.6.28
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f14da6f0b01e329c3809de93c1b928ad4b4fa6fa
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);
}
}
/* }}} */