[FFmpeg-cvslog] avformat/utils: avformat_find_stream_info fix a crash in case of oom

Piotr Bandurski git at videolan.org
Wed Jul 10 03:43:26 CEST 2013


ffmpeg | branch: master | Piotr Bandurski <ami_stuff at o2.pl> | Wed Jul 10 02:51:41 2013 +0200| [ccf9211e29bdfad02faf93575bf39a8f89c30647] | committer: Michael Niedermayer

avformat/utils: avformat_find_stream_info fix a crash in case of oom

fixes ticket #2767

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ccf9211e29bdfad02faf93575bf39a8f89c30647
---

 libavformat/utils.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 17dcb25..f607be7 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;
         }



More information about the ffmpeg-cvslog mailing list