aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2018-03-16 21:10:36 +0000
committerConrad Meyer <cem@FreeBSD.org>2018-03-16 21:10:36 +0000
commita8c03de86d91378df9f7ae751d629f74f932b2e2 (patch)
tree4dbbdfbbc71db3c31a64a53fbc5b7cb9170b0e88 /cddl/contrib/opensolaris
parent3485f3b359bd93a77f25d9e9bb8af00b7d109998 (diff)
downloadsrc-a8c03de86d91378df9f7ae751d629f74f932b2e2.tar.gz
src-a8c03de86d91378df9f7ae751d629f74f932b2e2.zip
libdtrace: Fix another uninitialized dtt_flags UB
Like r331073, eliminate a UB by fully initializing the struct with a designated initializer. Note that the similar src_dtt is not fully used, so a similar treatment was not absolutely required. I chose to leave it alone. It wouldn't hurt to do the same thing, though. Reported by: Coverity Sponsored by: Dell EMC Isilon
Notes
Notes: svn path=/head/; revision=331076
Diffstat (limited to 'cddl/contrib/opensolaris')
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c
index 74bd48786131..832a2523572b 100644
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c
@@ -343,9 +343,11 @@ out:
src_dtt.dtt_ctfp = src_ctfp;
src_dtt.dtt_type = src_type;
- dst_dtt.dtt_object = dt_module_lookup_by_ctf(dtp, dst_ctfp)->dm_name;
- dst_dtt.dtt_ctfp = dst_ctfp;
- dst_dtt.dtt_type = dst_type;
+ dst_dtt = (dtrace_typeinfo_t){
+ .dtt_object = dt_module_lookup_by_ctf(dtp, dst_ctfp)->dm_name,
+ .dtt_ctfp = dst_ctfp,
+ .dtt_type = dst_type,
+ };
return (dt_xlator_create(dtp, &src_dtt, &dst_dtt, NULL, NULL, NULL));
}