[php-src] Issue #15937: php_network.h integer overflow

From: Date: Tue, 17 Sep 2024 12:26:49 +0000
Subject: [php-src] Issue #15937: php_network.h integer overflow
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-247814@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/15937 Author: chongwick ### Description The following code: ```php <?php array( 'timeout' => PHP_INT_MAX, 'max_redirects' => PHP_INT_MAX, 'user_agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3', ), )); $fp = fopen('http://example.com', 'r', false, $stream); ``` Resulted in this output: ``` /home/dan/php-8.3.9/main/php_network.h:166:29: runtime error: signed integer overflow: -9223372036854775808 * 1000 cannot be represented in type 'long int' ``` ### PHP Version 8.3.9 ### Operating System _No response_

« previous php.bugs (#247814) next »