[subset-cff] Fix buffer size calculation

This commit is contained in:
Behdad Esfahbod 2022-12-01 20:11:34 -07:00
parent 015af5a8e5
commit a5616227ca
1 changed files with 1 additions and 1 deletions

View File

@ -981,7 +981,7 @@ struct subr_subsetter_t
if (opstr.op == OpCode_callsubr || opstr.op == OpCode_callgsubr)
size += 3;
}
if (!buff.alloc (size))
if (!buff.alloc (buff.length + size))
return false;
for (auto &opstr : str.values)