diff -uprN libusb-0.1.12/error.c libusb-0.1.12-patched/error.c --- libusb-0.1.12/error.c 2004-01-27 23:36:34.000000000 +0100 +++ libusb-0.1.12-patched/error.c 2024-11-05 16:37:59.767612638 +0100 @@ -12,7 +12,7 @@ #include "usb.h" #include "error.h" -char usb_error_str[1024] = ""; +char usb_error_str[16500] = ""; int usb_error_errno = 0; usb_error_type_t usb_error_type = USB_ERROR_TYPE_NONE; diff -uprN libusb-0.1.12/error.h libusb-0.1.12-patched/error.h --- libusb-0.1.12/error.h 2004-01-27 23:36:34.000000000 +0100 +++ libusb-0.1.12-patched/error.h 2024-11-05 16:37:46.932613826 +0100 @@ -7,7 +7,7 @@ typedef enum { USB_ERROR_TYPE_ERRNO, } usb_error_type_t; -extern char usb_error_str[1024]; +extern char usb_error_str[16500]; extern int usb_error_errno; extern usb_error_type_t usb_error_type; diff -uprN libusb-0.1.12/linux.c libusb-0.1.12-patched/linux.c --- libusb-0.1.12/linux.c 2006-03-04 03:52:46.000000000 +0100 +++ libusb-0.1.12-patched/linux.c 2024-11-05 16:45:57.640568432 +0100 @@ -22,7 +22,7 @@ static char usb_path[PATH_MAX + 1] = ""; static int device_open(struct usb_device *dev) { - char filename[PATH_MAX + 1]; + char filename[4*PATH_MAX + 1]; int fd; snprintf(filename, sizeof(filename) - 1, "%s/%s/%s", @@ -368,9 +368,9 @@ int usb_os_find_devices(struct usb_bus * struct usb_device *fdev = NULL; DIR *dir; struct dirent *entry; - char dirpath[PATH_MAX + 1]; + char dirpath[2*PATH_MAX + 3]; - snprintf(dirpath, PATH_MAX, "%s/%s", usb_path, bus->dirname); + snprintf(dirpath, 2*PATH_MAX+2, "%s/%s", usb_path, bus->dirname); dir = opendir(dirpath); if (!dir) @@ -379,7 +379,7 @@ int usb_os_find_devices(struct usb_bus * while ((entry = readdir(dir)) != NULL) { unsigned char device_desc[DEVICE_DESC_LENGTH]; - char filename[PATH_MAX + 1]; + char filename[3*PATH_MAX + 4]; struct usb_device *dev; struct usb_connectinfo connectinfo; int i, fd, ret;