Fix gcc uninitialized warning in FreeBSD zio_crypt.c
commit2bf15202110767b6adbacc02d7e9dae1c305d944
authorDimitry Andric <dimitry@andric.com>
Tue, 29 Oct 2024 19:05:02 +0000 (29 20:05 +0100)
committerGitHub <noreply@github.com>
Tue, 29 Oct 2024 19:05:02 +0000 (29 15:05 -0400)
tree6ae03aabd5b1ad7a0512fa8f2653311e52f2c79f
parentc480e06d88e07fe5b8aaa920cc966498bb321a8d
Fix gcc uninitialized warning in FreeBSD zio_crypt.c

In FreeBSD's `zio_do_crypt_data()`, ensure that two `struct uio`
variables are cleared before copying data out of them. This avoids
accessing garbage data, and fixes gcc `-Wuninitialized` warnings.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Toomas Soome <tsoome@me.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Dimitry Andric <dimitry@andric.com>
Closes #16688
module/os/freebsd/zfs/zio_crypt.c