aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/avidec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-09-28 15:42:29 +0200
committerAnton Khirnov <anton@khirnov.net>2012-09-29 09:27:59 +0200
commit0af49a63c7f87876486ab09482d5b26b95abce60 (patch)
treed4a794547fa20303d388edf94c9d484ac59de6f3 /libavformat/avidec.c
parenteeade678f0a2bac127aeed2fb68d8717a6463420 (diff)
downloadffmpeg-0af49a63c7f87876486ab09482d5b26b95abce60.tar.gz
avidec: use actually read size instead of requested size
Fixes CVE-2012-2788
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r--libavformat/avidec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index b70367fb30..b2a06edd8c 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;