summaryrefslogtreecommitdiff
path: root/ext/psych/yaml/scanner.c
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-28 00:19:15 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-28 00:19:15 +0000
commite221c6cefc528c1c966fc1820882711d0ad7c898 (patch)
tree51e99d4a9cf04a96d3a96c94a9a223c6c51cad7f /ext/psych/yaml/scanner.c
parentfb3bd78725105b353ccd187b834a22c9d4586f26 (diff)
* ext/psych/lib/psych.rb: Merge psych-2.0.5. bump version to
libyaml-0.1.6 for CVE-2014-2525. * ext/psych/yaml/config.h: ditto. * ext/psych/yaml/scanner.c: ditto. * ext/psych/yaml/yaml_private.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 ea29a64b82..08ad8edb45 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;
}