[PATCH] USB: Changes to core/config.c (8 of 9)
This patch adds some extra error checking. The patch-comments list most it. Particularly worth noting is the check on the endpoint addresses. Since these addresses are used as indexes for the epmaxpacketin and epmaxpacketout arrays, illegal values could result in overwriting unrelated areas of memory. Other noteworthy checks involve interface and alsetting numbers. Since the old code ignored those values, of course it didn't bother to check them. Here we make sure that the numbers lie in the proper ranges and that there are no "missing" entries. Add error checking and improved error messages: Check for invalid endpoint descriptors and invalid endpoint addresses. Check for duplicate interface/altsetting descriptors. Check for invalid configuration descriptors. Check for missing interface/altsetting descriptors.
Showing
Please register or sign in to comment