File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ enum policy_rule_list { IMA_DEFAULT_POLICY = 1, IMA_CUSTOM_POLICY };
68
68
69
69
struct ima_rule_opt_list {
70
70
size_t count ;
71
- char * items [];
71
+ char * items [] __counted_by ( count ) ;
72
72
};
73
73
74
74
/*
@@ -342,6 +342,7 @@ static struct ima_rule_opt_list *ima_alloc_rule_opt_list(const substring_t *src)
342
342
kfree (src_copy );
343
343
return ERR_PTR (- ENOMEM );
344
344
}
345
+ opt_list -> count = count ;
345
346
346
347
/*
347
348
* strsep() has already replaced all instances of '|' with '\0',
@@ -357,7 +358,6 @@ static struct ima_rule_opt_list *ima_alloc_rule_opt_list(const substring_t *src)
357
358
opt_list -> items [i ] = cur ;
358
359
cur = strchr (cur , '\0' ) + 1 ;
359
360
}
360
- opt_list -> count = count ;
361
361
362
362
return opt_list ;
363
363
}
You can’t perform that action at this time.
0 commit comments