suspicious pointer arithmetic in libchk
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lsb |
In Progress
|
Medium
|
Unassigned | ||
Mandriva |
In Progress
|
Medium
|
Bug Description
The following is reported by Coverity about misc-test/
CID 1099432 (#1 of 1): Extra sizeof expression (SIZEOF_MISMATCH)
suspicious_
(struct base_type_info_mem) */" to pointer "(void **)(char
*)vmi_rttip-
integral value to this pointer automatically scales that value by the size, 8
bytes, of the pointed-to type, "void *". Most likely, the multiplication by
"sizeof (struct base_type_
should be eliminated.
977 basetypes = (void **) ((char *) vmi_rttip-
978 (vmi_rttip-
I'm not sure it's wrong, but perhaps unnecessarily convoluted given it has
confused the checker. We've cast it to char * to enable the multiply to make
sense, when vmi_rttip-
so would scale...
Changed in mandriva: | |
importance: | Unknown → Medium |
status: | Unknown → In Progress |