diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-08 06:03:35 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-08 06:03:35 +0000 |
commit | bb928c555efb432f8bec0451e1cc0e8b5246ce7d (patch) | |
tree | 5e7055eea0b962619203d13e967dad10b57d472d | |
parent | 9c7debf2ef7d90b140e1e915c6374e4244b23df9 (diff) | |
download | ruby-bb928c555efb432f8bec0451e1cc0e8b5246ce7d.tar.gz ruby-bb928c555efb432f8bec0451e1cc0e8b5246ce7d.tar.xz ruby-bb928c555efb432f8bec0451e1cc0e8b5246ce7d.zip |
* ext/syck/syck.c (syck_io_str_read): get rid of buffer overflow.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ext/syck/syck.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Mon Dec 8 15:03:30 2003 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * ext/syck/syck.c (syck_io_str_read): get rid of buffer overflow. + Mon Dec 8 13:02:11 2003 Minero Aoki <aamine@loveruby.net> * lib/uri/common.rb: new method URI.regexp. [ruby-dev:22121] diff --git a/ext/syck/syck.c b/ext/syck/syck.c index 8f46e85ae..ec4e7a1ef 100644 --- a/ext/syck/syck.c +++ b/ext/syck/syck.c @@ -88,7 +88,7 @@ syck_io_str_read( char *buf, SyckIoStr *str, long max_size, long skip ) } if ( beg < str->ptr ) { - len = ( str->ptr - beg ) + 1; + len = ( str->ptr - beg ); S_MEMCPY( buf + skip, beg, char, len ); } len += skip; |