summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-07-20 01:09:54 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-07-20 01:09:54 +0000
commitba229f40559da6810dd27f4ff970ad29d7b67259 (patch)
tree761073462f95269dc9da7bf70758e08f3169c593 /variable.c
parent48014442b6e272488ac1df286d86a3dc8040d2b4 (diff)
downloadruby-ba229f40559da6810dd27f4ff970ad29d7b67259.tar.gz
* variable.c (rb_class_path): need to adjust snprintf() len for
teminating NUL. [ruby-dev:26581] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/variable.c b/variable.c
index 7e56e8df89..34a978f253 100644
--- a/variable.c
+++ b/variable.c
@@ -208,7 +208,7 @@ rb_class_path(klass)
}
len = 2 + strlen(s) + 3 + 2 * SIZEOF_LONG + 1;
path = rb_str_new(0, len);
- snprintf(RSTRING(path)->ptr, len, "#<%s:0x%lx>", s, klass);
+ snprintf(RSTRING(path)->ptr, len+1, "#<%s:0x%lx>", s, klass);
RSTRING(path)->len = strlen(RSTRING(path)->ptr);
rb_ivar_set(klass, tmp_classpath, path);