fix trivial bug in unpack_gz_stream (wrong fd used in read)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2012-03-06 16:46:25 +01:00
parent b5d6ae9a33
commit d29c946f93

View File

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