mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Set lpnSize when insufficient
This commit is contained in:
1 parent
0f07a65f50
commit
4a2c1c5a95
1 file changed
+1
@@ -80,6 +80,7 @@ BOOL GetUserName(WCHAR_T *lpBuffer, LPDWORD lpnSize)
|
||||
|
||||
if (output.size()/2 + 1 > *lpnSize) {
|
||||
errno = ERROR_INSUFFICIENT_BUFFER;
|
||||
*lpnSize = output.size()/2 + 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user