diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-17 20:23:16 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-17 20:23:16 +0200 |
commit | 378a5b9c5f1a8b51dee3b954713d18f330fbb027 (patch) | |
tree | ae4a7c12da3aad6139d0b3a0363f9087c5cbbf7a /ffserver.c | |
parent | 7fd65104f489302188a91af710b7520dc9ba7b04 (diff) | |
download | ffmpeg-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.c | 3 |
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; |