Skip to content

Fix GH-25960: JPEG 2000 Csiz is accepted without component descriptors - #25985

Open
lazerg wants to merge 1 commit into
php:PHP-8.4from
lazerg:fix/gh-25960
Open

lazerg wants to merge 1 commit into
php:PHP-8.4from
lazerg:fix/gh-25960

Conversation

@lazerg

@lazerg lazerg commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

php_handle_jpc() loops over Csiz component descriptors with unchecked php_stream_getc() calls, so a codestream cut off before those bytes still returns an image with Csiz channels. Each 3-byte descriptor is now read in one go and a short read makes getimagesize() return false.

Fixes #25960

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