Skip to content

fix signed overflow in ReadGlyph coordinate accumulation#200

Open
metsw24-max wants to merge 1 commit into
google:masterfrom
metsw24-max:readglyph-coord-overflow
Open

fix signed overflow in ReadGlyph coordinate accumulation#200
metsw24-max wants to merge 1 commit into
google:masterfrom
metsw24-max:readglyph-coord-overflow

Conversation

@metsw24-max

Copy link
Copy Markdown

ReadGlyph in glyph.cc:163 accumulates point deltas into int prev_x/prev_y without an overflow check, so a glyph with enough points pushes the running coordinate past INT_MAX (signed overflow). Guard the four accumulation sites with a checked add, mirroring _SafeIntAddition in the decoder's TripletDecode.

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