Skip to content
Snippets Groups Projects
Commit 86aba86b authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

cws2fws: check lseek() return


Fixes: CID733721
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 59eae884
No related branches found
No related tags found
No related merge requests found
......@@ -128,8 +128,8 @@ int main(int argc, char *argv[])
buf_in[2] = ((zstream.total_out + 8) >> 16) & 0xff;
buf_in[3] = ((zstream.total_out + 8) >> 24) & 0xff;
lseek(fd_out, 4, SEEK_SET);
if (write(fd_out, &buf_in, 4) < 4) {
if ( lseek(fd_out, 4, SEEK_SET) < 0
|| write(fd_out, &buf_in, 4) < 4) {
perror("Error writing output file");
return 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment