increase buffer size
This commit is contained in:
parent
f314a01aa4
commit
ec3565b725
|
@ -1401,7 +1401,8 @@ static int sigar_remote_proc_env_get(sigar_t *sigar, sigar_pid_t pid,
|
||||||
if (status == SIGAR_OK) {
|
if (status == SIGAR_OK) {
|
||||||
LPBYTE ptr = (LPBYTE)env;
|
LPBYTE ptr = (LPBYTE)env;
|
||||||
DWORD size = sizeof(env);
|
DWORD size = sizeof(env);
|
||||||
UCHAR ent[1024];
|
UCHAR ent[4096];
|
||||||
|
|
||||||
while ((size > 0) && (*ptr != L'\0')) {
|
while ((size > 0) && (*ptr != L'\0')) {
|
||||||
DWORD len = (wcslen((LPWSTR)ptr) + 1) * sizeof(WCHAR);
|
DWORD len = (wcslen((LPWSTR)ptr) + 1) * sizeof(WCHAR);
|
||||||
SIGAR_W2A((WCHAR *)ptr, ent, sizeof(ent));
|
SIGAR_W2A((WCHAR *)ptr, ent, sizeof(ent));
|
||||||
|
|
Loading…
Reference in New Issue