[Bug 20316] New: init_user_process_params() forgets to initialize CurrentDirectory.Handle, causing uninitialized memory reference in init_current_directory()

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Oct 10 22:04:39 CDT 2009


http://bugs.winehq.org/show_bug.cgi?id=20316

           Summary: init_user_process_params() forgets to initialize
                    CurrentDirectory.Handle, causing uninitialized memory
                    reference in init_current_directory()
           Product: Wine
           Version: 1.1.31
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: download, patch, source
          Severity: normal
          Priority: P2
         Component: ntdll
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: dank at kegel.com


Once you are past bug 20303 and bug 20315, the commands

cd dlls/advapi32/tests
/usr/local/valgrind-10896/bin/valgrind --trace-children=yes --track-origins=yes
 --workaround-gcc296-bugs=yes ~/wine-git/wine advapi32_test.exe.so security.c

produce the valgrind warning

Conditional jump or move depends on uninitialised value(s)
   at RtlSetCurrentDirectory_U (path.c:992)
   by init_current_directory (process.c:769)
   by __wine_kernel_init (process.c:1036)
   by __wine_process_init (loader.c:2719)
 Uninitialised value was created by a client request
   at inform_valgrind_of_new_virtual_memory_block (virtual.c:1724)
   by NtAllocateVirtualMemory (virtual.c:1870)
   by init_user_process_params (thread.c:186)
   by thread_init (thread.c:340)
   by __wine_process_init (loader.c:2695)

It seems the field CurrentDirectory.Handle is not initialized
in init_user_process_params().  Adding the line
    params->CurrentDirectory.Handle = INVALID_HANDLE_VALUE;
around line 200 of dlls/ntdll/thread.c works and is probably
even the right fix.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
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