Skip to content

Fix GH-19666: imageconvolution() unexpected nan filter value.#22129

Open
devnexen wants to merge 1 commit into
php:PHP-8.4from
devnexen:gh19666-84
Open

Fix GH-19666: imageconvolution() unexpected nan filter value.#22129
devnexen wants to merge 1 commit into
php:PHP-8.4from
devnexen:gh19666-84

Conversation

@devnexen
Copy link
Copy Markdown
Member

undefined behavior occurs during cast from float to int when the element of the filter matrix is -INF. Port the libgd clamp helper which treats non-finite accumulators as 0 (negative/NaN) or 255 (positive infinity) instead of bailing out, matching upstream libgd 81d7f2e.

undefined behavior occurs during cast from float to int when the element
of the filter matrix is -INF. Port the libgd clamp helper which treats
non-finite accumulators as 0 (negative/NaN) or 255 (positive infinity)
instead of bailing out, matching upstream libgd 81d7f2e.
@devnexen devnexen marked this pull request as ready for review May 22, 2026 18:36
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