mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Under MRB_INT64, width may be bigger than INT_MAX; fix #3665
This commit is contained in:
@@ -1034,6 +1034,9 @@ retry:
|
||||
if ((flags & FWIDTH) && need < width)
|
||||
need = width;
|
||||
|
||||
if (need < 0) {
|
||||
mrb_raise(mrb, E_ARGUMENT_ERROR, "width too big");
|
||||
}
|
||||
FILL(' ', need);
|
||||
if (flags & FMINUS) {
|
||||
if (sign)
|
||||
|
||||
Reference in New Issue
Block a user