com php-src: Backport of Fix bug #69522 - do not allow int overflow: ext/standard/pack.c
| From: | JulienPauli | Date: | Wed, 13 May 2015 09:44:55 +0000 |
| Subject: | com php-src: Backport of Fix bug #69522 - do not allow int overflow: ext/standard/pack.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-86724@lists.php.net to get a copy of this message | ||
Commit: 658b9b0ab26eedb3e13a583d1585f502e7da728f
Author: Julien Pauli <jpauli@php.net> Wed, 13 May 2015 11:44:55 +0200
Parents: b4161815990a1f2dec8b7ca8c131deadcf32f30c
Branches: PHP-5.5.25
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=658b9b0ab26eedb3e13a583d1585f502e7da728f
Log:
Backport of Fix bug #69522 - do not allow int overflow
Bugs:
https://bugs.php.net/69522
Changed paths:
M ext/standard/pack.c
Diff:
diff --git a/ext/standard/pack.c b/ext/standard/pack.c
index 9d362eb..fc3df64 100644
--- a/ext/standard/pack.c
+++ b/ext/standard/pack.c
@@ -759,7 +759,7 @@ PHP_FUNCTION(unpack)
len = size * 2;
}
- if (argb > 0) {
+ if (len > 0 && argb > 0) {
len -= argb % 2;
}