Messages in this thread | | | From | Justin Stitt <> | Date | Wed, 3 Apr 2024 10:46:50 -0700 | Subject | Re: [PATCH] kdb: replace deprecated strncpy |
| |
On Wed, Apr 3, 2024 at 4:23 AM Daniel Thompson <daniel.thompson@linaro.org> wrote: > > - strncpy(cp, p_tmp+len, len_tmp-len + 1); > > + memcpy(cp, p_tmp+len, len_tmp-len + 1); > > Roughly the same question here. The original coded is obviously wrong > so trusting it did the boundary checks properly seems unwise. > > Are you sure it is OK to make this copy with checking against bufend? >
I am going to revisit this and find a better solution. Thanks Daniel.
> > Daniel.
| |