From 50629ec6db106e2399181bdecb618111ebbf339f Mon Sep 17 00:00:00 2001 From: why Date: Mon, 1 Dec 2003 15:45:54 +0000 Subject: [PATCH] * ext/syck/syck.c: string buffering bug. decrementing by full max_size now. [ruby-core:01834] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 23 ++++++++++++++--------- ext/syck/syck.c | 2 +- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9fd573f729..ee9ec24606 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Dec 2 00:43:00 2003 why the lucky stiff + + * ext/syck/syck.c: string buffering bug. decrementing by full + max_size now. [ruby-core:01834] + Mon Dec 1 21:33:08 2003 Yukihiro Matsumoto * numeric.c (num_sadded): prohibit singleton method definition for @@ -187,7 +192,7 @@ Wed Nov 26 15:38:47 2003 WATANABE Hirofumi * test/fileutils/test_fileutils.rb (test_ln_s): should take the existing symbolic link for OpenBSD. -Wed Nov 26 04:48:42 2003 why the lucky stiff +Wed Nov 26 04:48:42 2003 why the lucky stiff * ext/syck/token.c: removed YYTOKTMP references which were causing buffer overflows on large block scalars, @@ -1033,7 +1038,7 @@ Thu Oct 30 23:19:11 2003 NAKAMURA, Hiroshi * test/soap/calc/test_calc_cgi.rb: take over $DEBUG to ruby process through CGI. -Thu Oct 30 22:59:39 2003 why the lucky stiff +Thu Oct 30 22:59:39 2003 why the lucky stiff * ext/syck/yaml2byte.c: HASH const too long. Thanks, matz. @@ -1272,7 +1277,7 @@ Sat Oct 18 23:01:32 2003 WATANABE Hirofumi * missing/acosh.c (DBL_MANT_DIG): typo fix(ifdef -> ifndef). -Sat Oct 18 05:48:59 2003 why the lucky stiff +Sat Oct 18 05:48:59 2003 why the lucky stiff * ext/syck/rubyext.c: YAML::Syck::compile method. @@ -1390,7 +1395,7 @@ Wed Oct 15 09:30:34 2003 NAKAMURA Usaku * ext/syck/syck.h: include stdio.h for definition of FILE. -Wed Oct 15 08:09:07 2003 why the lucky stiff +Wed Oct 15 08:09:07 2003 why the lucky stiff * ext/syck/bytecode.c: Checkin of YAML bytecode support. @@ -1938,7 +1943,7 @@ Sat Oct 4 07:33:00 2003 Nathaniel Talbott * test/testunit/collector/test_objectspace.rb: ditto. -Sat Oct 4 04:48:49 2003 why the lucky stiff +Sat Oct 4 04:48:49 2003 why the lucky stiff * ext/syck/rubyext.c: default keys handled. @@ -2978,7 +2983,7 @@ Thu Sep 4 15:40:07 2003 NAKAMURA, Hiroshi * test/csv/test_csv.rb: run on test/unit original layer. -Thu Sep 4 12:54:50 2003 why the lucky stiff +Thu Sep 4 12:54:50 2003 why the lucky stiff * ext/syck/token.c: headerless documents with root-level spacing now honored. @@ -3223,7 +3228,7 @@ Tue Aug 26 20:03:50 2003 Nobuyoshi Nakada * lib/mkmf.rb (create_tmpsrc): add the hook for source. [ruby-list:38122] -Tue Aug 26 15:59:53 2003 why the lucky stiff +Tue Aug 26 15:59:53 2003 why the lucky stiff * implicit.c (syck_type_id_to_taguri): corrected detection of x-private types. @@ -3268,7 +3273,7 @@ Fri Aug 22 17:07:05 2003 Yukihiro Matsumoto * string.c (rb_str_scan): use rb_yield_splat(). -Fri Aug 22 06:13:22 2003 why the lucky stiff +Fri Aug 22 06:13:22 2003 why the lucky stiff * ext/syck/rubyext.c: refactoring of the transfer method dispatch. added yaml_org_handler for faster dispatch of @@ -3295,7 +3300,7 @@ Wed Aug 20 16:44:49 2003 Nobuyoshi Nakada * ext/socket/socket.c (ruby_connect): many systems seem to have a problem in select() after EINPROGRESS. [ruby-list:38080] -Wed Aug 20 01:31:17 2003 why the lucky stiff +Wed Aug 20 01:31:17 2003 why the lucky stiff * ext/syck/syck.h: Parser definition problems on HP-UX. [ruby-talk:79389] diff --git a/ext/syck/syck.c b/ext/syck/syck.c index c9aad7a8a5..8f46e85ae0 100644 --- a/ext/syck/syck.c +++ b/ext/syck/syck.c @@ -72,7 +72,7 @@ syck_io_str_read( char *buf, SyckIoStr *str, long max_size, long skip ) { max_size -= skip; if ( max_size <= 0 ) max_size = 0; - else str->ptr += max_size - 1; + else str->ptr += max_size; if ( str->ptr > str->end ) {