From d6f4dbb9c9597ad98110e4842eff80f3658d2a9d Mon Sep 17 00:00:00 2001 From: JNE Date: Mon, 14 Oct 2024 20:58:12 +0100 Subject: [PATCH] Block a process name that starts with a number This old parser needs to go --- src/kovid.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/kovid.c b/src/kovid.c index d8a0480..1136297 100644 --- a/src/kovid.c +++ b/src/kovid.c @@ -23,6 +23,7 @@ #include #include #include +#include #include "lkm.h" #include "fs.h" @@ -558,8 +559,9 @@ static ssize_t write_cb(struct file *fptr, const char __user *user, char *newname; pid = (pid_t)simple_strtol(s, NULL, 10); newname = strrchr(buf, ' '); - if (++newname) + if (newname && ++newname && !isdigit(*newname)) { kv_rename_task(pid, newname); + } } } proc_timeout(PRC_RESET);