[packages/rpm] Attempt to fix Segmentation Fault on i686

jajcus jajcus at pld-linux.org
Sat Nov 28 21:03:34 CET 2015


commit 7d0a808e900dee22893a34837bcf05165a89eac5
Author: Jacek Konieczny <jajcus at jajcus.net>
Date:   Sat Nov 28 21:02:34 2015 +0100

    Attempt to fix Segmentation Fault on i686

 do_not_write_before_macro_buffer.patch | 23 +++++++++++++++++++++++
 rpm.spec                               |  2 ++
 2 files changed, 25 insertions(+)
---
diff --git a/rpm.spec b/rpm.spec
index bb744a2..9e29de3 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -180,6 +180,7 @@ Patch90:	%{name}-cppcompat.patch
 Patch91:	py-disable-fetch.patch
 Patch92:	fast_python_deps.patch
 Patch93:	python2_explicit.patch
+Patch94:	do_not_write_before_macro_buffer.patch
 
 # Patches imported from Mandriva
 
@@ -1018,6 +1019,7 @@ cd -
 %patch83 -p1
 %patch92 -p1
 %patch93 -p1
+%patch94 -p1
 
 %patch1050 -p1
 
diff --git a/do_not_write_before_macro_buffer.patch b/do_not_write_before_macro_buffer.patch
new file mode 100644
index 0000000..44b2c41
--- /dev/null
+++ b/do_not_write_before_macro_buffer.patch
@@ -0,0 +1,23 @@
+diff -dur rpm-5.4.15.orig/rpmio/macro.c rpm-5.4.15/rpmio/macro.c
+--- rpm-5.4.15.orig/rpmio/macro.c	2015-11-28 20:47:15.000000000 +0100
++++ rpm-5.4.15/rpmio/macro.c	2015-11-28 20:51:05.634724202 +0100
+@@ -706,7 +706,9 @@
+     FILE *shf;
+     int rc;
+     int c;
++    char * start;
+ 
++    start = mb->t;
+     strncpy(buf, cmd, clen);
+     buf[clen] = '\0';
+     rc = expandU(mb, buf, bufn);
+@@ -720,7 +722,7 @@
+     (void) pclose(shf);
+ 
+     /* XXX delete trailing \r \n */
+-    while (iseol(mb->t[-1])) {
++    while (mb->t > start && iseol(mb->t[-1])) {
+ 	*(mb->t--) = '\0';
+ 	mb->nb++;
+     }
+Only in rpm-5.4.15/rpmio: macro.c~
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/7d0a808e900dee22893a34837bcf05165a89eac5



More information about the pld-cvs-commit mailing list