1 From e6aa721cc0e5a48f408c52355559fd36780ba32a Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= <ingy@ingy.net>
3 Date: Fri, 28 Nov 2014 09:21:49 -0800
4 Subject: [PATCH] Fix for https://bitbucket.org/xi/libyaml/issue/10/
6 https://bitbucket.org/xi/libyaml/issue/10/wrapped-strings-cause-assert-failure
8 Commenting out the assert makes the scanner do the right thing and
9 results in just a simple parse failure.
11 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
13 src/scanner.c | 4 +++-
14 1 file changed, 3 insertions(+), 1 deletion(-)
16 diff --git a/src/scanner.c b/src/scanner.c
17 index 88d4fa5..c5f3d2f 100644
20 @@ -1110,7 +1110,9 @@ yaml_parser_save_simple_key(yaml_parser_t *parser)
21 * line. Therefore it is always allowed. But we add a check anyway.
24 - assert(parser->simple_key_allowed || !required); /* Impossible. */
26 + * https://bitbucket.org/xi/libyaml/issue/10/wrapped-strings-cause-assert-failure
27 + assert(parser->simple_key_allowed || !required); */ /* Impossible. */
30 * If the current position may start a simple key, save it.