Re: [PATCH v4] drivers/iio: Remove all strcpy() uses

From: Len Baker
Date: Sun Aug 15 2021 - 04:21:11 EST


Hi Andy,

On Sat, Aug 14, 2021 at 10:36:18PM +0300, Andy Shevchenko wrote:
> On Sat, Aug 14, 2021 at 4:55 PM Len Baker <len.baker@xxxxxxx> wrote:
> >
> > strcpy() performs no bounds checking on the destination buffer. This
> > could result in linear overflows beyond the end of the buffer, leading
> > to all kinds of misbehaviors. So, remove all the uses and add
> > devm_kstrdup() or devm_kasprintf() instead.
> >
> > This patch is an effort to clean up the proliferation of str*()
> > functions in the kernel and a previous step in the path to remove
> > the strcpy function from the kernel entirely [1].
> >
> > [1] https://github.com/KSPP/linux/issues/88
>
> Thank you very much for doing this!
> Now I like the result,
> Reviewed-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>

Thank you too Andy (and folks) for your help on this.

Regards,
Len