mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] iio: chemical: sps30: fix buffer size calculations
@ 2026-02-12 12:46 Antoniu Miclaus
  2026-02-12 12:46 ` [PATCH 1/2] iio: chemical: sps30_i2c: fix buffer size in sps30_i2c_read_meas() Antoniu Miclaus
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Antoniu Miclaus @ 2026-02-12 12:46 UTC (permalink / raw)
  To: Tomasz Duszynski, Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko, linux-iio, linux-kernel
  Cc: Antoniu Miclaus

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(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-02-18 19:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-12 12:46 [PATCH 0/2] iio: chemical: sps30: fix buffer size calculations Antoniu Miclaus
2026-02-12 12:46 ` [PATCH 1/2] iio: chemical: sps30_i2c: fix buffer size in sps30_i2c_read_meas() Antoniu Miclaus
2026-02-12 13:20   ` Andy Shevchenko
2026-02-16  6:06   ` Tomasz Duszyński
2026-02-12 12:46 ` [PATCH 2/2] iio: chemical: sps30_serial: fix buffer size in sps30_serial_read_meas() Antoniu Miclaus
2026-02-12 13:21   ` Andy Shevchenko
2026-02-16  6:07   ` Tomasz Duszyński
2026-02-18 19:24 ` [PATCH 0/2] iio: chemical: sps30: fix buffer size calculations Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome