Package: pystatgrab Severity: normal Tags: patch
Calling statgrab.sg_get_process_stats() more than once will crash the python interpreter. This was fixed back in 2005 and is detailed here: http://cvs.i-scream.org/viewvc.cgi/projects/pystatgrab/_statgrab.pyx?r1=1.17&r2=1.18 Patch below: --- _statgrab.pyx 2005-07-30 14:16:14.000000000 -0400 +++ ../_statgrab.pyx 2007-06-12 12:00:51.000000000 -0400 @@ -597,13 +597,20 @@ raise StatgrabException, 'sg_get_process_stats() returned NULL' list = [] for i from 0 <= i < entries: - if s.process_name == NULL: - s.process_name = '' - if s.proctitle == NULL: - s.proctitle = '' + + if s.process_name is NULL: + process_name = '' + else: + process_name = s.process_name + + if s.proctitle is NULL: + proctitle = '' + else: + proctitle = s.proctitle + list.append(Result( - {'process_name': s.process_name, - 'proctitle' : s.proctitle, + {'process_name': process_name, + 'proctitle' : proctitle, 'pid' : s.pid, 'parent' : s.parent, 'pgid' : s.pgid, -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (700, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.20.1 Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) Shell: /bin/sh linked to /bin/bash -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]