mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
cws2fws: check lseek() return
Fixes: CID733721 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
59eae88429
commit
86aba86b1b
@ -128,8 +128,8 @@ int main(int argc, char *argv[])
|
|||||||
buf_in[2] = ((zstream.total_out + 8) >> 16) & 0xff;
|
buf_in[2] = ((zstream.total_out + 8) >> 16) & 0xff;
|
||||||
buf_in[3] = ((zstream.total_out + 8) >> 24) & 0xff;
|
buf_in[3] = ((zstream.total_out + 8) >> 24) & 0xff;
|
||||||
|
|
||||||
lseek(fd_out, 4, SEEK_SET);
|
if ( lseek(fd_out, 4, SEEK_SET) < 0
|
||||||
if (write(fd_out, &buf_in, 4) < 4) {
|
|| write(fd_out, &buf_in, 4) < 4) {
|
||||||
perror("Error writing output file");
|
perror("Error writing output file");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user