1
0
Fork 0
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:
Jonas Jenwald 2015-05-07 22:33:23 +02:00
commit 6d2d854f65
4 changed files with 96 additions and 1 deletions

View file

@ -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);
}
}
}