mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Added test for buffer not having enough space to write computer name
This commit is contained in:
1 parent
b8ae6d13a9
commit
4661081c7d
2 files changed
+7
-4
No files matched your search
@@ -5,8 +5,8 @@
|
||||
BOOL GetComputerName(LPTSTR name, LPDWORD len)
|
||||
{
|
||||
errno = 0;
|
||||
|
||||
int host = gethostname(name, HOST_NAME_MAX);
|
||||
size_t len2 = *len;
|
||||
int host = gethostname(name, len2);
|
||||
if(host == 0)
|
||||
{
|
||||
return TRUE;
|
||||
|
||||
Reference in new issue
Block a user