summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenys Vlasenko2010-06-26 05:01:16 +0200
committerDenys Vlasenko2010-06-26 05:01:16 +0200
commit894fa0ad62924bcfc2d37e045e36d25ad5784888 (patch)
tree0ebcf614981f9b2154ce35d663b76fc9526699f1 /libbb
parent63144be7eae8757b0e0d81ff6fa8adb0b26ff7c1 (diff)
downloadbusybox-894fa0ad62924bcfc2d37e045e36d25ad5784888.zip
busybox-894fa0ad62924bcfc2d37e045e36d25ad5784888.tar.gz
fix breakage in compressed file detection
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/read_printf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbb/read_printf.c b/libbb/read_printf.c
index 53f528f..3aee075 100644
--- a/libbb/read_printf.c
+++ b/libbb/read_printf.c
@@ -265,7 +265,7 @@ void FAST_FUNC setup_unzip_on_fd(int fd /*, int fail_if_not_detected*/)
/* .gz and .bz2 both have 2-byte signature, and their
* unpack_XXX_stream wants this header skipped. */
- xread(fd, magic.b16, sizeof(magic.b16));
+ xread(fd, magic.b16, sizeof(magic.b16[0]));
if (ENABLE_FEATURE_SEAMLESS_GZ
&& magic.b16[0] == GZIP_MAGIC
) {
@@ -292,7 +292,7 @@ void FAST_FUNC setup_unzip_on_fd(int fd /*, int fail_if_not_detected*/)
/* .xz signature: 0xfd, '7', 'z', 'X', 'Z', 0x00 */
/* More info at: http://tukaani.org/xz/xz-file-format.txt */
offset = -6;
- xread(fd, magic.b32, sizeof(magic.b32));
+ xread(fd, magic.b32, sizeof(magic.b32[0]));
if (magic.b32[0] == XZ_MAGIC2) {
# if BB_MMU
xformer = unpack_xz_stream;