mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #7300 from Snuffleupagus/bug-1068432
Prevent adding invalid values in `CFFDict_setByKey` (bug 1068432)
This commit is contained in:
commit
b86610ffdb
5 changed files with 22 additions and 0 deletions
|
@ -995,6 +995,11 @@ var CFFDict = (function CFFDictClosure() {
|
|||
// remove the array wrapping these types of values
|
||||
if (type === 'num' || type === 'sid' || type === 'offset') {
|
||||
value = value[0];
|
||||
// Ignore invalid values (fixes bug 1068432).
|
||||
if (isNaN(value)) {
|
||||
warn('Invalid CFFDict value: ' + value + ', for key: ' + key + '.');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
this.values[key] = value;
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue