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

From: Jonathan Cameron

Date: Wed Feb 18 2026 - 14:25:18 EST


On Thu, 12 Feb 2026 14:46:06 +0200
Antoniu Miclaus <antoniu.miclaus@xxxxxxxxxx> wrote:

> 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(-)
>
Applied to the fixes-togreg branch of iio.git and marked for stable.

Thanks,

Jonathan