summaryrefslogtreecommitdiffhomepage
path: root/archival
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-06-26 05:01:16 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-06-26 05:01:16 +0200
commit894fa0ad62924bcfc2d37e045e36d25ad5784888 (patch)
tree0ebcf614981f9b2154ce35d663b76fc9526699f1 /archival
parent63144be7eae8757b0e0d81ff6fa8adb0b26ff7c1 (diff)
fix breakage in compressed file detection
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival')
-rw-r--r--archival/rpm2cpio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/archival/rpm2cpio.c b/archival/rpm2cpio.c
index 1c67dcc6e..1f67fa887 100644
--- a/archival/rpm2cpio.c
+++ b/archival/rpm2cpio.c
@@ -75,7 +75,7 @@ int rpm2cpio_main(int argc UNUSED_PARAM, char **argv)
} magic;
IF_DESKTOP(long long) int FAST_FUNC (*unpack)(int src_fd, int dst_fd);
- xread(rpm_fd, magic.b16, sizeof(magic.b16));
+ xread(rpm_fd, magic.b16, sizeof(magic.b16[0]));
if (magic.b16[0] == GZIP_MAGIC) {
unpack = unpack_gz_stream;
} else
@@ -89,7 +89,7 @@ int rpm2cpio_main(int argc UNUSED_PARAM, char **argv)
) {
/* .xz signature: 0xfd, '7', 'z', 'X', 'Z', 0x00 */
/* More info at: http://tukaani.org/xz/xz-file-format.txt */
- xread(rpm_fd, magic.b32, sizeof(magic.b32));
+ xread(rpm_fd, magic.b32, sizeof(magic.b32[0]));
if (magic.b32[0] != XZ_MAGIC2)
goto no_magic;
/* unpack_xz_stream wants fd at position 0 */