1--TEST-- 2strripos() offset integer overflow 3--FILE-- 4<?php 5 6var_dump(strripos("t", "t", PHP_INT_MAX+1)); 7var_dump(strripos("tttt", "tt", PHP_INT_MAX+1)); 8var_dump(strripos(100, 101, PHP_INT_MAX+1)); 9var_dump(strripos(1024, 1024, PHP_INT_MAX+1)); 10var_dump(strripos(array(), array(), PHP_INT_MAX+1)); 11var_dump(strripos(1024, 1024, -PHP_INT_MAX)); 12var_dump(strripos(1024, "te", -PHP_INT_MAX)); 13var_dump(strripos(1024, 1024, -PHP_INT_MAX-1)); 14var_dump(strripos(1024, "te", -PHP_INT_MAX-1)); 15 16echo "Done\n"; 17?> 18--EXPECTF-- 19Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d 20bool(false) 21 22Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d 23bool(false) 24 25Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d 26bool(false) 27 28Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d 29bool(false) 30 31Warning: strripos() expects parameter 1 to be string, array given in %s on line %d 32bool(false) 33 34Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d 35bool(false) 36 37Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d 38bool(false) 39 40Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d 41bool(false) 42 43Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d 44bool(false) 45Done 46