mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Rejects invalid fpgm table when too many functions
This commit is contained in:
parent
1824326995
commit
adca8d4291
1 changed files with 5 additions and 0 deletions
|
@ -3707,6 +3707,11 @@ var Font = (function FontClosure() {
|
|||
if (ttContext.tooComplexToFollowFunctions) {
|
||||
return;
|
||||
}
|
||||
if (ttContext.functionsDefined.length > maxFunctionDefs) {
|
||||
warn('TT: more functions defined than expected');
|
||||
ttContext.hintsValid = false;
|
||||
return;
|
||||
}
|
||||
for (var j = 0, jj = ttContext.functionsUsed.length; j < jj; j++) {
|
||||
if (j > maxFunctionDefs) {
|
||||
warn('TT: invalid function id: ' + j);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue