|
From: <sv...@va...> - 2005-07-18 22:46:00
|
Author: tom
Date: 2005-07-18 23:45:55 +0100 (Mon, 18 Jul 2005)
New Revision: 4167
Log:
Check each member of the ifconf structure passed to SIOCGIFCONF
individually to avoid problems with padding bytes on 64 bit platforms.
Modified:
trunk/coregrind/m_syswrap/syswrap-generic.c
Modified: trunk/coregrind/m_syswrap/syswrap-generic.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syswrap/syswrap-generic.c 2005-07-18 22:41:33 UTC (=
rev 4166)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c 2005-07-18 22:45:55 UTC (=
rev 4167)
@@ -3257,7 +3257,12 @@
if (!VG_(is_kerror)(RES) && RES =3D=3D 0)
POST_MEM_WRITE(ARG3, sizeof(struct ifconf));
*/
- PRE_MEM_READ( "ioctl(SIOCGIFCONF)", ARG3, sizeof(struct vki_ifconf=
));
+ PRE_MEM_READ( "ioctl(SIOCGIFCONF)",
+ (Addr)&((struct vki_ifconf *)ARG3)->ifc_len,
+ sizeof(((struct vki_ifconf *)ARG3)->ifc_len));
+ PRE_MEM_READ( "ioctl(SIOCGIFCONF)",
+ (Addr)&((struct vki_ifconf *)ARG3)->vki_ifc_buf,
+ sizeof(((struct vki_ifconf *)ARG3)->vki_ifc_buf));
if ( ARG3 ) {
// TODO len must be readable and writable
// buf pointer only needs to be readable
|