On 09/07/2018 06:08 AM, Prarit Bhargava wrote:
> gcc 8.1.0 warns with:
> 
> kernel/debug/kdb/kdb_support.c: In function ‘kallsyms_symbol_next’:
> kernel/debug/kdb/kdb_support.c:239:4: warning: ‘strncpy’ specified bound 
> depends on the length of the source argument [-Wstringop-overflow=]
>     strncpy(prefix_name, name, strlen(name)+1);
>     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> kernel/debug/kdb/kdb_support.c:239:31: note: length computed here
> 
> The strings do not need to be zero padded so use strlcpy() instead.
> 
> Signed-off-by: Prarit Bhargava <pra...@redhat.com>

Acked-by: Jonathan Toppins <jtopp...@redhat.com>


_______________________________________________
Kgdb-bugreport mailing list
Kgdb-bugreport@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to