libdtrace: Eliminate a minor UB by fully initializing parameter struct
The dtt_flags value is dereferenced by dt_type_pointer() and must be initialized first. Reported by: Coverity Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
d9759abd65
commit
70e7a948b0
@ -3069,9 +3069,10 @@ dt_cook_op1(dt_node_t *dnp, uint_t idflags)
|
||||
"cannot take address of bit-field\n");
|
||||
}
|
||||
|
||||
dtt.dtt_object = NULL;
|
||||
dtt.dtt_ctfp = cp->dn_ctfp;
|
||||
dtt.dtt_type = cp->dn_type;
|
||||
dtt = (dtrace_typeinfo_t){
|
||||
.dtt_ctfp = cp->dn_ctfp,
|
||||
.dtt_type = cp->dn_type,
|
||||
};
|
||||
|
||||
if (dt_type_pointer(&dtt) == -1) {
|
||||
xyerror(D_TYPE_ERR, "cannot find type for \"&\": %s*\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user