RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Anders F. Björklund
Root: /v/rpm/cvs Email: afb@rpm5.org
Module: xar Date: 15-Sep-2007 09:17:44
Branch: HEAD Handle: 2007091508174400
Modified files:
xar/src xar.c
Log:
strdup literals to avoid bad free
Summary:
Revision Changes Path
1.5 +2 -2 xar/src/xar.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: xar/src/xar.c
============================================================================
$ cvs diff -u -r1.4 -r1.5 xar.c
--- xar/src/xar.c 15 Sep 2007 07:16:34 -0000 1.4
+++ xar/src/xar.c 15 Sep 2007 07:17:44 -0000 1.5
@@ -108,11 +108,11 @@
mode_t m;
xar_prop_get(f, "mode", &mode);
if( mode == NULL )
- return "??????????";
+ return strdup("??????????");
errno = 0;
m = strtoll(mode, 0, 8);
if( errno )
- return "??????????";
+ return strdup("??????????");
ret = calloc(11,1);
memset(ret, '-', 10);
@@ .
Received on Sat Sep 15 09:17:44 2007