HomeFreeBSD

Fix coverity defects: CID 147587

Description

Fix coverity defects: CID 147587

CID 147587: Out-of-bounds read

Future changes may cause an array overrun of 4096 bytes at byte
offset 4096 by dereferencing pointer dstp. Adding this additional
check ensures correctness.

Reviewed-by: Chunwei Chen <david.chen@osnexus.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: GeLiXin <ge.lixin@zte.com.cn>
Closes #5297

Details

Provenance
GeLiXin <ge.lixin@zte.com.cn>Authored on Dec 21 2016, 7:27 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Dec 21 2016, 7:27 PM
Parents
rG53ed2db21232: Remove extra + from zfs man page
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG547c5936613e: Fix coverity defects: CID 147587 (authored by GeLiXin <ge.lixin@zte.com.cn>).Dec 21 2016, 7:27 PM