summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngy döt Net <ingy@ingy.net>2014-11-28 09:21:49 -0800
committerIngy döt Net <ingy@ingy.net>2014-11-28 09:21:49 -0800
commite6aa721cc0e5a48f408c52355559fd36780ba32a (patch)
treec15e9052840f2c6dadfac5027f134f6a93618899
parenteebdd8b84defa1166f9fd0fc4b46258a47d94576 (diff)
downloadlibyaml-git-old/master.tar.gz
Fix for https://bitbucket.org/xi/libyaml/issue/10/old/master
https://bitbucket.org/xi/libyaml/issue/10/wrapped-strings-cause-assert-failure Commenting out the assert makes the scanner do the right thing and results in just a simple parse failure.
-rw-r--r--src/scanner.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/scanner.c b/src/scanner.c
index 88d4fa5..c5f3d2f 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -1110,7 +1110,9 @@ yaml_parser_save_simple_key(yaml_parser_t *parser)
* line. Therefore it is always allowed. But we add a check anyway.
*/
- assert(parser->simple_key_allowed || !required); /* Impossible. */
+ /* XXX This caused:
+ * https://bitbucket.org/xi/libyaml/issue/10/wrapped-strings-cause-assert-failure
+ assert(parser->simple_key_allowed || !required); */ /* Impossible. */
/*
* If the current position may start a simple key, save it.