descriptor: Fix alignment for 32-bit words in parse_descriptor
authorSaleem Rashid <dev@saleemrashid.com>
Thu, 21 May 2020 17:12:04 +0000 (18:12 +0100)
committerChris Dickens <christopher.a.dickens@gmail.com>
Mon, 10 Aug 2020 17:45:09 +0000 (10:45 -0700)
commitf492968d953f233e6b6946afd402f6718ff7a500
treede634a94f8b26a4e7643c62222085e3806acdd7b
parent4261cbefc716e49d459426593cef0104482ec43b
descriptor: Fix alignment for 32-bit words in parse_descriptor

parse_descriptor was aligning 32-bit words to 2 bytes, instead of 4
bytes. This didn't cause any issues before, because the only time the
32-bit word code path is used is from a 3 byte offset (which
incidentally aligns to 4 bytes). However, a 1 byte offset would
incorrectly align to 2 bytes.

Closes #734

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
libusb/descriptor.c
libusb/version_nano.h