From a0b3c1b46762cb7f12aececd0e29838eedabe872 Mon Sep 17 00:00:00 2001 From: Rene Kita Date: Fri, 15 Apr 2022 12:43:36 +0200 Subject: [PATCH] Fix potential null dereference --- etc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc.c b/etc.c index d50adad..805bfa0 100644 --- a/etc.c +++ b/etc.c @@ -1596,7 +1596,8 @@ file_to_url(char *file) char *host = NULL; #endif - file = expandPath(file); + if (!(file = expandPath(file))) + return NULL; #ifdef SUPPORT_NETBIOS_SHARE if (file[0] == '/' && file[1] == '/') { char *p;