Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add buffer size check to Image.load_tga_from_buffer(). Fixes #67985 #68057

Merged

Conversation

Klowner
Copy link
Contributor

@Klowner Klowner commented Oct 30, 2022

Check that there's enough data remaining in the TGA buffer to satisfy the size expectations set by the TGA headers, preventing a potential negative index buffer access.

Fixes #67985

@Klowner Klowner requested a review from a team as a code owner October 30, 2022 16:26
@timothyqiu timothyqiu added this to the 4.0 milestone Oct 31, 2022
@akien-mga akien-mga added cherrypick:3.x Considered for cherry-picking into a future 3.x release cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release labels Nov 1, 2022
@akien-mga akien-mga merged commit a30ed00 into godotengine:master Nov 2, 2022
@Klowner Klowner deleted the tga-truncated-crash-fix-67985 branch November 3, 2022 01:07
@akien-mga
Copy link
Member

Cherry-picked for 3.6.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Nov 30, 2022
@timothyqiu
Copy link
Member

Cherry-picked for 3.5.2

@timothyqiu timothyqiu removed the cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release label Dec 5, 2022
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.

Executing Image.load_tga_from_buffer crashes Godot
3 participants