windows_winusb: Bounds check interface for check_valid_interface
authorLéo Lam <leo@innovatetechnologi.es>
Fri, 3 May 2019 10:57:43 +0000 (12:57 +0200)
committerNathan Hjelm <hjelmn@me.com>
Mon, 8 Jul 2019 04:00:03 +0000 (22:00 -0600)
commit5305df7966eb920291cb2eafad27e5e201edd79b
treed0881b4f291d49038410a4e6bbc21678bc8966e9
parent028a92e5f4336e3ff99ddef8ae581b116bba6a9b
windows_winusb: Bounds check interface for check_valid_interface

This prevents a nasty out-of-bounds read and a likely crash when
the interface number is invalid.

Closes #568

Signed-off-by: Nathan Hjelm <hjelmn@me.com>
libusb/os/windows_winusb.c
libusb/version_nano.h