on master help sign in
Upgrade to libyaml-0.1.7
3e93a7fMichael Snoyman
ChangeLog.md+4
@@ -1,3 +1,7 @@
1+## 0.8.20
2+
3+* Upgrade to libyaml 0.1.7
4+
1## 0.8.19.0
5## 0.8.19.0
2
6
3* Add `Data.Yaml.TH` module
7* Add `Data.Yaml.TH` module
libyaml/api.c+1−1
@@ -424,7 +424,7 @@ yaml_string_write_handler(void *data, unsigned char *buffer, size_t size)
424{
424{
425 yaml_emitter_t *emitter = data;
425 yaml_emitter_t *emitter = data;
426
426
427− if (emitter->output.string.size + *emitter->output.string.size_written
427+ if (emitter->output.string.size - *emitter->output.string.size_written
428 < size) {
428 < size) {
429 memcpy(emitter->output.string.buffer
429 memcpy(emitter->output.string.buffer
430 + *emitter->output.string.size_written,
430 + *emitter->output.string.size_written,
libyaml/scanner.c+3−7
@@ -1105,13 +1105,6 @@ yaml_parser_save_simple_key(yaml_parser_t *parser)
1105 int required = (!parser->flow_level
1105 int required = (!parser->flow_level
1106 && parser->indent == (ptrdiff_t)parser->mark.column);
1106 && parser->indent == (ptrdiff_t)parser->mark.column);
1107
1107
1108− /*
1109− * A simple key is required only when it is the first token in the current
1110− * line. Therefore it is always allowed. But we add a check anyway.
1111− */
1112−
1113− assert(parser->simple_key_allowed || !required); /* Impossible. */
1114−
1115 /*
1108 /*
1116 * If the current position may start a simple key, save it.
1109 * If the current position may start a simple key, save it.
1117 */
1110 */
@@ -2629,6 +2622,9 @@ yaml_parser_scan_tag_uri(yaml_parser_t *parser, int directive,
2629 /* Check if it is a URI-escape sequence. */
2622 /* Check if it is a URI-escape sequence. */
2630
2623
2631 if (CHECK(parser->buffer, '%')) {
2624 if (CHECK(parser->buffer, '%')) {
2625+ if (!STRING_EXTEND(parser, string))
2626+ goto error;
2627+
2632 if (!yaml_parser_scan_uri_escapes(parser,
2628 if (!yaml_parser_scan_uri_escapes(parser,
2633 directive, start_mark, &string)) goto error;
2629 directive, start_mark, &string)) goto error;
2634 }
2630 }
libyaml/yaml_private.h+7−4
@@ -143,9 +143,12 @@ yaml_string_join(
143 (string).start = (string).pointer = (string).end = 0)
143 (string).start = (string).pointer = (string).end = 0)
144
144
145#define STRING_EXTEND(context,string) \
145#define STRING_EXTEND(context,string) \
146− (((string).pointer+5 < (string).end) \
146+ ((((string).pointer+5 < (string).end) \
147 || yaml_string_extend(&(string).start, \
147 || yaml_string_extend(&(string).start, \
148− &(string).pointer, &(string).end))
148+ &(string).pointer, &(string).end)) ? \
149+ 1 : \
150+ ((context)->error = YAML_MEMORY_ERROR, \
151+ 0))
149
152
150#define CLEAR(context,string) \
153#define CLEAR(context,string) \
151 ((string).pointer = (string).start, \
154 ((string).pointer = (string).start, \
@@ -655,7 +658,7 @@ yaml_queue_extend(void **start, void **head, void **tail, void **end);
655 (node).data.mapping.pairs.top = (node_pairs_start), \
658 (node).data.mapping.pairs.top = (node_pairs_start), \
656 (node).data.mapping.style = (node_style))
659 (node).data.mapping.style = (node_style))
657
660
658−#define YAML_VERSION_STRING "0.1.5"
661+#define YAML_VERSION_STRING "0.1.7"
659#define YAML_VERSION_MAJOR 0
662#define YAML_VERSION_MAJOR 0
660#define YAML_VERSION_MINOR 1
663#define YAML_VERSION_MINOR 1
661−#define YAML_VERSION_PATCH 5
664+#define YAML_VERSION_PATCH 7
yaml.cabal+1−1
@@ -1,5 +1,5 @@
1name: yaml
1name: yaml
2−version: 0.8.19.0
2+version: 0.8.20
3license: BSD3
3license: BSD3
4license-file: LICENSE
4license-file: LICENSE
5author: Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov
5author: Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov