-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Prevent adding invalid values in CFFDict_setByKey
(bug 1068432)
#7300
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
Conversation
In the font in question, there are a couple of `topDict` entries that have invalid values (`0xF 0xF`, i.e. just eof markers without any actual numbers). This causes the `parseFloatOperand` function, inside `CFFParser_parseDict`, to return `NaN`. Currently we pass this broken font onto the browser, which OTS unsurprisingly rejects. Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1068432.
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/0ba6dd990deb438/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/21565eba93e3958/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/0ba6dd990deb438/output.txt Total script time: 21.77 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/21565eba93e3958/output.txt Total script time: 27.81 mins
|
@Snuffleupagus Woot, first CFF bug! /botio-makeref |
can't type |
From: Bot.io (Linux)ReceivedCommand cmd_makeref from @brendandahl received. Current queue size: 0 Live output at: http://107.21.233.14:8877/c5fca7f7055fe6a/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @brendandahl received. Current queue size: 0 Live output at: http://107.22.172.223:8877/aecd5312a85f6f7/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/aecd5312a85f6f7/output.txt Total script time: 21.16 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/c5fca7f7055fe6a/output.txt Total script time: 26.86 mins
|
In the font in question, there are a couple of
topDict
entries that have invalid values (0xF 0xF
, i.e. just eof markers without any actual numbers).This causes the
parseFloatOperand
function, insideCFFParser_parseDict
, to returnNaN
. Currently we pass this broken font onto the browser, which OTS unsurprisingly rejects.Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1068432.
Please note: I think that this might actually be the first time that I fix a bug in a CFF font, so I'm not sure if the patch is the best possible solution, but it does work!
r? @brendandahl