1--TEST-- 2GH-15613 overflow on hex strings repeater value 3--SKIPIF-- 4<?php 5if (PHP_INT_SIZE != 8) die("skip this test is for 64 bit platform only"); 6?> 7--INI-- 8memory_limit=-1 9--FILE-- 10<?php 11try { 12 unpack('h2147483647', str_repeat('X', 2**31 + 10)); 13} catch (\ValueError $e) { 14 echo $e->getMessage() . PHP_EOL; 15} 16 17try { 18 unpack('H2147483647', str_repeat('X', 2**31 + 10)); 19} catch (\ValueError $e) { 20 echo $e->getMessage(); 21} 22?> 23--EXPECTF-- 24unpack(): Argument #1 ($format) repeater must be less than or equal to %d 25unpack(): Argument #1 ($format) repeater must be less than or equal to %d 26