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
This commit is contained in:
Conrad Meyer 2018-03-16 21:10:36 +00:00
parent 3485f3b359
commit a8c03de86d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=331076

View File

@ -343,9 +343,11 @@ dt_xlator_lookup(dtrace_hdl_t *dtp, dt_node_t *src, dt_node_t *dst, int flags)
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));
}