From 081e05c78e735453eadb6f548e7d62a21279ff8b Mon Sep 17 00:00:00 2001
From: Rob Swindell <rob@synchro.net>
Date: Mon, 15 Feb 2021 01:50:40 -0800
Subject: [PATCH] glob() paranoia

Make Coverity happy.
---
 src/xpdev/ini_file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/xpdev/ini_file.c b/src/xpdev/ini_file.c
index 711be197de..a7d62c6478 100644
--- a/src/xpdev/ini_file.c
+++ b/src/xpdev/ini_file.c
@@ -2326,12 +2326,12 @@ str_list_t iniReadFile(FILE* fp)
 	inc_len=strlen(INI_INCLUDE_DIRECTIVE);
 	for(i=0; list[i]!=NULL; i++) {
 		if(strnicmp(list[i],INI_INCLUDE_DIRECTIVE,inc_len)==0) {
-			glob_t gl;
+			glob_t gl = {0};
 			size_t j;
 			p=list[i]+inc_len;
 			SKIP_WHITESPACE(p);
 			truncsp(p);
- 			glob(p, GLOB_MARK, NULL, &gl);
+ 			(void)glob(p, GLOB_MARK, NULL, &gl);
 			safe_snprintf(str, sizeof(str), "; %s - %lu matches found", list[i], (ulong)gl.gl_pathc);
 			strListReplace(list, i, str);
 			for(j = 0; j < gl.gl_pathc; j++) {
-- 
GitLab