From bb928c555efb432f8bec0451e1cc0e8b5246ce7d Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 8 Dec 2003 06:03:35 +0000 Subject: * 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 --- ChangeLog | 4 ++++ ext/syck/syck.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 33bb1489a..33837ca0c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Dec 8 15:03:30 2003 Nobuyoshi Nakada + + * ext/syck/syck.c (syck_io_str_read): get rid of buffer overflow. + Mon Dec 8 13:02:11 2003 Minero Aoki * 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; -- cgit