gzip: fix error handling in unxz
The result of fstat() was not checked. Furthermore, there was a redundant check of st.st_size. Fix both. Reported by: Coverity MFC after: 1 week Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
d0f4e583bf
commit
58135fbd8b
@ -260,8 +260,7 @@ parse_indexes(xz_file_info *xfi, int src_fd)
|
|||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
fstat(src_fd, &st);
|
if (fstat(src_fd, &st) != 0) {
|
||||||
if (st.st_size <= 0) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user