aboutsummaryrefslogtreecommitdiffstats
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 116dc5c55f..89d05ed14d 100644
--- a/io.c
+++ b/io.c
@@ -1098,7 +1098,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);
}