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>
This commit is contained in:
Michael Niedermayer 2012-04-13 23:56:26 +02:00
parent 3f80546d75
commit c41ac87047

View File

@ -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;