Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 081e05c7 authored by Rob Swindell's avatar Rob Swindell 💬

glob() paranoia

Make Coverity happy.
parent d1923721
......@@ -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++) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment