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 | a12b728745cf68dfda53dfa3e6b522ecd8fc7dcf (patch) | |
| tree | 743af3d87fbe7b3adbc9d6438cb13cd3f084ed1c | |
| parent | 09d8caf5f9dd2c8e64d69031c3c953c77849e0cc (diff) | |
| download | ruby-a12b728745cf68dfda53dfa3e6b522ecd8fc7dcf.tar.gz ruby-a12b728745cf68dfda53dfa3e6b522ecd8fc7dcf.tar.xz ruby-a12b728745cf68dfda53dfa3e6b522ecd8fc7dcf.zip | |
* ext/syck/syck.c (syck_move_tokens): should avoid negative
memmove. [ruby-list:42625]
git-svn-id: http://svn.ruby-lang.org/repos/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 24a56a5e4..a83c8813c 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; |
