Skip to content
Snippets Groups Projects
Commit 3862bd62df1c authored by Kirill Simonov's avatar Kirill Simonov
Browse files

Force a new line at the end of the input stream even if there are no a new...

Force a new line at the end of the input stream even if there are no a new line character. This fixes a nasty bug when libyaml hangs on documents like `[[[[`. Thanks ciaranm for reporting the bug.
parent 50e9712dd711
No related branches found
No related tags found
No related merge requests found
......@@ -1324,6 +1324,13 @@
{
yaml_token_t token;
/* Force new line. */
if (parser->mark.column != 0) {
parser->mark.column = 0;
parser->mark.line ++;
}
/* Reset the indentation level. */
if (!yaml_parser_unroll_indent(parser, -1))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment