From 238704592a82654f96906aec0ad6e334380e5bf5 Mon Sep 17 00:00:00 2001 From: "MATSUMOTO, Ryosuke" Date: Mon, 19 Oct 2015 19:24:39 +0900 Subject: Fix buffer overflow of `pos` when file-size is too big --- src/io.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/io.c b/src/io.c index 1d2f98f3c..d9adb2864 100644 --- a/src/io.c +++ b/src/io.c @@ -525,8 +525,7 @@ mrb_value mrb_io_sysseek(mrb_state *mrb, mrb_value io) { struct mrb_io *fptr; - int pos; - mrb_int offset, whence = -1; + mrb_int pos, offset, whence = -1; mrb_get_args(mrb, "i|i", &offset, &whence); if (whence < 0) { -- cgit v1.2.3