majintao0131 / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

Potential out-of-bounds memory read #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Read a YAML file

What is the expected output? What do you see instead?

Expected output is successful read of YAML file.
Out of bounds memory access on line 170 of scanner.cpp

What version of the product are you using? On what operating system?

Latest - running with electric fence on Linux.

Please provide any additional information below.

Line 170 of scanner.cpp should be changed to include a check that the input
is still in a valid state:

-           while(IsWhitespaceToBeEaten(INPUT.peek()))
+           while( INPUT && IsWhitespaceToBeEaten(INPUT.peek()))

Original issue reported on code.google.com by n.vaug...@gmail.com on 31 Jul 2009 at 10:31

GoogleCodeExporter commented 9 years ago
Thanks, patched!

Original comment by jbe...@gmail.com on 31 Jul 2009 at 6:27