1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

[OTS] Remove cntrmask instruction with no stem in charstring (bug 1529502)

This commit is contained in:
Calixte Denizet 2023-05-28 17:47:04 +02:00
parent 6d8810b55c
commit 78e6020a6e
4 changed files with 15 additions and 0 deletions

View file

@ -546,6 +546,13 @@ class CFFParser {
stackSize++;
} else if (value === 19 || value === 20) {
state.hints += stackSize >> 1;
if (state.hints === 0) {
// Not a valid value (see bug 1529502): just remove it.
data.copyWithin(j - 1, j, -1);
j -= 1;
length -= 1;
continue;
}
// skipping right amount of hints flag data
j += (state.hints + 7) >> 3;
stackSize %= 2;