Commit 23870459 authored by MATSUMOTO, Ryosuke's avatar MATSUMOTO, Ryosuke

Fix buffer overflow of `pos` when file-size is too big

parent e724c5af
...@@ -525,8 +525,7 @@ mrb_value ...@@ -525,8 +525,7 @@ mrb_value
mrb_io_sysseek(mrb_state *mrb, mrb_value io) mrb_io_sysseek(mrb_state *mrb, mrb_value io)
{ {
struct mrb_io *fptr; struct mrb_io *fptr;
int pos; mrb_int pos, offset, whence = -1;
mrb_int offset, whence = -1;
mrb_get_args(mrb, "i|i", &offset, &whence); mrb_get_args(mrb, "i|i", &offset, &whence);
if (whence < 0) { if (whence < 0) {
......
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