summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index c94109e112..746add0025 100644
--- a/io.c
+++ b/io.c
@@ -952,7 +952,7 @@ rb_io_inspect(obj)
len += 9;
}
buf = ALLOCA_N(char, len);
- sprintf(buf, "#<%s:%s%s>", cname, fptr->path, st);
+ snprintf(buf, len, "#<%s:%s%s>", cname, fptr->path, st);
return rb_str_new2(buf);
}