diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/syck/syck.c | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Mon Aug 7 15:55:08 2006 Yukihiro Matsumoto <matz@ruby-lang.org> + + * ext/syck/syck.c (syck_move_tokens): should avoid negative + memmove. [ruby-list:42625] + Mon Aug 7 14:37:48 2006 Yukihiro Matsumoto <matz@ruby-lang.org> * configure.in, common.mk: AIX link issue. a patch from Yutaka diff --git a/ext/syck/syck.c b/ext/syck/syck.c index 24a56a5e48..a83c8813c1 100644 --- a/ext/syck/syck.c +++ b/ext/syck/syck.c @@ -412,7 +412,8 @@ syck_move_tokens( SyckParser *p ) skip = p->limit - p->token; if ( ( count = p->token - p->buffer ) ) { - S_MEMMOVE( p->buffer, p->token, char, skip ); + if (skip > 0) + S_MEMMOVE( p->buffer, p->token, char, skip ); p->token = p->buffer; p->marker -= count; p->cursor -= count; |