summaryrefslogtreecommitdiff
path: root/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp')
-rw-r--r--src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp
index bddbba7940..0c753be781 100644
--- a/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp
+++ b/src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp
@@ -86,7 +86,7 @@ int __cdecl main(int argc, char *argv[])
"the variable PALTEST.\n");
}
- memset(NewValue,0,BUF_SIZE);
+ memset(NewValue,0,BUF_SIZE * sizeof(NewValue[0]));
/* Grab the Environment variable we just set */
if(GetEnvironmentVariable(VariableBuffer,NewValue,BUF_SIZE) <= 0)
@@ -122,7 +122,7 @@ int __cdecl main(int argc, char *argv[])
"the variable PALTEST.\n");
}
- memset(NewValue,0,BUF_SIZE);
+ memset(NewValue,0,BUF_SIZE*sizeof(NewValue[0]));
/* Grab the Environment variable we just set, ensure that it's
empty now.