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:3.515 / U:21.232 seconds]
    ©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site