Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
descriptor: Fix potential offsetting of pointer by too much
This was checking that `size` is at least `LIBUSB_DT_CONFIG_SIZE` (9) bytes long, but then increments the pointer with `buf += header.bLength`. That could end up pointing past of the end of the buffer. There is a subsequent check that would prevent dereferencing it, but it's still undefined behaviour to even create such a pointer. Add a check with a similar pattern as elsewhere in this file.
- Loading branch information