Searched hist:e47a0ced40472cfbe3e77502098ad489ba16bf97 (Results 1 – 1 of 1) sorted by relevance
/linux/drivers/i2c/busses/ |
H A D | i2c-sun6i-p2wi.c | diff e47a0ced40472cfbe3e77502098ad489ba16bf97 Tue Aug 17 18:58:59 CEST 2021 Len Baker <len.baker@gmx.com> i2c: sun6i-pw2i: Prefer strscpy over strlcpy
strlcpy() reads the entire source buffer first. This read may exceed the destination size limit. This is both inefficient and can lead to linear read overflows if a source string is not NUL-terminated. The safe replacement is strscpy().
This is a previous step in the path to remove the strlcpy() function entirely from the kernel [1].
[1] https://github.com/KSPP/linux/issues/89
Signed-off-by: Len Baker <len.baker@gmx.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
|