mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
Merge commit '6bdae41d3ef74a0865e8f87896e649f93b2f39bd'
* commit '6bdae41d3ef74a0865e8f87896e649f93b2f39bd':
matroskadec: Check memory allocations
Conflicts:
libavformat/matroskadec.c
See: 3e2a5b33f0
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
b0112019f9
@ -2648,8 +2648,11 @@ static int matroska_parse_frame(MatroskaDemuxContext *matroska,
|
||||
offset = 8;
|
||||
|
||||
pkt = av_mallocz(sizeof(AVPacket));
|
||||
if (!pkt)
|
||||
if (!pkt) {
|
||||
if (pkt_data != data)
|
||||
av_freep(&pkt_data);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
/* XXX: prevent data copy... */
|
||||
if (av_new_packet(pkt, pkt_size + offset) < 0) {
|
||||
av_free(pkt);
|
||||
|
Loading…
Reference in New Issue
Block a user