]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
filter files can't be empty.
authorAlan T. DeKok <aland@freeradius.org>
Thu, 31 May 2018 15:34:34 +0000 (11:34 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 31 May 2018 15:36:16 +0000 (11:36 -0400)
src/main/unit_test_module.c

index e50e7a9c30256977fc95b5fe1c56f5765c1d928c..08a6c4b2b9d1de4317fdadbe53d7d86f556390d5 100644 (file)
@@ -1031,6 +1031,16 @@ int main(int argc, char *argv[])
                        goto finish;
                }
 
+               /*
+                *      Filter files can't be empty.
+                */
+               if (!filter_vps) {
+                       fprintf(stderr, "No attributes in filter file %s\n",
+                               filter_file);
+                       rcode = EXIT_FAILURE;
+                       goto finish;
+               }
+
                /*
                 *      FIXME: loop over input packets.
                 */