HomeFreeBSD

Fix reading uninitialized variable in receive_read

Description

Fix reading uninitialized variable in receive_read

When zfs_file_read returns error, resid may be uninitialized.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: Chunwei Chen <david.chen@nutanix.com>
Closes #14404

Details

Provenance
Chunwei Chen <tuxoko@gmail.com>Authored on Jan 20 2023, 7:49 PM
GitHub <noreply@github.com>Committed on Jan 20 2023, 7:49 PM
Parents
rG63267f7f77b0: zfs_receive_one: Check for the more likely error first
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG71974946be7e: Fix reading uninitialized variable in receive_read (authored by Chunwei Chen <tuxoko@gmail.com>).Jan 20 2023, 7:49 PM