]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ZED: Fix uninitialized value reads
authorRichard Yao <richard.yao@alumni.stonybrook.edu>
Tue, 18 Oct 2022 19:42:14 +0000 (15:42 -0400)
committerGitHub <noreply@github.com>
Tue, 18 Oct 2022 19:42:14 +0000 (12:42 -0700)
commit09453dea6a986278873cd77a571c9b26a53fdb02
tree32f9a244bd820da821f6b6dd9fc720cc8aa76668
parentecb6a50819448cd2d6570298a5ba46b45eded216
ZED: Fix uninitialized value reads

Coverity complained about a couple of uninitialized value reads in ZED.

 * zfs_deliver_dle() can pass an uninitialized string to zed_log_msg()
 * An uninitialized sev.sigev_signo is passed to timer_create()

The former would log garbage while the latter is not a real issue, but
we might as well suppress it by initializing the field to 0 for
consistency's sake.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14047
cmd/zed/agents/fmd_api.c
cmd/zed/agents/zfs_mod.c