zero the entire buffer
[reactos.git] / reactos / subsys / system / hostname / hostname.c
index 769039a..42f0c04 100644 (file)
@@ -35,7 +35,7 @@ int main (int argc, char ** argv)
                TCHAR ComputerName [MAX_COMPUTERNAME_LENGTH + 1];
                DWORD ComputerNameSize = sizeof ComputerName / sizeof ComputerName[0];
 
                TCHAR ComputerName [MAX_COMPUTERNAME_LENGTH + 1];
                DWORD ComputerNameSize = sizeof ComputerName / sizeof ComputerName[0];
 
-               ZeroMemory (ComputerName, ComputerNameSize);
+               ZeroMemory (ComputerName, sizeof ComputerName );
                if (GetComputerName(ComputerName, & ComputerNameSize))
                {
                        printf ("%s\n", ComputerName);
                if (GetComputerName(ComputerName, & ComputerNameSize))
                {
                        printf ("%s\n", ComputerName);