ruby-changes:33030
From: naruse <ko1@a...>
Date: Sat, 22 Feb 2014 14:14:47 +0900 (JST)
Subject: [ruby-changes:33030] naruse:r45109 (ruby_2_1): merge revision(s) 44884: [Backport #9498]
naruse 2014-02-22 14:14:42 +0900 (Sat, 22 Feb 2014) New Revision: 45109 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45109 Log: merge revision(s) 44884: [Backport #9498] * lib/resolv.rb (Resolv::DNS::Message::MessageDecoder): Raise DecodeError if no data before the limit. Reported by Will Bryant. [ruby-core:60557] [Bug #9498] Modified directories: branches/ruby_2_1/ Modified files: branches/ruby_2_1/ChangeLog branches/ruby_2_1/lib/resolv.rb branches/ruby_2_1/version.h Index: ruby_2_1/ChangeLog =================================================================== --- ruby_2_1/ChangeLog (revision 45108) +++ ruby_2_1/ChangeLog (revision 45109) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1 +Sat Feb 22 14:07:04 2014 Tanaka Akira <akr@f...> + + * lib/resolv.rb (Resolv::DNS::Message::MessageDecoder): Raise + DecodeError if no data before the limit. + Reported by Will Bryant. [ruby-core:60557] [Bug #9498] + Sat Feb 22 13:49:30 2014 Shugo Maeda <shugo@r...> * vm_insnhelper.c (vm_call_method): should check ci->me->flag of Index: ruby_2_1/lib/resolv.rb =================================================================== --- ruby_2_1/lib/resolv.rb (revision 45108) +++ ruby_2_1/lib/resolv.rb (revision 45109) @@ -1520,6 +1520,7 @@ class Resolv https://github.com/ruby/ruby/blob/trunk/ruby_2_1/lib/resolv.rb#L1520 end def get_bytes(len = @limit - @index) + raise DecodeError.new("limit exceeded") if @limit < @index + len d = @data[@index, len] @index += len return d @@ -1547,6 +1548,7 @@ class Resolv https://github.com/ruby/ruby/blob/trunk/ruby_2_1/lib/resolv.rb#L1548 end def get_string + raise DecodeError.new("limit exceeded") if @limit <= @index len = @data[@index].ord raise DecodeError.new("limit exceeded") if @limit < @index + 1 + len d = @data[@index + 1, len] @@ -1570,6 +1572,7 @@ class Resolv https://github.com/ruby/ruby/blob/trunk/ruby_2_1/lib/resolv.rb#L1572 limit = @index if !limit || @index < limit d = [] while true + raise DecodeError.new("limit exceeded") if @limit <= @index case @data[@index].ord when 0 @index += 1 Index: ruby_2_1/version.h =================================================================== --- ruby_2_1/version.h (revision 45108) +++ ruby_2_1/version.h (revision 45109) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1 #define RUBY_VERSION "2.1.1" #define RUBY_RELEASE_DATE "2014-02-22" -#define RUBY_PATCHLEVEL 53 +#define RUBY_PATCHLEVEL 54 #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 2 Property changes on: ruby_2_1 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r44884 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/