Browse Source

Merge pull request #4366 from yurydelendik/max-fdefs

Rejects invalid fpgm table when too many functions
Yury Delendik 11 years ago
parent
commit
f04ebed579
  1. 5
      src/core/fonts.js

5
src/core/fonts.js

@ -3717,6 +3717,11 @@ var Font = (function FontClosure() { @@ -3717,6 +3717,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…
Cancel
Save