diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-20 01:08:13 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-20 01:08:13 +0000 |
commit | 2201229b4aebd2ebb08eae05ff197f0adfd4f4e5 (patch) | |
tree | 699d9b7a26df8a792c0358c6409240d233193dfe /variable.c | |
parent | 81ad8ec09648d1d2a591ef481a3fbb7cade260eb (diff) | |
download | ruby-2201229b4aebd2ebb08eae05ff197f0adfd4f4e5.tar.gz |
* variable.c (rb_class_path): need to adjust snprintf() len for
teminating NUL. [ruby-dev:26581]
* error.c (syserr_initialize): don't use str before StringValue()
check. [ruby-dev:26579]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/variable.c b/variable.c index 02483fe8af..1139b016ca 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); |