From 2b9ec411d31299f0edcb570ed7554c94532145fe Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 28 Apr 2018 09:26:14 +1000 Subject: [PATCH] fix potential overflow in dump_regex --- src/regex_impl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/regex_impl.cc b/src/regex_impl.cc index 46ccbae0..f6d4dab0 100644 --- a/src/regex_impl.cc +++ b/src/regex_impl.cc @@ -998,7 +998,7 @@ String dump_regex(const CompiledRegex& program) int count = 0; for (auto& inst : program.instructions) { - char buf[10]; + char buf[20]; sprintf(buf, " %03d ", count++); res += buf; switch (inst.op)