summaryrefslogtreecommitdiff
path: root/ext/syck
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-08 06:03:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-08 06:03:35 +0000
commit3fb4d657d8006c8f2332053d7ff3a92695c60ca4 (patch)
tree5e7055eea0b962619203d13e967dad10b57d472d /ext/syck
parentc3c0468f33a217ad2540e403c92bf340687f4332 (diff)
* ext/syck/syck.c (syck_io_str_read): get rid of buffer overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/syck')
-rw-r--r--ext/syck/syck.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/syck/syck.c b/ext/syck/syck.c
index 8f46e85..ec4e7a1 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;