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

Fix Image import crash #82408

Merged
merged 1 commit into from
Sep 27, 2023
Merged

Fix Image import crash #82408

merged 1 commit into from
Sep 27, 2023

Conversation

hpvb
Copy link
Member

@hpvb hpvb commented Sep 26, 2023

I was trying to import a solid colored metal/roughness texture that worked in Godot 4.1.1 but failed to load on master. I eventually tracked it down to this: to_x and to_y can be 0, which then leads them to be -1 later, which then causes ofs to overflow.

Some of these cases were hidden because of the use of Vector so we were just happily scribbling in ram elsewhere.

Switched to LocalVector as it made debugging a bit easier.

I was trying to import a solid colored metal/roughness texture that
worked in Godot 4.1.1 but failed to load on master. I eventually tracked
it down to this: to_x and to_y can be 0, which then leads them to be -1
later, which then causes ofs to overflow.

Some of these cases were hidden because of the use of Vector so we were
just happily scribbling in ram elsewhere.

Switched to LocalVector as it made debugging a bit easier.
@akien-mga akien-mga changed the title Fix import crash Fix Image import crash Sep 26, 2023
@akien-mga akien-mga added this to the 4.2 milestone Sep 26, 2023
@akien-mga akien-mga merged commit d616c3e into godotengine:master Sep 27, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

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.

2 participants