fix trivial bug in unpack_gz_stream (wrong fd used in read)
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 6 Mar 2012 15:46:25 +0000 (16:46 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 6 Mar 2012 15:46:25 +0000 (16:46 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
archival/libarchive/decompress_gunzip.c

index 66152a8..2d5ab3e 100644 (file)
@@ -1195,7 +1195,7 @@ unpack_gz_stream(transformer_aux_data_t *aux, int src_fd, int dst_fd)
        if (aux && aux->check_signature) {
                uint16_t magic2;
 
-               if (full_read(STDIN_FILENO, &magic2, 2) != 2) {
+               if (full_read(src_fd, &magic2, 2) != 2) {
  bad_magic:
                        bb_error_msg("invalid magic");
                        return -1;