diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-08-07 08:10:12 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-08-07 08:10:12 +0000 |
commit | 88d1f04e9b40108c3662007882ebb58534cfd374 (patch) | |
tree | 743af3d87fbe7b3adbc9d6438cb13cd3f084ed1c | |
parent | 99bb7615ca36c79140c9bb7c902ca7f21a2897e1 (diff) |
* ext/syck/syck.c (syck_move_tokens): should avoid negative
memmove. [ruby-list:42625]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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; |