Skip to content

Fix curl_multi_exec() overflow message #17078

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Dec 7, 2024

As is, passing 2147484 as $timeout, throws a ValueError stating the $timeout needs to be between 0 and 2147484, what is a confusing. Thus we report the proper threshold as float.

While we're at it we also drop the superfluous (double) cast, and rely on C's usual arithmetic conversions.


This is a follow-up on https://github.com/php/php-src/pull/15548/files#r1728773136 which also fixes a MSVC C4305 warning.

As is, passing `2147484` as `$timeout`, throws a `ValueError` stating
the `$timeout` needs to be between 0 and 2147484, what is a confusing.
Thus we report the proper threshold as float.

While we're at it we also drop the superfluous `(double)` cast, and
rely on C's usual arithmetic conversions.
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me

@cmb69 cmb69 merged commit bb6dbdc into php:master Dec 13, 2024
10 checks passed
@cmb69 cmb69 deleted the cmb/curl_multi_exec-timeout branch December 13, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants