Skip to content

UBSan alert at ext/standard/http_fopen_wrapper.c:236 #16809

Closed
@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
$config = [
'http' => [
'timeout' => PHP_INT_MAX,
],
];
$ctx = stream_context_create($config);
var_dump(fopen("http://www.example.com", "r", false, $ctx));

Resulted in this output:

/php-src/ext/standard/http_fopen_wrapper.c:236:20: runtime error: 9.22337e+18 is outside the range of representable values of type 'long'

PHP Version

nightly

Operating System

ubuntu 22.04

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions