1 |
vapier 08/09/29 06:05:56 |
2 |
|
3 |
Modified: scanelf.c |
4 |
Log: |
5 |
fix by Fabian Groffen to make sure default output format starts off initialized before we start strcating it #236539 |
6 |
|
7 |
Revision Changes Path |
8 |
1.194 pax-utils/scanelf.c |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/scanelf.c?rev=1.194&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/scanelf.c?rev=1.194&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/scanelf.c?r1=1.193&r2=1.194 |
13 |
|
14 |
Index: scanelf.c |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v |
17 |
retrieving revision 1.193 |
18 |
retrieving revision 1.194 |
19 |
diff -u -r1.193 -r1.194 |
20 |
--- scanelf.c 29 Sep 2008 06:03:26 -0000 1.193 |
21 |
+++ scanelf.c 29 Sep 2008 06:05:55 -0000 1.194 |
22 |
@@ -1,13 +1,13 @@ |
23 |
/* |
24 |
* Copyright 2003-2007 Gentoo Foundation |
25 |
* Distributed under the terms of the GNU General Public License v2 |
26 |
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.193 2008/09/29 06:03:26 vapier Exp $ |
27 |
+ * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.194 2008/09/29 06:05:55 vapier Exp $ |
28 |
* |
29 |
* Copyright 2003-2007 Ned Ludd - <solar@g.o> |
30 |
* Copyright 2004-2007 Mike Frysinger - <vapier@g.o> |
31 |
*/ |
32 |
|
33 |
-static const char *rcsid = "$Id: scanelf.c,v 1.193 2008/09/29 06:03:26 vapier Exp $"; |
34 |
+static const char *rcsid = "$Id: scanelf.c,v 1.194 2008/09/29 06:05:55 vapier Exp $"; |
35 |
const char * const argv0 = "scanelf"; |
36 |
|
37 |
#include "paxinc.h" |
38 |
@@ -1906,6 +1906,7 @@ |
39 |
} else { |
40 |
size_t fmt_len = 30; |
41 |
out_format = xmalloc(sizeof(char) * fmt_len); |
42 |
+ *out_format = '\0'; |
43 |
if (!be_quiet) xstrcat(&out_format, "%o ", &fmt_len); |
44 |
if (show_pax) xstrcat(&out_format, "%x ", &fmt_len); |
45 |
if (show_perms) xstrcat(&out_format, "%O ", &fmt_len); |