|
From: <sv...@va...> - 2014-12-29 18:30:54
|
Author: philippe
Date: Mon Dec 29 18:24:37 2014
New Revision: 14835
Log:
Fix 342221 - socket connect produce false positive saying access to uninitialized memory area
As we check what follows af_family, the length to check must be decreased
by sizeof(af_maily)
Modified:
trunk/NEWS
trunk/coregrind/m_syswrap/syswrap-generic.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Mon Dec 29 18:24:37 2014
@@ -98,6 +98,7 @@
segment if it is past the heap end
341789 aarch64: shmat fails with valgrind on ARMv8
342063 wrong format specifier for test mcblocklistsearch in gdbserver_tests
+342221 socket connect false positive uninit memory for unknown af family
n-i-bz Provide implementations of certain compiler builtins to support
compilers who may not provide those
n-i-bz Old STABS code is still being compiled, but never used. Remove it.
Modified: trunk/coregrind/m_syswrap/syswrap-generic.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-generic.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c Mon Dec 29 18:24:37 2014
@@ -1126,7 +1126,7 @@
struct sockaddr_???? has padding bytes between its elements. */
VG_(sprintf) ( outmsg, description, "sa_data" );
PRE_MEM_READ( outmsg, (Addr)&sa->sa_family + sizeof(sa->sa_family),
- salen );
+ salen - sizeof(sa->sa_family));
break;
}
|