Check return value from snprintf(); ref #3498

parent f9ed15d8
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment