linux/drivers/iio
Dan Carpenter afc3a57a2e iio:imu: adis16480: show_firmware() buffer too small
Smatch complains that snprintf() returns the number of characters,
not counting the NUL terminator, which *would* have been printed if
there were enough space.  In other words the return value could be more
than sizeof(buf).

In this case, we are printing something like "ff.ff\n" which is at most
6 characters and a NUL so that's not an issue.  I changed snprintf() to
scnprintf() to silence the warning.

But since the buffer doesn't include space for the NUL terminator, we
need to make it bigger or the "\n" will be truncated off.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-By: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-11-30 13:10:16 +00:00
..
accel iio: hid-sensor: Return proper error if kmemdup fails 2012-11-17 10:17:28 +00:00
adc iio: adc: Add Texas Instruments ADC081C021/027 support 2012-11-30 12:57:09 +00:00
amplifiers iio: amplifiers: New driver for AD8366 Dual-Digital Variable Gain Amplifier 2012-05-14 13:15:39 -07:00
common iio: hid-sensors: convert HID_SENSOR_ENUM_BASE_QUIRKS to bool 2012-11-17 10:15:41 +00:00
dac iio:dac:ad5449: unlock on error path 2012-10-31 10:59:55 +00:00
frequency iio: frequency: ADF4350: Fix potential reference div factor overflow. 2012-08-16 20:24:33 +01:00
gyro iio:gyro: adis16136: divide by zero in write_frequency() 2012-11-30 13:09:22 +00:00
imu iio:imu: adis16480: show_firmware() buffer too small 2012-11-30 13:10:16 +00:00
light iio: hid-sensor: Return proper error if kmemdup fails 2012-11-17 10:17:28 +00:00
magnetometer iio: hid-sensor: Return proper error if kmemdup fails 2012-11-17 10:17:28 +00:00
buffer_cb.c staging:iio: add a callback buffer for in kernel push interface 2012-11-10 10:17:27 +00:00
iio_core_trigger.h
iio_core.h
industrialio-buffer.c staging:iio: Add support for multiple buffers 2012-11-10 10:17:21 +00:00
industrialio-core.c iio: Factor out fixed point number parsing into its own function 2012-11-20 21:26:39 +00:00
industrialio-event.c drivers/iio/industrialio-event.c: eliminate possible double free 2012-11-17 10:17:20 +00:00
industrialio-trigger.c iio:trigger: Register sysfs file statically 2012-07-08 10:39:58 +01:00
industrialio-triggered-buffer.c iio: Add helper function for initializing triggered buffers 2012-06-18 17:26:09 -07:00
inkern.c staging:iio:in kernel users: Add a data field for channel specific info. 2012-11-10 10:17:27 +00:00
Kconfig staging:iio: Move adis library out of staging 2012-11-19 22:22:12 +00:00
kfifo_buf.c iio: Drop timestamp parameter from buffer store_to callback 2012-09-08 10:14:34 +01:00
Makefile staging:iio: Move adis library out of staging 2012-11-19 22:22:12 +00:00