]> granicus.if.org Git - zfs/commit
Fix 'zpool create' segfault due to bad syntax
authorJorgen Lundman <lundman@lundman.net>
Thu, 29 Nov 2012 05:56:07 +0000 (14:56 +0900)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 4 Dec 2012 19:15:25 +0000 (11:15 -0800)
commit53c2ec1d1b3ffdc90c1c6516558e6b4da77c2446
treefc318ed70d3e7b85e3d0585f581bc5e84f15b4e4
parent2957f38d78d376431ab18d2f576099d682d7a711
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
lib/libzfs/libzfs_util.c