mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Prevent overflow of Fixnum#to_s.
This commit is contained in:
+1
-1
@@ -1160,7 +1160,7 @@ fix_minus(mrb_state *mrb, mrb_value self)
|
||||
mrb_value
|
||||
mrb_fix2str(mrb_state *mrb, mrb_value x, int base)
|
||||
{
|
||||
char buf[64], *b = buf + sizeof buf;
|
||||
char buf[sizeof(mrb_int)*CHAR_BIT+2], *b = buf + sizeof buf;
|
||||
mrb_int val = mrb_fixnum(x);
|
||||
int neg = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user