diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-01-08 14:21:33 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-01-08 14:21:33 +0000 |
commit | 568e18b15e2ddf494fd8926707d34ca08c8edce5 (patch) | |
tree | 18f59992848e24c529a01bd98aed66af3762b2d1 /libavformat/nsvdec.c | |
parent | 934b0821dbb8fb33b2736fe4aab09fc2b6cc8ccc (diff) | |
download | ffmpeg-568e18b15e2ddf494fd8926707d34ca08c8edce5.tar.gz |
integer overflows, heap corruption
possible arbitrary code execution cannot be ruled out in some cases
precautionary checks
Originally committed as revision 3813 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/nsvdec.c')
-rw-r--r-- | libavformat/nsvdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c index f3831d7f39..555a71a2ed 100644 --- a/libavformat/nsvdec.c +++ b/libavformat/nsvdec.c @@ -365,6 +365,8 @@ static int nsv_parse_NSVf_header(AVFormatContext *s, AVFormatParameters *ap) if (table_entries_used > 0) { nsv->index_entries = table_entries_used; + if((unsigned)table_entries >= UINT_MAX / sizeof(uint32_t)) + return -1; nsv->nsvf_index_data = av_malloc(table_entries * sizeof(uint32_t)); get_buffer(pb, nsv->nsvf_index_data, table_entries * sizeof(uint32_t)); } |