increase buffer size

This commit is contained in:
Doug MacEachern 2007-08-21 05:43:10 +00:00
parent f314a01aa4
commit ec3565b725
1 changed files with 2 additions and 1 deletions

View File

@ -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));