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

GRAPHICS/GUI: Fix various undefined behaviours #3640

Merged
merged 3 commits into from Jan 6, 2022

Conversation

lephilousophe
Copy link
Member

These errors were detected with UBSanitizer

Surface::create already initialized memory to 0 and getPixels can be
nullptr if bitmap size is 0. In this case memset gets called with
nullptr which is undefined behaviour.
graphics/cursorman.cpp Outdated Show resolved Hide resolved
@bluegr
Copy link
Member

bluegr commented Jan 3, 2022

Nice work!

@bluegr
Copy link
Member

bluegr commented Jan 6, 2022

Thanks! Merging

@bluegr bluegr merged commit 0802db2 into scummvm:master Jan 6, 2022
@lephilousophe lephilousophe deleted the fix-ub branch January 6, 2022 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants