]> git.pld-linux.org Git - packages/rpm.git/blob - do_not_write_before_macro_buffer.patch
- rel 45; define _GNU_SOURCE in rpmio.h
[packages/rpm.git] / do_not_write_before_macro_buffer.patch
1 http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2015-November/thread.html#24537
2
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.027715 seconds and 3 git commands to generate.