Skip to content

fix vector bounds check#29

Open
MedSaher wants to merge 1 commit into
kosinix:masterfrom
MedSaher:master
Open

fix vector bounds check#29
MedSaher wants to merge 1 commit into
kosinix:masterfrom
MedSaher:master

Conversation

@MedSaher
Copy link
Copy Markdown

Fix check_pixel in Image

This PR updates check_pixel to first validate that x and y are within image bounds and then ensure the bytes vector actually contains the full RGBA data for that pixel. This prevents panics when accessing truncated or corrupted images and correctly returns false for out-of-bounds pixels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant