lkml.org 
[lkml]   [2017]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 4/7] powerpc/kprobes: Use safer string functions in kprobe_lookup_name()
From
Date
On 04/21/2017 08:33 AM, Paul Clarke wrote:
> On 04/21/2017 07:33 AM, Naveen N. Rao wrote:
>> } else if (name[0] != '.') {
>> dot_name[0] = '.';
>> dot_name[1] = '\0';
>> - strncat(dot_name, name, KSYM_NAME_LEN - 2);
>> + strlcat(dot_name, name, sizeof(dot_name));
>
> and here do:
> strncpy(&dot_name[1], name, sizeof(dot_name));

oops. s/sizeof(dot_name)/sizeof(dot_name) - 1/

PC

\
 
 \ /
  Last update: 2017-04-21 15:37    [W:0.078 / U:0.212 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site