From ccf9211e29bdfad02faf93575bf39a8f89c30647 Mon Sep 17 00:00:00 2001 From: Piotr Bandurski Date: Wed, 10 Jul 2013 02:51:41 +0200 Subject: [PATCH] avformat/utils: avformat_find_stream_info fix a crash in case of oom fixes ticket #2767 Signed-off-by: Michael Niedermayer --- libavformat/utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index 17dcb259d0..f607be789d 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2783,6 +2783,8 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) } else { pkt = add_to_pktbuf(&ic->packet_buffer, &pkt1, &ic->packet_buffer_end); + if (!pkt) + goto find_stream_info_err; if ((ret = av_dup_packet(pkt)) < 0) goto find_stream_info_err; }