summaryrefslogtreecommitdiff
path: root/extra/libtar/libtar-1.2.11-tar_header.patch
blob: 161f7da7b52eecafb7dd8ed7c140d9e52b92a2f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff -Naur libtar-1.2.11/lib/encode.c libtar-1.2.11.tar_header/lib/encode.c
--- libtar-1.2.11/lib/encode.c	2003-01-07 07:10:59.000000000 +0530
+++ libtar-1.2.11.tar_header/lib/encode.c	2009-11-20 11:13:25.166756167 +0530
@@ -30,7 +30,10 @@
 	int i, sum = 0;
 
 	if (t->options & TAR_GNU)
-		strncpy(t->th_buf.magic, "ustar  ", 8);
+	{
+		memcpy(t->th_buf.magic, "ustar ", 6);
+		memcpy(t->th_buf.version, " \0", 2);
+	}
 	else
 	{
 		strncpy(t->th_buf.version, TVERSION, TVERSLEN);