提交 b0112019 编写于 作者: M Michael Niedermayer

Merge commit '6bdae41d'

* commit '6bdae41d':
  matroskadec: Check memory allocations

Conflicts:
	libavformat/matroskadec.c

See: 3e2a5b33Merged-by: NMichael Niedermayer <michaelni@gmx.at>
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册