File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ XXXX-XX-XX
77
88**Bug fixes **
99
10+ - 1179 _: [Linux] Process cmdline() now takes into account misbehaving processes
11+ renaming the command line and using inappropriate chars to separate args.
1012- 1595 _: [Windows] Process.kill() may not throw AccessDenied.
1113- 1616 _: use of Py_DECREF instead of Py_CLEAR will result in double free and
1214 segfault (CVE). (patch by Riccardo Schirone)
Original file line number Diff line number Diff line change @@ -1651,9 +1651,8 @@ def cmdline(self):
16511651 data = data [:- 1 ]
16521652 cmdline = data .split (sep )
16531653 # Sometimes last char is a null byte '\0' but the args are
1654- # separated by spaces, see:
1655- # https://github.com/giampaolo/psutil/
1656- # issues/1179#issuecomment-552984549
1654+ # separated by spaces, see: https://github.com/giampaolo/psutil/
1655+ # issues/1179#issuecomment-552984549
16571656 if sep == '\x00 ' and len (cmdline ) == 1 and ' ' in data :
16581657 cmdline = data .split (' ' )
16591658 return cmdline
Original file line number Diff line number Diff line change @@ -1838,6 +1838,8 @@ def test_cmdline_spaces_mocked(self):
18381838 assert m .called
18391839
18401840 def test_cmdline_mixed_separators (self ):
1841+ # https://github.com/giampaolo/psutil/issues/
1842+ # 1179#issuecomment-552984549
18411843 p = psutil .Process ()
18421844 fake_file = io .StringIO (u ('foo\x20 bar\x00 ' ))
18431845 with mock .patch ('psutil._common.open' ,
You can’t perform that action at this time.
0 commit comments