soc: renesas: Prefer memcpy() over strcpy()
authorLen Baker <len.baker@gmx.com>
Sun, 8 Aug 2021 12:50:11 +0000 (14:50 +0200)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 12 Aug 2021 10:36:57 +0000 (12:36 +0200)
commit148bcca9ad0488d623aa36b21ac152bb056a1ae4
tree5f1b5512f0506500396eaaffb277038c3a3a6b3c
parentbfe6b5590ce6cab81b3ee51b4541bd1d0b18b3b2
soc: renesas: Prefer memcpy() over strcpy()

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, use memcpy() as a safe replacement.

This is a previous step in the path to remove the strcpy() function
entirely from the kernel.

Signed-off-by: Len Baker <len.baker@gmx.com>
Link: https://lore.kernel.org/r/20210808125012.4715-3-len.baker@gmx.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/soc/renesas/r8a779a0-sysc.c
drivers/soc/renesas/rcar-sysc.c