Skip to content
Snippets Groups Projects
Commit 081e05c7 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

glob() paranoia

Make Coverity happy.
parent d1923721
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -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++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment