Check return value from snprintf(); ref
MODIFY
mrbgems/mruby-sprintf/src/sprintf.c
mrbgems/mruby-sprintf/src/sprintf.c
@@ -1087,6 +1087,9 @@ retry:
CHECK(need);
n = snprintf(&buf[blen], need, fbuf, fval);
+ if (n < 0) {
+ mrb_raise(mrb, E_RUNTIME_ERROR, "formatting error");
+ }
blen += n;
}
break;

Check return value from snprintf(); ref #3498