[Bug 38671] valgrind shows an uninitialized write in dlls/advapi32/tests/security.c

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Jun 2 23:46:55 CDT 2015


https://bugs.winehq.org/show_bug.cgi?id=38671

Sebastian Lackner <sebastian at fds-team.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sebastian at fds-team.de

--- Comment #1 from Sebastian Lackner <sebastian at fds-team.de> ---
Looks harmless to me. To avoid ugly size calculations
dlls/advapi32/tests/security.c uses a fixed size buffer for the DACL (line
3238):

--- snip ---
    pDacl = HeapAlloc(GetProcessHeap(), 0, 100);
    bret = InitializeAcl(pDacl, 100, ACL_REVISION);
--- snip ---

In dlls/ntdll/sync.c the full buffer is copied and later transferred to the
wineserver, although some parts of it are unused. AclCount is set to the proper
number of elements, so this is harmless.

The easiest way to fix this issue would be to just initialize the memory with
zeros (pass HEAP_ZERO_MEMORY to the second arg of HeapAlloc), but unfortunately
we would have to do that at multiple places. Anyone else has a better idea?

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list