matroskadec: check realloc in lzo encoding
Make all the compression encodings behave the same way.
This commit is contained in:
parent
cd4739c4f2
commit
581281e242
@ -999,7 +999,11 @@ static int matroska_decode_buffer(uint8_t** buf, int* buf_size,
|
|||||||
case MATROSKA_TRACK_ENCODING_COMP_LZO:
|
case MATROSKA_TRACK_ENCODING_COMP_LZO:
|
||||||
do {
|
do {
|
||||||
olen = pkt_size *= 3;
|
olen = pkt_size *= 3;
|
||||||
pkt_data = av_realloc(pkt_data, pkt_size+AV_LZO_OUTPUT_PADDING);
|
newpktdata = av_realloc(pkt_data, pkt_size + AV_LZO_OUTPUT_PADDING);
|
||||||
|
if (!newpktdata) {
|
||||||
|
goto failed;
|
||||||
|
}
|
||||||
|
pkt_data = newpktdata;
|
||||||
result = av_lzo1x_decode(pkt_data, &olen, data, &isize);
|
result = av_lzo1x_decode(pkt_data, &olen, data, &isize);
|
||||||
} while (result==AV_LZO_OUTPUT_FULL && pkt_size<10000000);
|
} while (result==AV_LZO_OUTPUT_FULL && pkt_size<10000000);
|
||||||
if (result)
|
if (result)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user