summaryrefslogtreecommitdiff
path: root/ext/psych/yaml/scanner.c
diff options
context:
space:
mode:
authorSHIBATA Hiroshi <shibata.hiroshi@gmail.com>2014-03-27 09:31:04 +0900
committerSHIBATA Hiroshi <shibata.hiroshi@gmail.com>2014-03-27 09:33:35 +0900
commit52acb800a3a026c42063288e05cd883e8864dd4b (patch)
tree2d71145a8a9196b6bc619c4f4a6c3a5103ef615c /ext/psych/yaml/scanner.c
parent960d30ef5ac4ab93db199852fcd93f3cc3dfe1dd (diff)
downloadpsych-52acb800a3a026c42063288e05cd883e8864dd4b.zip
backport from libyaml-1.1.6
Diffstat (limited to 'ext/psych/yaml/scanner.c')
-rw-r--r--ext/psych/yaml/scanner.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/psych/yaml/scanner.c b/ext/psych/yaml/scanner.c
index ea29a64..08ad8ed 100644
--- a/ext/psych/yaml/scanner.c
+++ b/ext/psych/yaml/scanner.c
@@ -2629,6 +2629,9 @@ yaml_parser_scan_tag_uri(yaml_parser_t *parser, int directive,
/* Check if it is a URI-escape sequence. */
if (CHECK(parser->buffer, '%')) {
+ if (!STRING_EXTEND(parser, string))
+ goto error;
+
if (!yaml_parser_scan_uri_escapes(parser,
directive, start_mark, &string)) goto error;
}