]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
CID 1409868: Check return of cf_data_find
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 26 May 2017 01:55:29 +0000 (21:55 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 26 May 2017 02:07:51 +0000 (22:07 -0400)
src/modules/proto_radius/proto_radius.c

index bba931e1265ac8467556bb4f28638655cd80d50e..b88ba521ece8a241a823c0f181ac2470efd544c3 100644 (file)
@@ -337,6 +337,10 @@ static int mod_parse(fr_schedule_t *handle, CONF_SECTION *cs, bool verify_config
                        value = cf_pair_value(cp);
 
                        module = cf_data_find(cs, dl_t, value);
+                       if (!module) {
+                               cf_log_err_cs(cs, "Section missing module data");
+                               return -1;
+                       }
                        if (cf_data_find(cs, char const *, value)) continue;
 
                        app = (fr_app_subtype_t const *) module->common;