Re: [PATCH 1/2] iio: fix possible buffer overflow

2014-05-03 Thread Alexandre Belloni
On 03/05/2014 at 11:11:50 +0100, Jonathan Cameron wrote : > On 02/05/14 23:40, Alexandre Belloni wrote: > >Found using smatch: > >drivers/iio/industrialio-core.c:719 iio_device_add_info_mask_type() error: > >buffer overflow 'iio_chan_info_postfix' 17 <= 63 > > > >It was probably never hit because

Re: [PATCH 1/2] iio: fix possible buffer overflow

2014-05-03 Thread Jonathan Cameron
On 02/05/14 23:40, Alexandre Belloni wrote: Found using smatch: drivers/iio/industrialio-core.c:719 iio_device_add_info_mask_type() error: buffer overflow 'iio_chan_info_postfix' 17 <= 63 It was probably never hit because the info_mask_* members are filled by using the BIT() macro with values

Re: [PATCH 1/2] iio: fix possible buffer overflow

2014-05-03 Thread Jonathan Cameron
On 02/05/14 23:40, Alexandre Belloni wrote: Found using smatch: drivers/iio/industrialio-core.c:719 iio_device_add_info_mask_type() error: buffer overflow 'iio_chan_info_postfix' 17 = 63 It was probably never hit because the info_mask_* members are filled by using the BIT() macro with values

Re: [PATCH 1/2] iio: fix possible buffer overflow

2014-05-03 Thread Alexandre Belloni
On 03/05/2014 at 11:11:50 +0100, Jonathan Cameron wrote : On 02/05/14 23:40, Alexandre Belloni wrote: Found using smatch: drivers/iio/industrialio-core.c:719 iio_device_add_info_mask_type() error: buffer overflow 'iio_chan_info_postfix' 17 = 63 It was probably never hit because the

[PATCH 1/2] iio: fix possible buffer overflow

2014-05-02 Thread Alexandre Belloni
Found using smatch: drivers/iio/industrialio-core.c:719 iio_device_add_info_mask_type() error: buffer overflow 'iio_chan_info_postfix' 17 <= 63 It was probably never hit because the info_mask_* members are filled by using the BIT() macro with values from the iio_chan_info_enum enum that also

[PATCH 1/2] iio: fix possible buffer overflow

2014-05-02 Thread Alexandre Belloni
Found using smatch: drivers/iio/industrialio-core.c:719 iio_device_add_info_mask_type() error: buffer overflow 'iio_chan_info_postfix' 17 = 63 It was probably never hit because the info_mask_* members are filled by using the BIT() macro with values from the iio_chan_info_enum enum that also serve