summaryrefslogtreecommitdiffstats
path: root/src/usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/usb.c')
-rw-r--r--src/usb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/usb.c b/src/usb.c
index dfea3dd..63d0208 100644
--- a/src/usb.c
+++ b/src/usb.c
@@ -369,7 +369,7 @@ static int submit_vendor_specific(struct libusb_device_handle *handle, struct mo
369{ 369{
370 struct libusb_transfer* ctrl_transfer = libusb_alloc_transfer(0); 370 struct libusb_transfer* ctrl_transfer = libusb_alloc_transfer(0);
371 int ret = 0; 371 int ret = 0;
372 unsigned char* buffer = malloc(LIBUSB_CONTROL_SETUP_SIZE + context->wLength); 372 unsigned char* buffer = calloc(LIBUSB_CONTROL_SETUP_SIZE + context->wLength, 1);
373 uint8_t bRequestType = LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_IN | LIBUSB_RECIPIENT_DEVICE; 373 uint8_t bRequestType = LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_IN | LIBUSB_RECIPIENT_DEVICE;
374 libusb_fill_control_setup(buffer, bRequestType, context->bRequest, context->wValue, context->wIndex, context->wLength); 374 libusb_fill_control_setup(buffer, bRequestType, context->bRequest, context->wValue, context->wIndex, context->wLength);
375 375