lkml.org 
[lkml]   [2023]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] staging: qlge: Replace strncpy with strscpy
    On Fri, Oct 06, 2023 at 09:42:41AM +0300, Dan Carpenter wrote:
    > On Thu, Oct 05, 2023 at 08:14:55PM +0100, Ricardo Lopes wrote:
    > > Avoid read overflows and other misbehavior due to missing termination.
    > >
    >
    > There aren't any read overflows in the current code.
    >

    So when you're reviewing these to look for read overflows, a string
    literal isn't going to overflow. So that makes the last two obvious.
    But for the first one you have to review the caller qlge_gen_reg_dump()
    and the last parameter passed to qlge_build_coredump_seg_header() is
    always a string literal so that's obvious too.

    It's not really that much work to check for this.

    regards,
    dan carpenter

    \
     
     \ /
      Last update: 2023-10-06 08:50    [W:3.708 / U:0.388 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site