]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix 342221 - socket connect produce false positive saying access to uninitialized...
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Mon, 29 Dec 2014 18:24:37 +0000 (18:24 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Mon, 29 Dec 2014 18:24:37 +0000 (18:24 +0000)
As we check what follows af_family, the length to check must be decreased
by sizeof(af_maily)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14835

NEWS
coregrind/m_syswrap/syswrap-generic.c

diff --git a/NEWS b/NEWS
index 4597a70b969cd04688dd3fb57be5ea5cf947e68e..04125f91436341076e49472fc31a31a480a84c88 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -98,6 +98,7 @@ where XXXXXX is the bug number as listed below.
         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.
index 5c75ddac4d5cd66168d38e42930ccadc2db6b5ee..057052bce563e1f274b529acd99087e7288421a3 100644 (file)
@@ -1126,7 +1126,7 @@ void pre_mem_read_sockaddr ( ThreadId tid,
             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;
    }