Skip to content

Commit 658b9b0

Browse files
author
Julien Pauli
committed
Backport of Fix bug #69522 - do not allow int overflow
1 parent b416181 commit 658b9b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ PHP_FUNCTION(unpack)
759759
len = size * 2;
760760
}
761761

762-
if (argb > 0) {
762+
if (len > 0 && argb > 0) {
763763
len -= argb % 2;
764764
}
765765

0 commit comments

Comments
 (0)