mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-15 01:00:30 +01:00
Return NULL in *cmdname if the client argv or argv[0] is NULL
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/995>
(cherry picked from commit 59f5445a7f)
This commit is contained in:
parent
d09b70b4e0
commit
d09eca6f61
1 changed files with 2 additions and 3 deletions
|
|
@ -324,10 +324,9 @@ DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs)
|
|||
return;
|
||||
argv = kvm_getargv(kd, kp, 0);
|
||||
if (cmdname) {
|
||||
if (argv == NULL || argv[0] == NULL) {
|
||||
*cmdname = strdup("");
|
||||
if (argv == NULL || argv[0] == NULL)
|
||||
return;
|
||||
} else
|
||||
else
|
||||
*cmdname = strdup(argv[0]);
|
||||
}
|
||||
if (cmdargs) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue