diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-19 13:52:42 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-19 13:52:42 +0000 |
| commit | 5dc2c3c889933b8a426c658f3792849f0b4b98a8 (patch) | |
| tree | 555d859d4b0bcaa7e2056a46e31f8d1aa3df6a06 | |
| parent | 5db2d745164db6c375edd86a5bb28eeb6041d7c0 (diff) | |
| download | ruby-5dc2c3c889933b8a426c658f3792849f0b4b98a8.tar.gz ruby-5dc2c3c889933b8a426c658f3792849f0b4b98a8.tar.xz ruby-5dc2c3c889933b8a426c658f3792849f0b4b98a8.zip | |
* error.c (syserr_initialize): need to allocate an additional byte
for NUL at the end. [ruby-dev:26574]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | error.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Tue Jul 19 22:47:29 2005 Yukihiro Matsumoto <matz@ruby-lang.org> + + * error.c (syserr_initialize): need to allocate an additional byte + for NUL at the end. [ruby-dev:26574] + Tue Jul 19 16:39:46 2005 Yukihiro Matsumoto <matz@ruby-lang.org> * io.c (rb_io_inspect): replace sprintf() with "%s" format all @@ -907,7 +907,7 @@ syserr_initialize(argc, argv, self) else err = "unknown error"; if (!NIL_P(mesg)) { VALUE str = mesg; - size_t len = strlen(err)+RSTRING(str)->len+3; + size_t len = strlen(err)+RSTRING(str)->len+4; StringValue(str); mesg = rb_str_new(0, len); snprintf(RSTRING(mesg)->ptr, len, "%s - %.*s", err, |
