Merge commit '6bdae41d3ef74a0865e8f87896e649f93b2f39bd'

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

Conflicts:
	libavformat/matroskadec.c

See: 3e2a5b33f0
Merged-by: Michael Niedermayer <michaelni@gmx.at>
pull/125/head
Michael Niedermayer 10 years ago
commit b0112019f9
  1. 5
      libavformat/matroskadec.c

@ -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…
Cancel
Save