Report errror if the first magic character doesnt match
This commit is contained in:
parent
f5ecd43473
commit
563ac6e789
@ -169,6 +169,7 @@ extern int gunzip_main(int argc, char **argv)
|
|||||||
magic2 = xread_char(src_fd);
|
magic2 = xread_char(src_fd);
|
||||||
#ifdef CONFIG_FEATURE_UNCOMPRESS
|
#ifdef CONFIG_FEATURE_UNCOMPRESS
|
||||||
if (magic2 == 0x9d) {
|
if (magic2 == 0x9d) {
|
||||||
|
printf("uncompress\n");
|
||||||
return(uncompress(src_fd, dst_fd));
|
return(uncompress(src_fd, dst_fd));
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
@ -182,6 +183,8 @@ extern int gunzip_main(int argc, char **argv)
|
|||||||
} else {
|
} else {
|
||||||
error_msg_and_die("Invalid magic\n");
|
error_msg_and_die("Invalid magic\n");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
error_msg_and_die("Invalid magic\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((status != EXIT_SUCCESS) && (new_path)) {
|
if ((status != EXIT_SUCCESS) && (new_path)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user