iio: force snprintf for PAGE_SIZE bufs
authorKees Cook <keescook@chromium.org>
Thu, 13 Mar 2014 16:46:00 +0000 (16:46 +0000)
committerJonathan Cameron <jic23@kernel.org>
Sat, 15 Mar 2014 14:45:14 +0000 (14:45 +0000)
commit598db5816664472e1649ef94b0ba4c5cc1b9f3b4
tree4b65ace56d7a9e5617dc98bd8af60986affd415c
parent24e7d7990179e5ed38e90d78d12c25fa201c618a
iio: force snprintf for PAGE_SIZE bufs

This is a tiny preventative measure to make sure we can't write beyond
PAGE_SIZE on the buffers being used in sysfs for iio. There is currently
no way for this to happen, but the change makes this code more robust
for the future.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/industrialio-core.c