mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Merge pull request #5815 from Snuffleupagus/type1-diff-refs
Ensure that entries in the Differences array of Type1 fonts are either numbers or names
This commit is contained in:
commit
6d2d854f65
4 changed files with 96 additions and 1 deletions
|
@ -1284,8 +1284,13 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
|||
var data = diffEncoding[j];
|
||||
if (isNum(data)) {
|
||||
index = data;
|
||||
} else {
|
||||
} else if (isName(data)) {
|
||||
differences[index++] = data.name;
|
||||
} else if (isRef(data)) {
|
||||
diffEncoding[j--] = xref.fetch(data);
|
||||
continue;
|
||||
} else {
|
||||
error('Invalid entry in \'Differences\' array: ' + data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue