summaryrefslogtreecommitdiffhomepage
path: root/archival/tar.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-03-03 20:06:59 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-03-03 20:06:59 +0000
commitdcbd51dd2874164b693fc7133a07714c8ea14234 (patch)
tree74675981e9ef16a40b0f258c0aa173b164393682 /archival/tar.c
parent19c238bc909d1e06a6bc70fe5f74124b64a4fa9d (diff)
tar: handle tarfiles with (broken) checksums a-la Sun.
Diffstat (limited to 'archival/tar.c')
-rw-r--r--archival/tar.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/archival/tar.c b/archival/tar.c
index 1cdae296d..992128ef4 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -173,6 +173,9 @@ static void putOctal(char *cp, int len, off_t value)
static void chksum_and_xwrite(int fd, struct TarHeader* hp)
{
+ /* POSIX says that checksum is done on unsigned bytes
+ * (Sun and HP-UX fucked it up... more details in
+ * GNU tar source) */
const unsigned char *cp;
int chksum, size;