You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code in iio_writedev.c:
216 size_t sample_size;
...
368 sample_size = iio_device_get_sample_size(dev);
...
404 num_samples -= write_len / sample_size;
There are two issues:
iio_device_get_sample_size can return negative error codes,
and we would miss these. Fix that by making it a signed number.
this could potentially cause an error if sample_size is zero.
Catch that fault and error out. While we are here, check
for negative error codes, and also error out.
Reported by Coverity.
Signed-off-by: Robin Getz <[email protected]>
foo
Signed-off-by: Robin Getz <[email protected]>
0 commit comments