The WebUSB spec has procedures such as "find a list of endpoint descriptors" that involve parsing a device's descriptors. What happens if a device's descriptors are malformed? For example, what if a device declares bNumEndpoints but doesn't follow it with the correct number of endpoint descriptors?
What should happen if WebUSB's interpretation of malformed descriptors ends up diverging from the operating system driver stack's attempts to interpret the same descriptors?
The WebUSB spec has procedures such as "find a list of endpoint descriptors" that involve parsing a device's descriptors. What happens if a device's descriptors are malformed? For example, what if a device declares
bNumEndpointsbut doesn't follow it with the correct number of endpoint descriptors?What should happen if WebUSB's interpretation of malformed descriptors ends up diverging from the operating system driver stack's attempts to interpret the same descriptors?