From d964d657ba3f328f25da6608e18e1eac3fa0ebf5 Mon Sep 17 00:00:00 2001 From: Carsten Grohmann Date: Mon, 7 Dec 2020 14:00:20 +0100 Subject: [PATCH] Allow all non-whitespace chars in program names Program names in Posix can contain all characters expect the null byte. The code allows \S (all non-whitespaces) and spaces in program names. This excluded some allowed characters like \n, \r and \t. No negative effects should arise from this. --- OOMAnalyser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OOMAnalyser.py b/OOMAnalyser.py index 04e1dea..0c30b41 100644 --- a/OOMAnalyser.py +++ b/OOMAnalyser.py @@ -318,7 +318,7 @@ class OOMAnalyser(object): """Analyse an OOM object and calculate additional values""" REC_INVOKED_OOMKILLER = re.compile( - r'^(?P[\w\- ]+) invoked oom-killer: ' + r'^(?P[\S ]+) invoked oom-killer: ' r'gfp_mask=(?P0x[a-z0-9]+)(\((?P[A-Z_|]+)\))?, ' r'(nodemask=(?P([\d,-]+|\(null\))), )?' r'order=(?P\d+), ' @@ -414,7 +414,7 @@ class OOMAnalyser(object): r'(?P\d+)\s+(?P\d+)\s+(?P-?\d+)\s+(?P.+)\s*') REC_OOM_KILL_PROCESS = re.compile( - r'^Out of memory: Kill process (?P\d+) \((?P[\w ]+)\) ' + r'^Out of memory: Kill process (?P\d+) \((?P[\S ]+)\) ' r'score (?P\d+) or sacrifice child', re.MULTILINE )