CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Initial import
[pkgutils-cross.git] / libtar-1.2.11-fix_mem_leak.patch
CommitLineData
9ac667e6
SR
1diff -ru libtar-1.2.11/lib/decode.c libtar-1.2.11-new/lib/decode.c
2--- libtar-1.2.11/lib/decode.c 2003-01-07 02:40:59.000000000 +0100
3+++ libtar-1.2.11-new/lib/decode.c 2003-10-03 15:02:44.000000000 +0200
4@@ -26,7 +26,7 @@
5 char *
6 th_get_pathname(TAR *t)
7 {
8- char filename[MAXPATHLEN];
9+ static char filename[MAXPATHLEN];
10
11 if (t->th_buf.gnu_longname)
12 return t->th_buf.gnu_longname;
13@@ -35,11 +35,11 @@
14 {
15 snprintf(filename, sizeof(filename), "%.155s/%.100s",
16 t->th_buf.prefix, t->th_buf.name);
17- return strdup(filename);
18+ return filename;
19 }
20
21 snprintf(filename, sizeof(filename), "%.100s", t->th_buf.name);
22- return strdup(filename);
23+ return filename;
24 }
25
26