Browse code

clamdscan: Add null check to chkpath

Tom Briden authored on 2021/04/30 19:58:54
Showing 1 changed files
... ...
@@ -238,6 +238,10 @@ static int chkpath(const char *path)
238 238
 {
239 239
     const struct optstruct *opt;
240 240
 
241
+    if (!path) {
242
+        return 1;
243
+    }
244
+
241 245
     if ((opt = optget(clamdopts, "ExcludePath"))->enabled) {
242 246
         while (opt) {
243 247
             if (match_regex(path, opt->strarg) == 1) {