[FFmpeg-cvslog] avidec: use actually read size instead of requested size

Anton Khirnov git at videolan.org
Thu Oct 25 16:38:05 CEST 2012


ffmpeg | branch: release/0.10 | Anton Khirnov <anton at khirnov.net> | Fri Sep 28 15:42:29 2012 +0200| [0582b8e3eabb4b7d6f637fcd294d6ae43d24b61a] | committer: Reinhard Tartler

avidec: use actually read size instead of requested size

Fixes CVE-2012-2788
(cherry picked from commit 0af49a63c7f87876486ab09482d5b26b95abce60)

Signed-off-by: Reinhard Tartler <siretart at tauware.de>

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

 libavformat/avidec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index b4ccfb5..13a39c0 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -1116,7 +1116,7 @@ resync:
             }
             ast->frame_offset += get_duration(ast, pkt->size);
         }
-        ast->remaining -= size;
+        ast->remaining -= err;
         if(!ast->remaining){
             avi->stream_index= -1;
             ast->packet_size= 0;



More information about the ffmpeg-cvslog mailing list