mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-25 02:30:06 +01:00
Return NULL in *cmdname if the client argv or argv[0] is NULL
(cherry picked from commit 59f5445a7f)
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1702>
This commit is contained in:
parent
e50ea9181a
commit
11d0f4f19d
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