aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/firejail/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c
index 94000d917..569fc7add 100644
--- a/src/firejail/main.c
+++ b/src/firejail/main.c
@@ -161,7 +161,8 @@ static inline int read_pid(char *str, pid_t *pid) {
161 || (errno != 0 && pidtmp == 0)) { 161 || (errno != 0 && pidtmp == 0)) {
162 return 1; 162 return 1;
163 } 163 }
164 if (endptr == str) { 164 // endptr points to '\0' char in str if the entire string is valid
165 if (endptr == NULL || endptr[0]!='\0') {
165 return 1; 166 return 1;
166 } 167 }
167 *pid = (pid_t)pidtmp; 168 *pid = (pid_t)pidtmp;