Commit 5b45b662 authored by Michael Niedermayer's avatar Michael Niedermayer

cws2fws: check fstat return code.

Fixes CID733720
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 86aba86b
......@@ -62,7 +62,10 @@ int main(int argc, char *argv[])
return 1;
}
fstat(fd_in, &statbuf);
if (fstat(fd_in, &statbuf) < 0) {
perror("fstat failed");
return 1;
}
comp_len = statbuf.st_size;
uncomp_len = buf_in[4] | (buf_in[5] << 8) | (buf_in[6] << 16) | (buf_in[7] << 24);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment