Commit fc8766cb authored by deuce's avatar deuce
Browse files

Handle glob() failure in getdirsize().

--coverity
parent f39db9aa
......@@ -316,7 +316,8 @@ long DLLCALL getdirsize(const char* path, BOOL include_subdirs, BOOL subdir_only
SAFECOPY(match,path);
backslash(match);
SAFECAT(match,ALLFILES);
glob(match,GLOB_MARK,NULL,&g);
if (glob(match,GLOB_MARK,NULL,&g) != 0)
return 0;
if(include_subdirs && !subdir_only)
count=g.gl_pathc;
else
......
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