kernel32: Fix the GetComputerName* functions to not write to the buffer at all if...
commitfc5b795f7c544e1dff850174ebf69c8dba458549
authorRob Shearman <rob@codeweavers.com>
Thu, 15 Feb 2007 23:22:18 +0000 (15 23:22 +0000)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 16 Feb 2007 12:13:17 +0000 (16 13:13 +0100)
tree2816f2c57bebf09daef545fa2274fba84e5c6486
parentc9b9847dce8cdf111458dbe5f2590ec15067674e
kernel32: Fix the GetComputerName* functions to not write to the buffer at all if there is not enough space.

Add tests for the GetComputerName* functions that show this issue.

Fix an off-by-one error in setting the size when there is not enough space.

Remove the exception handlers for GetComputerNameW,
GetComputerNameExA/W, since testing on XP SP2 shows that access
violations are not caught and these are not present on Win9x, which
does have an exception handler.
dlls/kernel32/computername.c
dlls/kernel32/tests/environ.c