HomeFreeBSD

Fix coverity defects: CID 147654, 147690

Description

Fix coverity defects: CID 147654, 147690

coverity scan CID:147654,type: Copy into fixed size buffer

  • string operation may write past the end of the fixed-size destination buffer

coverity scan CID:147690,type: Uninitialized scalar variable

  • call zfs_prop_get first in case we use sourcetype and share_sourcetype without initialization

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: GeLiXin <ge.lixin@zte.com.cn>
Closes #5253

Details

Provenance
GeLiXin <ge.lixin@zte.com.cn>Authored on Oct 13 2016, 9:02 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Oct 13 2016, 9:02 PM
Parents
rG1f51b525ff67: Fix coverity defects: CID 153394
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG45cb520b9d1b: Fix coverity defects: CID 147654, 147690 (authored by GeLiXin <ge.lixin@zte.com.cn>).Oct 13 2016, 9:02 PM