HomeFreeBSD

ZED: Fix uninitialized value reads

Description

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

Details

Provenance
Richard Yao <richard.yao@alumni.stonybrook.edu>Authored on Oct 18 2022, 7:42 PM
Tony Hutter <hutter2@llnl.gov>Committed on Dec 1 2022, 8:39 PM
Parents
rG2453f9035007: Fix theoretical array overflow in lua_typename()
Branches
Unknown
Tags
Unknown

Event Timeline

Tony Hutter <hutter2@llnl.gov> committed rG4351d18fb0bf: ZED: Fix uninitialized value reads (authored by Richard Yao <richard.yao@alumni.stonybrook.edu>).Dec 1 2022, 8:39 PM