dlls/ntdll/tests/env.c -- fixed unitialized buffers, found via valgrind

Zac Brown zac at zacbrown.org
Wed Nov 21 21:01:06 CST 2007


Hi,

Fixes valgrind error:
    http://kegel.com/wine/valgrind/20071121/vg-ntdll_env.txt

Changelog:
* Initialize buffers used in test using memset

-- 
Zac Brown (817-266-6867)
zac at zacbrown.org
http://zacbrown.org




---
dlls/ntdll/tests/env.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/ntdll/tests/env.c b/dlls/ntdll/tests/env.c
index d822946..c72d5d0 100644
--- a/dlls/ntdll/tests/env.c
+++ b/dlls/ntdll/tests/env.c
@@ -89,6 +89,8 @@ static void testQuery(void)

for (test = tests; test->var; test++)
{
+ memset(bn, '\0', sizeof(bn));
+ memset(bv, '\0', sizeof(bv));
name.Length = strlen(test->var) * 2;
name.MaximumLength = name.Length + 2;
name.Buffer = bn;
-- 
1.5.2.5



More information about the wine-patches mailing list