diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-11-18 16:53:12 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-11-18 16:53:12 +0000 |
commit | 94175959938eff1977b6895e98c626bae31788ac (patch) | |
tree | bc0247b40e9f718ba34f88a012d8b953576a58e8 /parse.y | |
parent | 30e97cbb8b4095250784cae859ba970413451f45 (diff) | |
download | bundler-94175959938eff1977b6895e98c626bae31788ac.tar.gz |
* parse.y (parser_read_escape): disallow control and meta modifiers
for non-ASCII characters. [ruby-core:13685]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -5140,7 +5140,7 @@ parser_read_escape(struct parser_params *parser, int flags, *has8bit = 1; return read_escape(flags|ESCAPE_META, &tmp, &tmp, encp) | 0x80; } - else if (c == -1) goto eof; + else if (c == -1 || !ISASCII(c)) goto eof; else { *has8bit = 1; return ((c & 0xff) | 0x80); @@ -5159,7 +5159,7 @@ parser_read_escape(struct parser_params *parser, int flags, } else if (c == '?') return 0177; - else if (c == -1) goto eof; + else if (c == -1 || !ISASCII(c)) goto eof; return c & 0x9f; eof: |