Skip to content

iio: chemical: sps30: fix buffer size calculations

Antoniu Miclaus linux-iio lkml 1 version Applied

Status from this message: Applied to the fixes-togreg branch of iio.git and marked for stable.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2iio: chemical: sps30_i2c: fix buffer size in sps30_i2c_read_meas()drivers/iio/chemical/sps30_i2c.c+1 -12 replies
2/2iio: chemical: sps30_serial: fix buffer size in sps30_serial_read_meas()drivers/iio/chemical/sps30_serial.c+1 -12 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAndy ShevchenkoTomasz Duszynski
1/2R-b A-b
2/2R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] iio: chemical: sps30: fix buffer size calculations

Fix incorrect buffer size calculations in sps30_i2c_read_meas() and sps30_serial_read_meas(). Both functions used sizeof(num) which evaluates to sizeof(size_t) (8 bytes on 64-bit) instead of sizeof(*meas) (4 bytes for __be32), leading to oversized buffer requests.

Antoniu Miclaus (2):
iio: chemical: sps30_i2c: fix buffer size in sps30_i2c_read_meas()
iio: chemical: sps30_serial: fix buffer size in

    sps30_serial_read_meas()
 drivers/iio/chemical/sps30_i2c.c    | 2 +-
 drivers/iio/chemical/sps30_serial.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.43.0