aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotr Bandurski <ami_stuff@o2.pl>2013-07-10 02:51:41 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-07-11 12:00:39 +0200
commit1cda4aa1e0e1fadb3b3d984e9710b21496ba917a (patch)
treee41d1127bc762026269bfac96c9770e1fa83b31b
parent9711b527394c99e5bd4c5174a1a30a2238bbb859 (diff)
downloadffmpeg-1cda4aa1e0e1fadb3b3d984e9710b21496ba917a.tar.gz
avformat/utils: avformat_find_stream_info fix a crash in case of oom
fixes ticket #2767 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit ccf9211e29bdfad02faf93575bf39a8f89c30647) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/utils.c2
1 files changed, 2 insertions, 0 deletions
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;
}