diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fnettrace/static-ip-map | 3 | ||||
-rw-r--r-- | src/lib/pid.c | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/fnettrace/static-ip-map b/src/fnettrace/static-ip-map index 17ffe7f82..97bed7a1f 100644 --- a/src/fnettrace/static-ip-map +++ b/src/fnettrace/static-ip-map | |||
@@ -96,6 +96,9 @@ | |||
96 | 199.59.148.0/22 Twitter | 96 | 199.59.148.0/22 Twitter |
97 | 208.80.152.0/22 Wikipedia | 97 | 208.80.152.0/22 Wikipedia |
98 | 98 | ||
99 | # StackPath | ||
100 | 151.139.0.0/16 StackPath | ||
101 | |||
99 | # Akamai | 102 | # Akamai |
100 | 23.0.0.0/12 Akamai | 103 | 23.0.0.0/12 Akamai |
101 | 23.32.0.0/11 Akamai | 104 | 23.32.0.0/11 Akamai |
diff --git a/src/lib/pid.c b/src/lib/pid.c index 8b2a9b0f5..5e9b20c94 100644 --- a/src/lib/pid.c +++ b/src/lib/pid.c | |||
@@ -74,8 +74,14 @@ void pid_get_cpu_time(unsigned pid, unsigned *utime, unsigned *stime) { | |||
74 | if (fgets(line, PIDS_BUFLEN - 1, fp)) { | 74 | if (fgets(line, PIDS_BUFLEN - 1, fp)) { |
75 | char *ptr = line; | 75 | char *ptr = line; |
76 | // jump 13 fields | 76 | // jump 13 fields |
77 | |||
78 | // end of comm string | ||
79 | ptr = strchr(ptr, ')'); | ||
80 | if (ptr == NULL) | ||
81 | goto myexit; | ||
82 | |||
77 | int i; | 83 | int i; |
78 | for (i = 0; i < 13; i++) { | 84 | for (i = 0; i < 11; i++) { |
79 | while (*ptr != ' ' && *ptr != '\t' && *ptr != '\0') | 85 | while (*ptr != ' ' && *ptr != '\t' && *ptr != '\0') |
80 | ptr++; | 86 | ptr++; |
81 | if (*ptr == '\0') | 87 | if (*ptr == '\0') |