Skip to content

[pull] master from php:master#761

Merged
pull[bot] merged 3 commits into
ConnectionMaster:masterfrom
php:master
May 23, 2026
Merged

[pull] master from php:master#761
pull[bot] merged 3 commits into
ConnectionMaster:masterfrom
php:master

Conversation

@pull

@pull pull Bot commented May 23, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

iliaal added 3 commits May 22, 2026 18:46
…eturn

gdImageSetStyle freed im->style before checking overflow2(). When the
overflow check tripped and the function early-returned, im->style was
left dangling. The next gdImageSetStyle, gdImageDestroy, or
gdImageSetPixel gdStyled/gdStyledBrushed dispatch then freed or
dereferenced it. Move the overflow check above the free to match
upstream libgd (libgd/libgd src/gd.c::gdImageSetStyle), which has
always had the check first. The original divergence was an oversight
in 77ba248 when the overflow check was ported from libgd 2.0.29.

Fixes GH-22121
Closes GH-22125
* PHP-8.4:
  Fix GH-22121: double-free in gdImageSetStyle() after overflow early return
* PHP-8.5:
  Fix GH-22121: double-free in gdImageSetStyle() after overflow early return
@pull pull Bot locked and limited conversation to collaborators May 23, 2026
@pull pull Bot added the ⤵️ pull label May 23, 2026
@pull pull Bot merged commit e22ba55 into ConnectionMaster:master May 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant