Skip to content

Commit 124bb6d

Browse files
committed
perf ui scripts: Switch FILENAME_MAX to NAME_MAX
JIRA: https://issues.redhat.com/browse/RHEL-78198 upstream ======== commit 008b757 Author: Ian Rogers <irogers@google.com> Date: Thu Jul 17 08:08:55 2025 -0700 description =========== FILENAME_MAX is the same as PATH_MAX (4kb) in glibc rather than NAME_MAX's 255. Switch to using NAME_MAX and ensure the '\0' is accounted for in the path's buffer size. Signed-off-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20250717150855.1032526-3-irogers@google.com Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Michael Petlan <mpetlan@redhat.com>
1 parent 66285c6 commit 124bb6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/ui/browsers/scripts.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static int check_ev_match(int dir_fd, const char *scriptname, struct perf_sessio
9494
FILE *fp;
9595

9696
{
97-
char filename[FILENAME_MAX + 5];
97+
char filename[NAME_MAX + 5];
9898
int fd;
9999

100100
scnprintf(filename, sizeof(filename), "bin/%s-record", scriptname);

0 commit comments

Comments
 (0)