Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dae234 commit 91a3468Copy full SHA for 91a3468
1 file changed
PC/launcher.c
@@ -63,7 +63,7 @@ static wchar_t * get_env(wchar_t * key)
63
static wchar_t buf[256];
64
DWORD result = GetEnvironmentVariableW(key, buf, 256);
65
66
- if (result > 256) {
+ if (result > 255) {
67
/* Large environment variable. Accept some leakage */
68
wchar_t *buf2 = (wchar_t*)malloc(sizeof(wchar_t) * (result+1));
69
GetEnvironmentVariableW(key, buf2, result);
0 commit comments