[psutil] r1262 committed - Double the buffer size of the environment string because 4096 seems no...

1 view
Skip to first unread message

psu...@googlecode.com

unread,
Feb 1, 2012, 7:12:36 PM2/1/12
to psutil-...@googlegroups.com
Revision: 1262
Author: g.rodola
Date: Wed Feb 1 16:11:47 2012
Log: Double the buffer size of the environment string because 4096
seems not to be enough (string gets truncated). Not sure whether this is
safe though. :-\
http://code.google.com/p/psutil/source/detail?r=1262

Modified:
/trunk/psutil/_psutil_mswindows.c

=======================================
--- /trunk/psutil/_psutil_mswindows.c Wed Feb 1 15:17:50 2012
+++ /trunk/psutil/_psutil_mswindows.c Wed Feb 1 16:11:47 2012
@@ -2020,7 +2020,7 @@
PVOID rtlUserProcParamsAddress;
PVOID currentEnv;
MEMORY_BASIC_INFORMATION info;
- WCHAR buf[4096];
+ WCHAR buf[8192]; // XXX is this safe?
DWORD size = sizeof(buf);
PyObject *returnPyObj = NULL;
PyObject *env_from_wchar = NULL;

Reply all
Reply to author
Forward
0 new messages