From ec3565b725a3d510d1c08e299d060a4fd604a648 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Tue, 21 Aug 2007 05:43:10 +0000 Subject: [PATCH] increase buffer size --- src/os/win32/win32_sigar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/os/win32/win32_sigar.c b/src/os/win32/win32_sigar.c index de073e1e..10ff71ec 100644 --- a/src/os/win32/win32_sigar.c +++ b/src/os/win32/win32_sigar.c @@ -1401,7 +1401,8 @@ static int sigar_remote_proc_env_get(sigar_t *sigar, sigar_pid_t pid, if (status == SIGAR_OK) { LPBYTE ptr = (LPBYTE)env; DWORD size = sizeof(env); - UCHAR ent[1024]; + UCHAR ent[4096]; + while ((size > 0) && (*ptr != L'\0')) { DWORD len = (wcslen((LPWSTR)ptr) + 1) * sizeof(WCHAR); SIGAR_W2A((WCHAR *)ptr, ent, sizeof(ent));