]> granicus.if.org Git - zfs/commit
Fix 'zdb -o' segmentation fault
authorLOLi <loli10K@users.noreply.github.com>
Fri, 24 Mar 2017 01:57:54 +0000 (02:57 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 24 Mar 2017 01:57:54 +0000 (18:57 -0700)
commit7b0dc2a317a3d149d396bc48dae7b8e9bf1a1a6b
tree6181ac553851b369f74294fece050b1d6656ee4a
parent8d703987407acfcbd992ba4a7926f2d76ca3779c
Fix 'zdb -o' segmentation fault

Fix a regression accidentally introduced by OpenZFS 7280 in ed828c0: since
whether to accept NULL as a valid first parameter in strchr() is implementation
specific we add an additional check to avoid crashing.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #5917
lib/libzpool/util.c