aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/avidec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-02-21 20:11:34 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-02-21 20:11:34 +0000
commitf5007cc84499b005028064786c628ff4c8850f3c (patch)
treee5b867374d62b4656a5f46122e6f8090cf3f0ed2 /libavformat/avidec.c
parent96c3da93e6e390539a576923a375b07cf7cfc9ef (diff)
downloadffmpeg-f5007cc84499b005028064786c628ff4c8850f3c.tar.gz
Handle chunks with the MSB in size set correctly that is unsigned.
Originally committed as revision 17491 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r--libavformat/avidec.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 2216b35582..3526700ba7 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -643,12 +643,13 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
{
AVIContext *avi = s->priv_data;
ByteIOContext *pb = s->pb;
- int n, d[8], size;
+ int n, d[8];
+ unsigned int size;
int64_t i, sync;
void* dstr;
if (CONFIG_DV_DEMUXER && avi->dv_demux) {
- size = dv_get_packet(avi->dv_demux, pkt);
+ int size = dv_get_packet(avi->dv_demux, pkt);
if (size >= 0)
return size;
}
@@ -788,7 +789,7 @@ resync:
n= get_stream_idx(d+2);
//av_log(s, AV_LOG_DEBUG, "%X %X %X %X %X %X %X %X %"PRId64" %d %d\n", d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], i, size, n);
- if(i + size > avi->fsize || d[0]<0)
+ if(i + (uint64_t)size > avi->fsize || d[0]<0)
continue;
//parse ix##