rpms/ruby/F-8 ruby-1.8.6.230-string-str_buf_cat.patch, NONE, 1.1 ruby.spec, 1.106, 1.107
Akira TAGOH (tagoh)
fedora-extras-commits at redhat.com
Wed Jun 25 07:52:54 UTC 2008
Author: tagoh
Update of /cvs/pkgs/rpms/ruby/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12993
Modified Files:
ruby.spec
Added Files:
ruby-1.8.6.230-string-str_buf_cat.patch
Log Message:
* Wed Jun 25 2008 Akira TAGOH <tagoh at redhat.com> - 1.8.6.230-2
- Fix a segfault issue. (#452798)
ruby-1.8.6.230-string-str_buf_cat.patch:
--- NEW FILE ruby-1.8.6.230-string-str_buf_cat.patch ---
diff -pruN ruby-1.8.6-p230.orig/string.c ruby-1.8.6-p230/string.c
--- ruby-1.8.6-p230.orig/string.c 2008-06-20 18:24:53.000000000 +0900
+++ ruby-1.8.6-p230/string.c 2008-06-25 16:10:17.000000000 +0900
@@ -693,9 +693,13 @@ str_buf_cat(str, ptr, len)
const char *ptr;
long len;
{
- long capa, total;
+ long capa, total, off = -1;
rb_str_modify(str);
+ if (ptr >= RSTRING(str)->ptr && ptr <= RSTRING(str)->ptr + RSTRING(str)->len) {
+ off = ptr - RSTRING(str)->ptr;
+ }
+ if (len == 0) return 0;
if (FL_TEST(str, STR_ASSOC)) {
FL_UNSET(str, STR_ASSOC);
capa = RSTRING(str)->aux.capa = RSTRING(str)->len;
@@ -717,6 +721,9 @@ str_buf_cat(str, ptr, len)
}
RESIZE_CAPA(str, capa);
}
+ if (off != -1) {
+ ptr = RSTRING(str)->ptr + off;
+ }
memcpy(RSTRING(str)->ptr + RSTRING(str)->len, ptr, len);
RSTRING(str)->len = total;
RSTRING(str)->ptr[total] = '\0'; /* sentinel */
Index: ruby.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ruby/F-8/ruby.spec,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -r1.106 -r1.107
--- ruby.spec 24 Jun 2008 02:23:53 -0000 1.106
+++ ruby.spec 25 Jun 2008 07:52:10 -0000 1.107
@@ -12,7 +12,7 @@
Name: ruby
Version: %{rubyver}%{?dotpatchlevel}
-Release: 1%{?dist}
+Release: 2%{?dist}
License: Ruby or GPLv2
URL: http://www.ruby-lang.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -36,6 +36,7 @@
Patch22: ruby-deprecated-search-path.patch
Patch23: ruby-multilib.patch
Patch25: ruby-1.8.6.111-gcc43.patch
+Patch26: ruby-1.8.6.230-string-str_buf_cat.patch
Summary: An interpreter of object-oriented scripting language
Group: Development/Languages
@@ -156,6 +157,7 @@
%patch23 -p1
%endif
%patch25 -p1
+%patch26 -p1
popd
%build
@@ -512,6 +514,9 @@
%endif
%changelog
+* Wed Jun 25 2008 Akira TAGOH <tagoh at redhat.com> - 1.8.6.230-2
+- Fix a segfault issue. (#452798)
+
* Tue Jun 24 2008 Akira TAGOH <tagoh at redhat.com> - 1.8.6.230-1
- New upstream release.
- Security fixes. (#452293)
More information about the scm-commits
mailing list