Re: [PATCH] perf: replace strcpy() with strncpy() in util/jitdump.c

From: Namhyung Kim

Date: Fri Nov 21 2025 - 15:03:00 EST


On Wed, 19 Nov 2025 23:16:10 -0500, Hrishikesh Suresh wrote:
> Usage of strcpy() can lead to buffer overflows. Therefore, it has been
> replaced with strncpy(). The output file path is provided as a parameter
> and might be restricted by command-line by default. But this defensive
> patch will prevent any potential overflow, making the code more robust
> against future changes in input handling.
>
> Testing:
> - ran perf test from tools/perf and did not observe any regression with
> the earlier code
>
> [...]
Applied to perf-tools-next, thanks!

Best regards,
Namhyung