Skip to content

Size is always one in curl functions#22733

Open
Sjord wants to merge 1 commit into
php:masterfrom
Sjord:curl-size-always-one
Open

Size is always one in curl functions#22733
Sjord wants to merge 1 commit into
php:masterfrom
Sjord:curl-size-always-one

Conversation

@Sjord

@Sjord Sjord commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Assert and take advantage of that size is always 1. This is also documented in the curl docs. So there is no need to multiply with size, so this can be removed.

I started this to see whether size * nmemb can overflow. This makes it clear that it cannot.

Assert and take advantage of that size is always 1. This is also
documented in the curl docs. So there is no need to multiply with size,
so this can be removed.

I started this to see whether size * nmemb can overflow. This makes it
clear that it cannot.
@Sjord Sjord requested a review from adoy as a code owner July 14, 2026 17:06
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.

1 participant