Files
archived-hidapi/linux
Jonas Malaco 64b778b0dd hidraw: fix number of bytes to copy from uevent in parse_uevent_info (#497)
Commit 5c9f147a07 (#432) replaced a call to strdup with an explicit
memcpy to a buffer on the stack.

However, it incorrectly used the buffer size, instead of the clamped
uevent length, as the argument to memcpy, resulting in reads past the
end of uevent:

Fix this by using uevent_len as the argument to memcpy.

Calling strndupa was considered but abandoned, as it is not standard.

Fixes: 5c9f147a07 (#432)
Fixes: 4779d63d8760
2023-01-09 13:29:52 +02:00
..
2021-07-03 20:38:58 +03:00