mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-26 13:00:33 +00:00
matroskadec: check headerstrip data availability.
Fixes null ptr dereference Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a80217a5ee
commit
2677697ac9
@ -1011,6 +1011,10 @@ static int matroska_decode_buffer(uint8_t** buf, int* buf_size,
|
||||
|
||||
switch (encodings[0].compression.algo) {
|
||||
case MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP:
|
||||
if (encodings[0].compression.settings.size && !encodings[0].compression.settings.data) {
|
||||
av_log(0, AV_LOG_ERROR, "Compression size but no data in headerstrip\n");
|
||||
return -1;
|
||||
}
|
||||
return encodings[0].compression.settings.size;
|
||||
case MATROSKA_TRACK_ENCODING_COMP_LZO:
|
||||
do {
|
||||
|
Loading…
Reference in New Issue
Block a user