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

Piotr Bandurski git at videolan.org
Thu Jul 11 12:13:20 CEST 2013


ffmpeg | branch: release/2.0 | Piotr Bandurski <ami_stuff at o2.pl> | Wed Jul 10 02:51:41 2013 +0200| [1cda4aa1e0e1fadb3b3d984e9710b21496ba917a] | 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>
(cherry picked from commit ccf9211e29bdfad02faf93575bf39a8f89c30647)

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

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

 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