HomeFreeBSD

Fix 'zpool create' segfault due to bad syntax

Description

Fix 'zpool create' segfault due to bad syntax

Incorrect syntax should never cause a segfault. In this case
listing multiple comma delimited options after '-o' triggered
the problem. For example:

zpool create -o ashift=12,listsnaps=on

This patch resolves the issue by wrapping the calls which use
hdr with a NULL test.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1118

Details

Provenance
Jorgen Lundman <lundman@lundman.net>Authored on Nov 29 2012, 5:56 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Dec 4 2012, 7:15 PM
Parents
rG2957f38d78d3: vdev_id support for device link aliases
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG53c2ec1d1b3f: Fix 'zpool create' segfault due to bad syntax (authored by Jorgen Lundman <lundman@lundman.net>).Dec 4 2012, 7:15 PM