diff options
Diffstat (limited to 'lib/libusb/libusb20_desc.c')
-rw-r--r-- | lib/libusb/libusb20_desc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libusb/libusb20_desc.c b/lib/libusb/libusb20_desc.c index e0d2c54..5206cf4 100644 --- a/lib/libusb/libusb20_desc.c +++ b/lib/libusb/libusb20_desc.c @@ -118,6 +118,9 @@ libusb20_parse_config_desc(const void *config_desc) if (lub_config == NULL) { return (NULL); /* out of memory */ } + /* make sure memory is initialised */ + memset(lub_config, 0, size); + lub_interface = (void *)(lub_config + 1); lub_alt_interface = (void *)(lub_interface + niface_no_alt); lub_endpoint = (void *)(lub_interface + niface); |