1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 10:25:13 +03:00

libdm: put in secure check

Coverity complains about NULL deref - while this cannot currently
happen, put in secure INTERNAL_ERROR.
This commit is contained in:
Zdenek Kabelac 2015-11-11 22:51:23 +01:00
parent 0128770d6d
commit d74e1291cd

View File

@ -3527,6 +3527,10 @@ static struct field_selection *_create_field_selection(struct dm_report *rh,
}
break;
case DM_REPORT_FIELD_TYPE_STRING_LIST:
if (!custom) {
log_error(INTERNAL_ERROR "Custom selection list is undefined.");
goto error;
}
fs->value->v.l = *(struct selection_str_list **)custom;
if (_check_value_is_strictly_reserved(rh, field_num, DM_REPORT_FIELD_TYPE_STRING_LIST, fs->value->v.l, NULL)) {
log_error("String list value found in selection is reserved.");