|
From: Rhys K. <rhy...@gm...> - 2015-06-26 12:27:18
|
Proposed patch below for comment, to resolve Coverity report #1233786.
See: coregrind/m_syswrap/syswrap-xen.c
==============================
PRE_MEM_READ("__HYPERVISOR_tmem_op pool_id",
(Addr)&tmem->pool_id, sizeof(&tmem->pool_id));
Taking the size of &tmem->pool_id, which is the address of an object, is
suspicious.
It appears that the code should read sizeof(tmem->pool_id). Would a V user
on xen or at Citrix please be able to test the below proposed patch?
It appears to be a straightforward fix, but would appreciate a more
knowledgeable user with that platform to confirm.
Regards,
Rhys
Index: coregrind/m_syswrap/syswrap-xen.c
===================================================================
--- coregrind/m_syswrap/syswrap-xen.c (revision 15356)
+++ coregrind/m_syswrap/syswrap-xen.c (working copy)
@@ -943,7 +943,7 @@
* vki_uint32_t subop;
*/
PRE_MEM_READ("__HYPERVISOR_tmem_op pool_id",
- (Addr)&tmem->pool_id, sizeof(&tmem->pool_id));
+ (Addr)&tmem->pool_id, sizeof(tmem->pool_id));
PRE_XEN_TMEMOP_READ(ctrl, subop);
switch (tmem->u.ctrl.subop) {
|