OSDN Git Service

iio: potentiometer: ds1803: Remove VLA usage
authorHimanshu Jha <himanshujha199640@gmail.com>
Thu, 8 Mar 2018 18:45:33 +0000 (00:15 +0530)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 10 Mar 2018 15:02:41 +0000 (15:02 +0000)
commita937729c9358f1c66a444af1f4f64ececc9a2f68
tree296fdadbf0adf929396e3ed5c7545b23eca458fe
parent2ab5b72453672ea18a176925becc40888df435ce
iio: potentiometer: ds1803: Remove VLA usage

In preparation to enabling -Wvla, remove VLA usage and replace it
with fixed a fixed length array and therefore, prevent potential
stack overflow attacks.

Fixed as a part of the discussion to remove all VLAs from the kernel:
https://lkml.org/lkml/2018/3/7/621

Cc: keescook@chromium.org
Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/potentiometer/ds1803.c