user32: fix buffer length thinko in dde_client.c

Dan Kegel dank at kegel.com
Mon Jun 16 00:25:05 CDT 2008


[Another post-1.0 patch, please ignore until then.
I'll have all of these up at http://kegel.com/wine/valgrind/patches ]

Fix a "forgot to divide by sizeof(WCHAR)" thinko.  I only
superficially understand the code, but the fix makes sense to me.

Gets rid of 56 errors like

 Use of uninitialised value of size 4
    at  wcstombs_sbcs (wctomb.c:155)
    by  wine_cp_wcstombs (wctomb.c:457)
    by  WideCharToMultiByte (locale.c:1936)
    by  WDML_BuildExecuteCommand (dde_client.c:604)
    by  WDML_ClientQueueExecute (dde_client.c:651)
    by  DdeClientTransaction (dde_client.c:1156)
    by  dde_connect (shlexec.c:878)
    by  execute_from_key (shlexec.c:948)
    by  SHELL_quote_and_execute (shlexec.c:1393)
    by  SHELL_execute (shlexec.c:1753)
    by  ShellExecuteExA (shlexec.c:1847)
    by  shell_execute_ex (shlexec.c:169)
    by  ddeThread (shlexec.c:1200)
    by  ??? (thread.c:128)
    by  call_thread_func (thread.c:383)
    by  start_thread (thread.c:443)
    by  start_thread (in /lib/tls/i686/cmov/libpthread-2.7.so)
    by  clone (in /lib/tls/i686/cmov/libc-2.7.so)
  Uninitialised value was created by a stack allocation
    at  dde_connect (shlexec.c:750)

(And as a result, leaves the unused part of the output buffer unset,
which causes
three new valgrind warnings on write to socket, but that can be dealt
with later,
it's less serious.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: user32-dde_client-wchar.patch
Type: text/x-diff
Size: 1657 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080615/8b949ff6/attachment.patch 


More information about the wine-patches mailing list