aboutsummaryrefslogtreecommitdiffstats
path: root/ffserver.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-17 20:23:16 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-17 20:23:16 +0200
commit378a5b9c5f1a8b51dee3b954713d18f330fbb027 (patch)
treeae4a7c12da3aad6139d0b3a0363f9087c5cbbf7a /ffserver.c
parent7fd65104f489302188a91af710b7520dc9ba7b04 (diff)
downloadffmpeg-378a5b9c5f1a8b51dee3b954713d18f330fbb027.tar.gz
ffm_write_write_index: check lseek() return code
Fixes CID732185 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffserver.c')
-rw-r--r--ffserver.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ffserver.c b/ffserver.c
index f98ee821bb..bab40a3275 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -346,7 +346,8 @@ static int ffm_write_write_index(int fd, int64_t pos)
for(i=0;i<8;i++)
buf[i] = (pos >> (56 - i * 8)) & 0xff;
- lseek(fd, 8, SEEK_SET);
+ if (lseek(fd, 8, SEEK_SET) < 0)
+ return AVERROR(EIO);
if (write(fd, buf, 8) != 8)
return AVERROR(EIO);
return 8;