Since vg_read() mda ops could be called with NULL vg_name,
check it before derefence also for pool and format1.
Version 2.02.94 -
====================================
+ Check for existance of vg_name in _format1/_pool_vg_read().
Fix missing break in _format_pvsegs (2.02.92).
Test seg pointer for non-null it in raid_target_percent error path.
Check for errors in _init_tags() during config loading.
DM_LIST_INIT(pvs);
/* Strip dev_dir if present */
- vg_name = strip_dir(vg_name, fid->fmt->cmd->dev_dir);
+ if (vg_name)
+ vg_name = strip_dir(vg_name, fid->fmt->cmd->dev_dir);
if (!(vg = alloc_vg("format1_vg_read", fid->fmt->cmd, NULL)))
return_NULL;
/* We can safely ignore the mda passed in */
/* Strip dev_dir if present */
- vg_name = strip_dir(vg_name, fid->fmt->cmd->dev_dir);
+ if (vg_name)
+ vg_name = strip_dir(vg_name, fid->fmt->cmd->dev_dir);
/* Set vg_name through read_pool_pds() */
if (!(vg = alloc_vg("pool_vg_read", fid->fmt->cmd, NULL)))