aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-09-28 15:42:29 +0200
committerReinhard Tartler <siretart@tauware.de>2013-01-04 07:43:37 +0100
commit05f5a2eb62db2ffb802b2c317cb48c769ab02b3b (patch)
tree8b24de0d6c5cc011579b462cf73a6e412c38efd3
parent4a636a5e43685637129efbf2ac65f4bdad011e37 (diff)
downloadffmpeg-05f5a2eb62db2ffb802b2c317cb48c769ab02b3b.tar.gz
avidec: use actually read size instead of requested size
Fixes CVE-2012-2788 (cherry picked from commit 0af49a63c7f87876486ab09482d5b26b95abce60) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-rw-r--r--libavformat/avidec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 85fc794362..a35290b19f 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -984,7 +984,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;