]> git.pld-linux.org Git - packages/rpm.git/blame - do_not_write_before_macro_buffer.patch
- rel 51; fix -Werror=trampolines option
[packages/rpm.git] / do_not_write_before_macro_buffer.patch
CommitLineData
ff1a99fc
ER
1http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2015-November/thread.html#24537
2
7d0a808e
JK
3--- rpm-5.4.15.orig/rpmio/macro.c 2015-11-28 20:47:15.000000000 +0100
4+++ rpm-5.4.15/rpmio/macro.c 2015-11-28 20:51:05.634724202 +0100
5@@ -706,7 +706,9 @@
6 FILE *shf;
7 int rc;
8 int c;
9+ char * start;
10
11+ start = mb->t;
12 strncpy(buf, cmd, clen);
13 buf[clen] = '\0';
14 rc = expandU(mb, buf, bufn);
15@@ -720,7 +722,7 @@
16 (void) pclose(shf);
17
18 /* XXX delete trailing \r \n */
19- while (iseol(mb->t[-1])) {
20+ while (mb->t > start && iseol(mb->t[-1])) {
21 *(mb->t--) = '\0';
22 mb->nb++;
23 }
This page took 0.023897 seconds and 4 git commands to generate.