mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Ensure that entries in the Differences array of Type1 fonts are either numbers or names
This patch is yet another installment in the (never ending) series of bugs in PDF files with non-embedded fonts. Fixes http://www.int.washington.edu/talks/WorkShops/int_08_37W/People/Franz_M/Franz.pdf.
This commit is contained in:
parent
62c3db0bf5
commit
4c2ad3bc7b
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