On Fri, 9 Aug 2013, Ismail, Abdul R wrote: > Alan, > > Just wondering why we don't require the HCDs to validate the length > instead of blindly copying the descriptor to the buffer passed in. In > the pseudo host controller we are developing we only copy the number > of bytes requested to the buffer passed in. I don't know why it is done this why; that code was written a long time ago. Maybe because it makes things easier for the HCDs; often a descriptor has to be altered in the output buffer, and it's a lot harder to do this correctly if the buffer might be smaller than the descriptor. Allocating a single large buffer in one place takes less code overall than adding the size checks to every HCD. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html