summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-02-03 06:11:13 +0000
committerocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-02-03 06:11:13 +0000
commite4f1feac3e807e2e3790237749cfdb7a6104fd90 (patch)
tree2e0e4b9124c59caf66dfd08cb766682d8a9bdb78 /ext
parent69e975903783b20ddcf881dcc3e2aa45197a3f85 (diff)
* ext/syck/syck.c (syck_move_tokens): should reset p->cursor or etc
even if skip == 0. This causes buffer overrun. (ex: YAML.load('--- "..' + '\x82\xA0' * 511 + '"')) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/syck/syck.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/ext/syck/syck.c b/ext/syck/syck.c
index 33f9bf23e8..24a56a5e48 100644
--- a/ext/syck/syck.c
+++ b/ext/syck/syck.c
@@ -410,9 +410,6 @@ syck_move_tokens( SyckParser *p )
return 0;
skip = p->limit - p->token;
- if ( skip < 1 )
- return 0;
-
if ( ( count = p->token - p->buffer ) )
{
S_MEMMOVE( p->buffer, p->token, char, skip );