[FFmpeg-cvslog] ffm_read_write_index: check lseek return code

Michael Niedermayer git at videolan.org
Wed Oct 17 20:35:56 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Oct 17 20:24:47 2012 +0200| [71bc8c95d7cac552d3a2cb3120e41207dfb48e50] | committer: Michael Niedermayer

ffm_read_write_index: check lseek return code

Fixes CID732184
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=71bc8c95d7cac552d3a2cb3120e41207dfb48e50
---

 ffserver.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ffserver.c b/ffserver.c
index bab40a3..c8f9cec 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);



More information about the ffmpeg-cvslog mailing list