avidec: update size when packet is shrunk

Fixes out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/5/head
Michael Niedermayer 13 years ago
parent 3f80546d75
commit c41ac87047
  1. 1
      libavformat/avidec.c

@ -1125,6 +1125,7 @@ resync:
err= av_get_packet(pb, pkt, size);
if(err<0)
return err;
size = err;
if(ast->has_pal && pkt->data && pkt->size<(unsigned)INT_MAX/2){
uint8_t *pal;

Loading…
Cancel
Save