Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hidraw: fix number of bytes to copy from uevent in parse_uevent_info (#…
…497) Commit 5c9f147 (#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: 5c9f147 (#432) Fixes: 4779d63
- Loading branch information