Browse Source

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>
tags/n0.8.13
Anton Khirnov Reinhard Tartler 13 years ago
parent
commit
05f5a2eb62
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/avidec.c

+ 1
- 1
libavformat/avidec.c View File

@@ -984,7 +984,7 @@ resync:
} }
ast->frame_offset += get_duration(ast, pkt->size); ast->frame_offset += get_duration(ast, pkt->size);
} }
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;


Loading…
Cancel
Save