userenv: tests/userenv.c: fix buffer overrun
Dan Kegel
dank at kegel.com
Tue Jun 3 17:04:00 CDT 2008
[Sent to wrong list originally.
BTW, Lei wrote the original code, and likes the patch. ]
Found via valgrind. Fixes
Use of uninitialised value of size 4
at wine_cp_mbstowcs (mbtowc.c:79)
by MultiByteToWideChar (locale.c:1846)
by CompareStringA (locale.c:2722)
by get_env (userenv.c:140)
by func_userenv (userenv.c:218)
Uninitialised value was created by a stack allocation
at get_env (userenv.c:128)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: userenvtest.patch
Type: text/x-patch
Size: 643 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080603/c82a1f47/attachment.bin
More information about the wine-patches
mailing list