summaryrefslogtreecommitdiff
path: root/ffserver.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-17 20:24:47 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-17 20:35:16 +0200
commit71bc8c95d7cac552d3a2cb3120e41207dfb48e50 (patch)
tree3f30dc9454e1fb835e4f18e1064cf91f92c2b21b /ffserver.c
parent378a5b9c5f1a8b51dee3b954713d18f330fbb027 (diff)
downloadffmpeg-71bc8c95d7cac552d3a2cb3120e41207dfb48e50.tar.gz
ffm_read_write_index: check lseek return code
Fixes CID732184 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 bab40a3275..c8f9cecf44 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -333,7 +333,8 @@ static int64_t ffm_read_write_index(int fd)
{
uint8_t buf[8];
- lseek(fd, 8, SEEK_SET);
+ if (lseek(fd, 8, SEEK_SET) < 0)
+ return AVERROR(EIO);
if (read(fd, buf, 8) != 8)
return AVERROR(EIO);
return AV_RB64(buf);