summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>2022-06-20 19:28:24 +0300
committerJiri Kosina <jkosina@suse.cz>2022-07-21 12:54:40 +0300
commit62ac2473553a00229e67bdf3cb023b62cf7f5a9a (patch)
tree0e190aa9d5101a22cef662e9964b9492b686d4a3 /tools/perf/scripts/python/export-to-postgresql.py
parent54eed5c7b938dc4ef6b14d4ee048bbdafdbce352 (diff)
downloadlinux-62ac2473553a00229e67bdf3cb023b62cf7f5a9a.tar.xz
HID: mcp2221: prevent a buffer overflow in mcp_smbus_write()
Smatch Warning: drivers/hid/hid-mcp2221.c:388 mcp_smbus_write() error: __memcpy() '&mcp->txbuf[5]' too small (59 vs 255) drivers/hid/hid-mcp2221.c:388 mcp_smbus_write() error: __memcpy() 'buf' too small (34 vs 255) The 'len' variable can take a value between 0-255 as it can come from data->block[0] and it is user data. So add an bound check to prevent a buffer overflow in memcpy(). Fixes: 67a95c21463d ("HID: mcp2221: add usb to i2c-smbus host bridge") Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions