avidec: use actually read size instead of requested size

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

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:
Anton Khirnov
2012-09-28 15:42:29 +02:00
committed by Reinhard Tartler
parent c28c631d29
commit d1729c3715

View File

@@ -780,7 +780,7 @@ resync:
else else
ast->frame_offset++; ast->frame_offset++;
} }
ast->remaining -= size; ast->remaining -= err;
if(!ast->remaining){ if(!ast->remaining){
avi->stream_index= -1; avi->stream_index= -1;
ast->packet_size= 0; ast->packet_size= 0;