Messages in this thread | | | Date | Fri, 6 Oct 2023 09:49:14 +0300 | From | Dan Carpenter <> | Subject | Re: [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
| |