[前][次][番号順一覧][スレッド一覧]

ruby-changes:32897

From: nagachika <ko1@a...>
Date: Sat, 15 Feb 2014 23:59:22 +0900 (JST)
Subject: [ruby-changes:32897] nagachika:r44976 (ruby_2_0_0): merge revision(s) r44884: [Backport #9498]

nagachika	2014-02-15 23:59:17 +0900 (Sat, 15 Feb 2014)

  New Revision: 44976

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44976

  Log:
    merge revision(s) r44884: [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_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/lib/resolv.rb
    branches/ruby_2_0_0/version.h
Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 44975)
+++ ruby_2_0_0/ChangeLog	(revision 44976)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Sat Feb 15 23:58:31 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 15 23:46:31 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* parse.y (IDSET_ATTRSET_FOR_INTERN): fix off-by-one bug.
Index: ruby_2_0_0/lib/resolv.rb
===================================================================
--- ruby_2_0_0/lib/resolv.rb	(revision 44975)
+++ ruby_2_0_0/lib/resolv.rb	(revision 44976)
@@ -1489,6 +1489,7 @@ class Resolv https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/lib/resolv.rb#L1489
         end
 
         def get_bytes(len = @limit - @index)
+          raise DecodeError.new("limit exceeded") if @limit < @index + len
           d = @data[@index, len]
           @index += len
           return d
@@ -1516,6 +1517,7 @@ class Resolv https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/lib/resolv.rb#L1517
         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]
@@ -1539,6 +1541,7 @@ class Resolv https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/lib/resolv.rb#L1541
           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_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 44975)
+++ ruby_2_0_0/version.h	(revision 44976)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
 #define RUBY_RELEASE_DATE "2014-02-15"
-#define RUBY_PATCHLEVEL 410
+#define RUBY_PATCHLEVEL 411
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 2

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r44884


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]