[FFmpeg-cvslog] concatdec: Do not pass NULL to memcmp

Derek Buitenhuis git at videolan.org
Thu Jul 6 22:36:29 EEST 2017


ffmpeg | branch: master | Derek Buitenhuis <derek.buitenhuis at gmail.com> | Thu Jul  6 13:15:00 2017 -0400| [99c68861f9c79033e09ad842e2651a4b3aea95ea] | committer: Derek Buitenhuis

concatdec: Do not pass NULL to memcmp

Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>

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

 libavformat/concatdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c
index e57e5ce0ec..e8b37d6a08 100644
--- a/libavformat/concatdec.c
+++ b/libavformat/concatdec.c
@@ -120,7 +120,7 @@ static int add_file(AVFormatContext *avf, char *filename, ConcatFile **rfile,
 
     proto = avio_find_protocol_name(filename);
     proto_len = proto ? strlen(proto) : 0;
-    if (!memcmp(filename, proto, proto_len) &&
+    if (proto && !memcmp(filename, proto, proto_len) &&
         (filename[proto_len] == ':' || filename[proto_len] == ',')) {
         url = filename;
         filename = NULL;



More information about the ffmpeg-cvslog mailing list