[FFmpeg-devel] [PATCH]Avoid a null pointer dereference while probing stream
Carl Eugen Hoyos
cehoyos at ag.or.at
Wed Jul 10 00:01:59 CEST 2013
Hi!
Found while testing ticket #2566.
Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 17dcb25..57bda72 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)
+ return AVERROR(ENOMEM);
if ((ret = av_dup_packet(pkt)) < 0)
goto find_stream_info_err;
}
More information about the ffmpeg-devel
mailing list