Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-26 19:30:15 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-10-26 20:24:50 +0400
commit86aba86b1b031ec7c7cc43dd679c0991929e6305 (patch)
treeb70a52e9a1ca80325e803a2904df033a83b76206 /tools/cws2fws.c
parent59eae884292d4f1ab49de1835616d46a4c1236a8 (diff)
cws2fws: check lseek() return
Fixes: CID733721 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'tools/cws2fws.c')
-rw-r--r--tools/cws2fws.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/cws2fws.c b/tools/cws2fws.c
index 8dc285bfff..c7b62df910 100644
--- a/tools/cws2fws.c
+++ b/tools/cws2fws.c
@@ -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;
}