]> git.proxmox.com Git - mirror_zfs.git/commit
Fix potential NULL pointer dereference in lzc_ioctl()
authorRichard Yao <richard.yao@alumni.stonybrook.edu>
Fri, 14 Oct 2022 20:33:22 +0000 (16:33 -0400)
committerGitHub <noreply@github.com>
Fri, 14 Oct 2022 20:33:22 +0000 (13:33 -0700)
commit19516b69ee41c9d3e239cb132c31fa9b13af2356
treeaf20a2f4e6cd468773d09fc27fbe3493e27a5e49
parent4d5aef3ba919b1a328e9ff9063340fc6f5389c3a
Fix potential NULL pointer dereference in lzc_ioctl()

Users are allowed to pass NULL to resultp, but we unconditionally assume
that they never do. When an external user does pass NULL to resultp, we
dereference a NULL pointer.

Clang's static analyzer complained about this.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14008
lib/libzfs_core/libzfs_core.c