Ticket #20 (new defect)

Opened 2 years ago

weird characters in ArgumentError

Reported by: janek Owned by: somebody
Priority: minor Milestone:
Component: component1 Version:
Keywords: Cc:

Description

to demonstrate:

require 'yaml' YAML.load("a:\nbcd:") YAML.load("a:\nbcde:")

result: /usr/local/lib/ruby/1.8/yaml.rb:133:in load': syntax error on line 1, col 4: XXX' (ArgumentError?)

from /usr/local/lib/ruby/1.8/yaml.rb:133:in `load' from ./eof.rb:4

where XXX is in the first case "\x10" and in the second one "\x09\x10"

basically this is obviously wrong YAML, but tit seems like buffer overflow. Happens just when the second key is longer then the first by 2 or 3 chars. Less or more is fine.

Tried on ruby 1.8.5 (oneclick 21/win32), 1.8.4/(ubuntu dapper)

Note: See TracTickets for help on using tickets.