Blame SOURCES/libtar-1.2.11-mem-deref.patch

1199b1
--- libtar-1.2.11/lib/libtar.h.deref	2009-12-30 16:37:03.790121122 +0100
1199b1
+++ libtar-1.2.11/lib/libtar.h	2009-12-30 16:37:35.521246633 +0100
1199b1
@@ -172,6 +172,7 @@ int th_write(TAR *t);
1199b1
 #define TH_ISDIR(t)	((t)->th_buf.typeflag == DIRTYPE \
1199b1
 			 || S_ISDIR((mode_t)oct_to_int((t)->th_buf.mode)) \
1199b1
 			 || ((t)->th_buf.typeflag == AREGTYPE \
1199b1
+			     && strlen((t)->th_buf.name) \
1199b1
 			     && ((t)->th_buf.name[strlen((t)->th_buf.name) - 1] == '/')))
1199b1
 #define TH_ISFIFO(t)	((t)->th_buf.typeflag == FIFOTYPE \
1199b1
 			 || S_ISFIFO((mode_t)oct_to_int((t)->th_buf.mode)))
1199b1
--- libtar-1.2.11/lib/util.c.deref	2003-01-07 02:41:00.000000000 +0100
1199b1
+++ libtar-1.2.11/lib/util.c	2009-12-30 17:35:51.860121660 +0100
1199b1
@@ -133,9 +133,7 @@ oct_to_int(char *oct)
1199b1
 {
1199b1
 	int i;
1199b1
 
1199b1
-	sscanf(oct, "%o", &i);
1199b1
-
1199b1
-	return i;
1199b1
+	return sscanf(oct, "%o", &i) == 1 ? i : 0;
1199b1
 }
1199b1
 
1199b1
 
1199b1