diff options
author | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-11-01 21:40:52 +0000 |
---|---|---|
committer | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-11-01 21:40:52 +0000 |
commit | 3ee36410b14056b8cabad2812488fd20f541e88e (patch) | |
tree | ac1c5c1986c81663a9acf3a7b883716111748caa | |
parent | 7fe9ceae20c04a86c496ac5c270036d710d83035 (diff) | |
download | busybox-w32-3ee36410b14056b8cabad2812488fd20f541e88e.tar.gz busybox-w32-3ee36410b14056b8cabad2812488fd20f541e88e.tar.bz2 busybox-w32-3ee36410b14056b8cabad2812488fd20f541e88e.zip |
Report errror if the first magic character doesnt match
git-svn-id: svn://busybox.net/trunk/busybox@5764 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | archival/gunzip.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/archival/gunzip.c b/archival/gunzip.c index ca7e343cc..fff3a6577 100644 --- a/archival/gunzip.c +++ b/archival/gunzip.c | |||
@@ -169,6 +169,7 @@ extern int gunzip_main(int argc, char **argv) | |||
169 | magic2 = xread_char(src_fd); | 169 | magic2 = xread_char(src_fd); |
170 | #ifdef CONFIG_FEATURE_UNCOMPRESS | 170 | #ifdef CONFIG_FEATURE_UNCOMPRESS |
171 | if (magic2 == 0x9d) { | 171 | if (magic2 == 0x9d) { |
172 | printf("uncompress\n"); | ||
172 | return(uncompress(src_fd, dst_fd)); | 173 | return(uncompress(src_fd, dst_fd)); |
173 | } else | 174 | } else |
174 | #endif | 175 | #endif |
@@ -182,6 +183,8 @@ extern int gunzip_main(int argc, char **argv) | |||
182 | } else { | 183 | } else { |
183 | error_msg_and_die("Invalid magic\n"); | 184 | error_msg_and_die("Invalid magic\n"); |
184 | } | 185 | } |
186 | } else { | ||
187 | error_msg_and_die("Invalid magic\n"); | ||
185 | } | 188 | } |
186 | 189 | ||
187 | if ((status != EXIT_SUCCESS) && (new_path)) { | 190 | if ((status != EXIT_SUCCESS) && (new_path)) { |