mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* re.c (unescape_nonascii): cast -1 for the case char is unsigned char.
If char is signed char, for example gcc for ARM or ppc64, it caused infinite loop. http://kmuto.jp/build-ruby/arm/ruby-trunk/log/20141106T013005Z.fail.html.gz http://rubyci.blob.core.windows.net/f19p8/ruby-trunk/log/20141106T090217Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8d00496911
commit
6a5cdfacbf
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
|||
Thu Nov 6 19:27:34 2014 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* re.c (unescape_nonascii): cast -1 for the case char is unsigned char.
|
||||
If char is signed char, for example gcc for ARM or ppc64, it caused
|
||||
infinite loop.
|
||||
http://kmuto.jp/build-ruby/arm/ruby-trunk/log/20141106T013005Z.fail.html.gz
|
||||
http://rubyci.blob.core.windows.net/f19p8/ruby-trunk/log/20141106T090217Z.fail.html.gz
|
||||
|
||||
Thu Nov 6 09:53:18 2014 Eric Wong <e@80x24.org>
|
||||
|
||||
* lib/uri/rfc2396_parser.rb (initialize): reduce bytecode size
|
||||
|
|
2
re.c
2
re.c
|
@ -2286,7 +2286,7 @@ unescape_nonascii(const char *p, const char *end, rb_encoding *enc,
|
|||
p = p-2;
|
||||
if (enc == rb_usascii_encoding()) {
|
||||
c = read_escaped_byte(&p, end, err);
|
||||
if (c == -1) return -1;
|
||||
if (c == (char)-1) return -1;
|
||||
rb_str_buf_cat(buf, &c, 1);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Reference in a new issue