[subset-cff] Fix buffer size calculation
This commit is contained in:
parent
015af5a8e5
commit
a5616227ca
|
@ -981,7 +981,7 @@ struct subr_subsetter_t
|
||||||
if (opstr.op == OpCode_callsubr || opstr.op == OpCode_callgsubr)
|
if (opstr.op == OpCode_callsubr || opstr.op == OpCode_callgsubr)
|
||||||
size += 3;
|
size += 3;
|
||||||
}
|
}
|
||||||
if (!buff.alloc (size))
|
if (!buff.alloc (buff.length + size))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (auto &opstr : str.values)
|
for (auto &opstr : str.values)
|
||||||
|
|
Loading…
Reference in New Issue