]> git.pld-linux.org Git - packages/rpm.git/commitdiff
Attempt to fix Segmentation Fault on i686
authorJacek Konieczny <jajcus@jajcus.net>
Sat, 28 Nov 2015 20:02:34 +0000 (21:02 +0100)
committerJacek Konieczny <jajcus@jajcus.net>
Sat, 28 Nov 2015 20:02:34 +0000 (21:02 +0100)
do_not_write_before_macro_buffer.patch [new file with mode: 0644]
rpm.spec

diff --git a/do_not_write_before_macro_buffer.patch b/do_not_write_before_macro_buffer.patch
new file mode 100644 (file)
index 0000000..44b2c41
--- /dev/null
@@ -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~
index bb744a2ed69d65efde688393af1e3471b322b858..9e29de3ca2144be45ad2e151f2bf58ba1098117e 100644 (file)
--- 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
 
This page took 0.134821 seconds and 4 git commands to generate.