Skip to content

Commit 3bf4115

Browse files
committed
changes from feedback
1 parent a75ee02 commit 3bf4115

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

ext/standard/pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ PHP_FUNCTION(unpack)
980980
zend_long ipos, opos;
981981

982982

983-
if (ZEND_LONG_INT_OVFL((zend_long)size * 2)) {
983+
if (size > INT_MAX / 2) {
984984
zend_string_release(real_name);
985985
zend_argument_value_error(1, "repeater must be less than or equal to %d", INT_MAX / 2);
986986
RETURN_THROWS();

ext/standard/tests/strings/gh15613.phpt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
--TEST--
22
GH-15613 overflow on hex strings repeater value
3-
--SKIPIF--
4-
<?php
5-
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
6-
?>
73
--INI--
84
memory_limit=-1
95
--FILE--

0 commit comments

Comments
 (0)