Re: [linux-next:master 4605/11713] kernel/trace/trace_events_synth.c:65:9: warning: 'strncpy' specified bound depends on the length of the source argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 10 Mar 2022 10:08:18 -0600
Tom Zanussi <zanussi@xxxxxxxxxx> wrote:

> This patch is for the last_cmd_set() in trace_events_synth.c, yours is
> for trace_events_hist.c, which also has last_cmd_set().

Ug, name confusion :-p

> 
> The one in trace_events_synth.c is much simpler, so it seemed to me
> that strcpy() would be ok there.

If you are only copying the string, why not just use kstrdup()?

-- Steve




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux