From 936751b6527cff789ef077a4e43a04ae9e658232 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 18 May 2016 00:53:21 +0200 Subject: avformat/avio: Fix null pointer dereference in case of memleak Signed-off-by: Michael Niedermayer --- libavformat/avio.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavformat') diff --git a/libavformat/avio.c b/libavformat/avio.c index efde5f30e4..3606eb0fda 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -270,6 +270,8 @@ static const struct URLProtocol *url_find_protocol(const char *filename) *ptr = '\0'; protocols = ffurl_get_protocols(NULL, NULL); + if (!protocols) + return NULL; for (i = 0; protocols[i]; i++) { const URLProtocol *up = protocols[i]; if (!strcmp(proto_str, up->name)) { -- cgit v1.2.3