From f8257b7d96de1dc739b96284eafa9fc8f22fe4b4 Mon Sep 17 00:00:00 2001 From: smitsohu Date: Sun, 19 Aug 2018 21:43:14 +0200 Subject: fix also the second instance of pid_get_uid --- src/lib/pid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/pid.c b/src/lib/pid.c index b73a57409..75576c787 100644 --- a/src/lib/pid.c +++ b/src/lib/pid.c @@ -149,7 +149,7 @@ uid_t pid_get_uid(pid_t pid) { char buf[PIDS_BUFLEN]; while (fgets(buf, PIDS_BUFLEN - 1, fp)) { if (strncmp(buf, "Uid:", 4) == 0) { - char *ptr = buf + 5; + char *ptr = buf + 4; while (*ptr != '\0' && (*ptr == ' ' || *ptr == '\t')) { ptr++; } -- cgit v1.2.3-54-g00ecf