]> www.infradead.org Git - users/dwmw2/linux.git/commit
staging: gpib: Fix buffer overflow in ni_usb_init
authorDave Penkler <dpenkler@gmail.com>
Mon, 4 Nov 2024 17:50:02 +0000 (18:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Nov 2024 08:27:33 +0000 (09:27 +0100)
commit8023618a48dc8664a4493cc8279f988f9bd4ed0b
treebb35d5973ef20e76e5e98e161069059337f42682
parent1235b909d312b5e56e26a8e7310ba948a4811940
staging: gpib: Fix buffer overflow in ni_usb_init

The writes buffer size was not taking into account the number of
entries in the array which was causing random oopses.

Fixes: 4e127de14fa7 ("staging: gpib: Add National Instruments USB GPIB driver")
Signed-off-by: Dave Penkler <dpenkler@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20241104175014.12317-2-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gpib/ni_usb/ni_usb_gpib.c