]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
check for NULL. CID #1503997
authorAlan T. DeKok <aland@freeradius.org>
Mon, 11 Apr 2022 23:44:23 +0000 (19:44 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 11 Apr 2022 23:45:33 +0000 (19:45 -0400)
src/modules/rlm_csv/rlm_csv.c

index 7620d7c718bb97bae627d93d9187123afd13751d..37453281eee6b4373856aa22c764736f066dfea3 100644 (file)
@@ -312,6 +312,8 @@ static bool file2csv(CONF_SECTION *conf, rlm_csv_t *inst, int lineno, char *buff
                         *      Set the last entry to use 'e'
                         */
                        e->key = fr_value_box_alloc_null(e);
+                       if (!e->key) goto fail;
+
                        if (fr_value_box_from_str(e->key, e->key, type, NULL,
                                                  p, strlen(p), NULL, false) < 0) {
                                cf_log_err(conf, "Failed parsing key field in file %s line %d - %s", inst->filename, lineno,