aboutsummaryrefslogtreecommitdiffstats
path: root/packages/opkg/files/opkg_unarchive.patch
blob: 98da039da4a13c69889bbc98d24a5f8615483250 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- trunk/libbb/unarchive.c	(revision 160)
+++ trunk/libbb/unarchive.c	(working copy)
@@ -600,12 +600,16 @@
                 linkname = NULL;
         } else
 #endif
-        if (tar.formated.prefix[0] == 0) {
-                tar_entry->name = strdup(tar.formated.name);
-        } else {                                              
-                tar_entry->name = concat_path_file(tar.formated.prefix, tar.formated.name);
-        }
+	{
+		tar_entry->name = strndup(tar.formated.name,100);
 
+		if (tar.formated.prefix[0]) {
+			char *temp = tar_entry->name;
+			tar_entry->name = concat_path_file(tar.formated.prefix, temp);
+			free(temp);
+		}
+	}
+
 	// tar_entry->name = xstrdup(tar.formated.name);
 
 /*