[FFmpeg-cvslog] avidec: update size when packet is shrunk
Michael Niedermayer
git at videolan.org
Sat Apr 14 00:29:14 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Apr 13 23:56:26 2012 +0200| [c41ac870470c614185e1752c11f892809022248a] | committer: Michael Niedermayer
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 at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c41ac870470c614185e1752c11f892809022248a
---
libavformat/avidec.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 0067ff9..b78a3d2 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;
More information about the ffmpeg-cvslog
mailing list