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

AtlasEngine: Fix a OOB read when rendering PUA chars #16894

Merged
merged 3 commits into from
Mar 21, 2024

Conversation

lhecker
Copy link
Member

@lhecker lhecker commented Mar 18, 2024

When no soft fonts are set up but we're asked to draw a U+EF20, etc.,
character we'll currently read out-of-bounds, because we don't check
whether the soft fonts array is non-empty. This PR fixes the issue by
first getting a slice of the data and then checking if it's ok to use.

This changeset additionally fixes a couple constinit vs. constexpr
cases. I changed them to constinit at some point because I thought
that it's more constexpr than constexpr by guaranteeing initialization
at compile time. But nope, constinit is actually weaker in a way,
because while it does guarantee that, it doesn't actually make the
data constant. In other words, constinit is not .rdata.

@lhecker lhecker added Area-CodeHealth Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc. Area-AtlasEngine labels Mar 18, 2024
@DHowett DHowett added this to To Cherry Pick in 1.19 Servicing Pipeline via automation Mar 19, 2024
@DHowett DHowett added this to To Cherry Pick in 1.20 Servicing Pipeline via automation Mar 19, 2024
@DHowett
Copy link
Member

DHowett commented Mar 20, 2024

this build is broke, fyi

@zadjii-msft
Copy link
Member

(still doesn't build)

@lhecker
Copy link
Member Author

lhecker commented Mar 21, 2024

I can't say I have seen a

LNK1169: one or more multiply defined symbols found

because I failed to include a header before. I'd understand if the definition was missing, but a duplicate symbol? Huh. Well, it should be fixed now!

@DHowett DHowett merged commit 5b8e731 into main Mar 21, 2024
20 checks passed
@DHowett DHowett deleted the dev/lhecker/atlas-engine-pua-crash branch March 21, 2024 20:38
@DHowett DHowett moved this from To Cherry Pick to Rejected in 1.19 Servicing Pipeline Mar 21, 2024
@DHowett DHowett moved this from To Cherry Pick to Rejected in 1.20 Servicing Pipeline Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-AtlasEngine Area-CodeHealth Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.
Development

Successfully merging this pull request may close these issues.

None yet

3 participants