Skip to content

php_network.h integer overflow #15937

Closed
Closed
@chongwick

Description

@chongwick

Description

The following code:

<?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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions