Hello list,
bb-1.6.0 is not able to unpack the attached file
(ENABLE_FEATURE_TAR_OLDGNU_COMPATIBILITY is set)
Following patch adds support for e.g. checksums with spaces as delimiter.
Best regards
Harald
patch:
--- busybox-1.6.0.orig/archival/libunarchive/get_header_tar.c 2007-06-01
13:48:31.000000000 +0200
+++ busybox-1.6.0/archival/libunarchive/get_header_tar.c 2007-06-20
22:11:19.000000000 +0200
@@ -36,8 +36,10 @@
*/
str[len] = '\0';
v = strtoull(str, &str, 8);
+#if !ENABLE_FEATURE_TAR_OLDGNU_COMPATIBILITY
if (*str)
bb_error_msg_and_die("corrupted octal value in tar header");
+#endif
return v;
}
#define GET_OCTAL(a) getOctal((a), sizeof(a))
@@ -125,7 +127,11 @@
sum_s += ((signed char*)&tar)[i];
}
/* This field does not need special treatment (getOctal) */
+#if ENABLE_FEATURE_TAR_OLDGNU_COMPATIBILITY
+ sum = strtoul(tar.chksum, NULL, 8);
+#else
sum = xstrtoul(tar.chksum, 8);
+#endif
if (sum_u != sum && sum_s != sum) {
bb_error_msg_and_die("invalid tar header checksum");
}
begin 666 bb-test.tar.gz
M'XL(`````````RHN34K)+#+4+TDM+M$KJ2AAH $P-# P,S%18%!0,#0T1J&A
MP,A(P=# S-C4U-3(S-P<*&!N;&RLP# *: ]R,O-2#;E I!&8-.8:#9-1, I&
[EMAIL PROTECTED]"0````#__P,`JEYD&P`(````
`
end
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox