On 12/03/15 13:33, Vittorio Giovara wrote:
--- libavformat/matroskadec.c | 4 ++++ 1 file changed, 4 insertions(+)diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 697e14c..f06beea 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -2270,6 +2270,10 @@ static int matroska_parse_frame(MatroskaDemuxContext *matroska, offset = 8; pkt = av_mallocz(sizeof(AVPacket)); + if (!pkt) { + av_freep(&pkt_data); + return AVERROR(ENOMEM); + } /* XXX: prevent data copy... */ if (av_new_packet(pkt, pkt_size + offset) < 0) { av_free(pkt);
Sounds good. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
