summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath2002-11-01 21:40:52 +0000
committerGlenn L McGrath2002-11-01 21:40:52 +0000
commit563ac6e789a3fdf438121df9a965f53a254bfff0 (patch)
treeac1c5c1986c81663a9acf3a7b883716111748caa
parentf5ecd43473353ae18421f487284eee085c203052 (diff)
downloadbusybox-563ac6e789a3fdf438121df9a965f53a254bfff0.zip
busybox-563ac6e789a3fdf438121df9a965f53a254bfff0.tar.gz
Report errror if the first magic character doesnt match
-rw-r--r--archival/gunzip.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/archival/gunzip.c b/archival/gunzip.c
index ca7e343..fff3a65 100644
--- a/archival/gunzip.c
+++ b/archival/gunzip.c
@@ -169,6 +169,7 @@ extern int gunzip_main(int argc, char **argv)
magic2 = xread_char(src_fd);
#ifdef CONFIG_FEATURE_UNCOMPRESS
if (magic2 == 0x9d) {
+ printf("uncompress\n");
return(uncompress(src_fd, dst_fd));
} else
#endif
@@ -182,6 +183,8 @@ extern int gunzip_main(int argc, char **argv)
} else {
error_msg_and_die("Invalid magic\n");
}
+ } else {
+ error_msg_and_die("Invalid magic\n");
}
if ((status != EXIT_SUCCESS) && (new_path)) {