avidec: use actually read size instead of requested size

Fixes CVE-2012-2788
pull/6/head
Anton Khirnov 13 years ago
parent eeade678f0
commit 0af49a63c7
  1. 2
      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;

Loading…
Cancel
Save