mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
d722f1e06f
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. Also, modify the "for" loop conditions to clarify the access to the st->orientation.rotation buffer. 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 Signed-off-by: Len Baker <len.baker@gmx.com> Link: https://lore.kernel.org/r/20210815174204.126593-1-len.baker@gmx.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> |
||
---|---|---|
.. | ||
inv_mpu_acpi.c | ||
inv_mpu_aux.c | ||
inv_mpu_aux.h | ||
inv_mpu_core.c | ||
inv_mpu_i2c.c | ||
inv_mpu_iio.h | ||
inv_mpu_magn.c | ||
inv_mpu_magn.h | ||
inv_mpu_ring.c | ||
inv_mpu_spi.c | ||
inv_mpu_trigger.c | ||
Kconfig | ||
Makefile |