diff options
Diffstat (limited to 'tools/perf/util/abspath.c')
-rw-r--r-- | tools/perf/util/abspath.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/abspath.c b/tools/perf/util/abspath.c index 61d33b81fc97..a791dd467261 100644 --- a/tools/perf/util/abspath.c +++ b/tools/perf/util/abspath.c @@ -50,7 +50,8 @@ const char *make_absolute_path(const char *path) die ("Could not get current working directory"); if (last_elem) { - int len = strlen(buf); + len = strlen(buf); + if (len + strlen(last_elem) + 2 > PATH_MAX) die ("Too long path name: '%s/%s'", buf, last_elem); |