fix potential overflow in dump_regex
This commit is contained in:
parent
72bf881488
commit
2b9ec411d3
|
@ -998,7 +998,7 @@ String dump_regex(const CompiledRegex& program)
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (auto& inst : program.instructions)
|
for (auto& inst : program.instructions)
|
||||||
{
|
{
|
||||||
char buf[10];
|
char buf[20];
|
||||||
sprintf(buf, " %03d ", count++);
|
sprintf(buf, " %03d ", count++);
|
||||||
res += buf;
|
res += buf;
|
||||||
switch (inst.op)
|
switch (inst.op)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user