HomeFreeBSD

Fix 'zdb -o' segmentation fault

Description

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

Details

Provenance
LOLi <loli10K@users.noreply.github.com>Authored on Mar 24 2017, 1:57 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Mar 24 2017, 1:57 AM
Parents
rG8d703987407a: Retry zfs_znode_alloc() in zfs_mknode()
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG7b0dc2a317a3: Fix 'zdb -o' segmentation fault (authored by LOLi <loli10K@users.noreply.github.com>).Mar 24 2017, 1:57 AM