aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/avidec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-13 23:56:26 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-14 00:24:38 +0200
commitc41ac870470c614185e1752c11f892809022248a (patch)
tree589ee81c2a0ca408d34aef32f336bd0613f70c63 /libavformat/avidec.c
parent3f80546d75011e40eec73d376cbdb6e238e602b9 (diff)
downloadffmpeg-c41ac870470c614185e1752c11f892809022248a.tar.gz
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>
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r--libavformat/avidec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 0067ff98f2..b78a3d2a2b 100644
--- a/libavformat/avidec.c
+++ b/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;