1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

matroskadec: fix integer overflow

patch from reimar

Originally committed as revision 24803 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Aurelien Jacobs 2010-08-17 14:05:23 +00:00
parent aa78a6d657
commit 4f90688b6e

View File

@ -901,6 +901,9 @@ static int matroska_decode_buffer(uint8_t** buf, int* buf_size,
int result = 0; int result = 0;
int olen; int olen;
if (pkt_size >= 10000000)
return -1;
switch (encodings[0].compression.algo) { switch (encodings[0].compression.algo) {
case MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP: case MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP:
return encodings[0].compression.settings.size; return encodings[0].compression.settings.size;