diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2012-06-05 18:24:12 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-07 14:26:29 +0900 |
commit | 74dcd439bf8c16b01f9f5a9dffb2b171ed94e2e5 (patch) | |
tree | 9cc1f7185399fb3cf0f4cb193adbc377c7bed7e2 /drivers/amba | |
parent | a21e6bfeb40eddf365d3e7841b37f3708fa6b13f (diff) |
iio: iio_enum_available_read: Prevent possible buffer overflow
Use scnprint instead of snprintf, because snprintf returns the number of bytes
that would have been written to the buffer if there was enough space, and as a
result writing to buf[len-1] might cause a access beyond the buffers limits.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/amba')
0 files changed, 0 insertions, 0 deletions