diff --git a/src/core/cff_parser.js b/src/core/cff_parser.js index d61a7f514..c1ce00c9c 100644 --- a/src/core/cff_parser.js +++ b/src/core/cff_parser.js @@ -1383,7 +1383,13 @@ class CFFCompiler { data: [], length: 0, add(data) { - this.data = this.data.concat(data); + if (data.length <= 65536) { + // The number of arguments is limited, hence we just take 65536 as + // limit because it isn't too high or too low. + this.data.push(...data); + } else { + this.data = this.data.concat(data); + } this.length = this.data.length; }, };