Skip to content

Conversation

@mtrea
Copy link

@mtrea mtrea commented Jan 2, 2026

This replaces pointer casting in UncompressCPixel with memcpy to prevent reading uninitialized memory when REALBPP/8 is smaller than sizeof(CARDBPP). For example, this is important if REALBPP/8 was 3 bytes but sizeof(CARDBPP) was 4 bytes.

I detected this issue and verified this fix with the help of https://github.com/google/sanitizers/wiki/memorysanitizer.

This replaces pointer casting in UncompressCPixel with memcpy to prevent reading uninitialized memory when REALBPP/8 is smaller than sizeof(CARDBPP). For example, this is important if REALBPP/8 was 3 bytes but sizeof(CARDBPP) was 4 bytes.
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