-
Notifications
You must be signed in to change notification settings - Fork 168
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
[spot] Fix abort trap with NotoNastaliqUrdu #520
Conversation
Add test to validate failure of spot in this test case. When dumping a format 2 PosRule from a lookup Type 7, spot was writing past the end of a fixed length string buffer and destroying the stack.
Fix test to validate failure of spot in this test case - did not fail with crash because spot reported that output file was bad in Appveyor run.
Fix test to validate failure of spot in this test case - on Windows, needed to overrun by the buffer by more than 1K.
Fix text buffer overrun by writing it out whenever the buffer gets close to its limit, Change test to validate success of spot in this test case.
tests/spot_test.py
Outdated
def test_bug465(): | ||
""" Fix bug where a fixed length string buffer was overrun. The test | ||
font was built by building an otf from | ||
makeotf/data/innput/t1pfa.pfa, dumping this to ttx, and then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inaccurate path, which also includes a typo
tests/spot_test.py
Outdated
hand-editing the ttx file to have empty charstrings, and a | ||
ContextPos lookup type 7, format 2. Hand-editing the ttx was needed | ||
as makeotf does not build this lookup type, nor this post rule | ||
format. This test validates that the current spot code fails with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this description is now outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in most recent commit.
Fix test to validate success of spot in this test case: correct typo, and that the tests requires success rather than failure.
c/spot/source/GPOS.c
Outdated
if ((psIndex + strlen(name2) + 10) >= kProofBufferLen) | ||
{ | ||
if (level == 7) | ||
fprintf(OUTPUTBUFF, "\n %s", proofString); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change line 3581 to use spaces instead of a tab character in the output string.
(Line 3592, which is otherwise identical, uses spaces instead of a tab in the output string.)
Fix spacing in message string. GPOS.c
Updated expected output file to match previous six spacing in message string. GPOS.c.
Fixes #465 [spot] Abort trap with NotoNastaliqUrdu
Fix text buffer overrun by writing it out whenever the buffer gets close to its limit.
Add test.