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

ruby-changes:5789

From: shyouhei <ko1@a...>
Date: Sun, 15 Jun 2008 22:55:34 +0900 (JST)
Subject: [ruby-changes:5789] Ruby:r17296 (ruby_1_8_5): merge revision(s) 16400:

shyouhei	2008-06-15 22:52:58 +0900 (Sun, 15 Jun 2008)

  New Revision: 17296

  Modified files:
    branches/ruby_1_8_5/ChangeLog
    branches/ruby_1_8_5/string.c
    branches/ruby_1_8_5/version.h

  Log:
    merge revision(s) 16400:
    * string.c (rb_str_cat): fixed buffer overrun reported by
      Christopher Thompson <cthompson at nexopia.com> in [ruby-core:16746]


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_5/string.c?r1=17296&r2=17295&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_5/version.h?r1=17296&r2=17295&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_5/ChangeLog?r1=17296&r2=17295&diff_format=u

Index: ruby_1_8_5/ChangeLog
===================================================================
--- ruby_1_8_5/ChangeLog	(revision 17295)
+++ ruby_1_8_5/ChangeLog	(revision 17296)
@@ -1,3 +1,8 @@
+Sun Jun 15 22:52:24 2008  Yukihiro Matsumoto  <matz@r...>
+
+	* string.c (rb_str_cat): fixed buffer overrun reported by
+	  Christopher Thompson <cthompson at nexopia.com> in [ruby-core:16746]
+
 Sun Jun 15 22:50:34 2008  Yukihiro Matsumoto  <matz@r...>
 
 	* eval.c (is_defined): add NODE_OP_ASGN_{OR,AND}.  "defined?(a||=1)"
Index: ruby_1_8_5/version.h
===================================================================
--- ruby_1_8_5/version.h	(revision 17295)
+++ ruby_1_8_5/version.h	(revision 17296)
@@ -2,7 +2,7 @@
 #define RUBY_RELEASE_DATE "2008-06-15"
 #define RUBY_VERSION_CODE 185
 #define RUBY_RELEASE_CODE 20080615
-#define RUBY_PATCHLEVEL 207
+#define RUBY_PATCHLEVEL 208
 
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 8
Index: ruby_1_8_5/string.c
===================================================================
--- ruby_1_8_5/string.c	(revision 17295)
+++ ruby_1_8_5/string.c	(revision 17296)
@@ -744,7 +744,7 @@
     }
     if (FL_TEST(str, STR_ASSOC)) {
 	rb_str_modify(str);
-	REALLOC_N(RSTRING(str)->ptr, char, RSTRING(str)->len+len);
+	REALLOC_N(RSTRING(str)->ptr, char, RSTRING(str)->len+len+1);
 	memcpy(RSTRING(str)->ptr + RSTRING(str)->len, ptr, len);
 	RSTRING(str)->len += len;
 	RSTRING(str)->ptr[RSTRING(str)->len] = '\0'; /* sentinel */

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

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