Subversion Repositories libtar

Compare Revisions

Ignore whitespace Rev 37 → Rev 38

/trunk/debian/changelog
1,3 → 1,12
libtar (1.2.20-5) unstable; urgency=low
 
* oldgnu_prefix.patch: Detect old-style GNU headers correctly (Closes:
#763119). Those appear in incremental archives and use the bytes that
the new-style headers use for the prefix field for other fields.
Thanks to Steinar H. Gunderson.
 
-- Magnus Holmgren <holmgren@debian.org> Sun, 12 Oct 2014 21:45:42 +0200
 
libtar (1.2.20-4) unstable; urgency=high
 
* no_maxpathlen.patch: Half of the part of the patch modifying
/trunk/debian/patches/oldgnu_prefix.patch
0,0 → 1,21
Description: Detect old-style GNU headers correctly
Author: Steinar H. Gunderson <sesse@debian.org>
 
--- libtar-1.2.20.orig/lib/decode.c
+++ libtar-1.2.20/lib/decode.c
@@ -69,7 +69,14 @@ th_get_pathname(TAR *t)
return NULL;
}
- if (t->th_buf.prefix[0] == '\0')
+ /*
+ * Old GNU headers (also used by newer GNU tar when doing incremental
+ * dumps) use the POSIX prefix field for many other things, such as
+ * mtime and ctime. New-style GNU headers don't, but also don't use the
+ * POSIX prefix field. Thus, only honor the prefix field if the archive
+ * is actually a POSIX archive. This is the same logic as GNU tar uses.
+ */
+ if (strncmp(t->th_buf.magic, TMAGIC, TMAGLEN - 1) != 0 || t->th_buf.prefix[0] == '\0')
{
sprintf(t->th_pathname, "%.100s", t->th_buf.name);
}
/trunk/debian/patches/series
2,3 → 2,4
no_maxpathlen.patch
CVE-2013-4420.patch
th_get_size-unsigned-int.patch
oldgnu_prefix.patch