From 0a25c13b65dda072b88073b5f700761eae10c4fb Mon Sep 17 00:00:00 2001 From: Laan Tungir Date: Wed, 13 Aug 2025 15:41:29 -0400 Subject: [PATCH] Version v0.2.50 - Fixed compile warnings by increasing buffer sizes for USB path handling --- otp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/otp.c b/otp.c index 6071361..ee04fbd 100644 --- a/otp.c +++ b/otp.c @@ -2376,7 +2376,7 @@ int scan_usb_drives_for_pads(struct USBPadInfo** usb_pads, int* usb_count) { while ((mount_entry = readdir(mount_dir)) != NULL && count < 100) { if (mount_entry->d_name[0] == '.') continue; - char mount_path[512]; + char mount_path[1024]; snprintf(mount_path, sizeof(mount_path), "%s/%s", mount_dirs[mount_idx], mount_entry->d_name); // For /run/media, we need to go one level deeper (skip username) @@ -2388,7 +2388,7 @@ int scan_usb_drives_for_pads(struct USBPadInfo** usb_pads, int* usb_count) { while ((user_entry = readdir(user_dir)) != NULL && count < 100) { if (user_entry->d_name[0] == '.') continue; - char user_mount_path[512]; + char user_mount_path[1024]; snprintf(user_mount_path, sizeof(user_mount_path), "%s/%s", mount_path, user_entry->d_name); // Scan this mount point for pads @@ -2399,7 +2399,7 @@ int scan_usb_drives_for_pads(struct USBPadInfo** usb_pads, int* usb_count) { while ((drive_entry = readdir(drive_dir)) != NULL && count < 100) { // Look for .pad files in root of drive if (strstr(drive_entry->d_name, ".pad") && strlen(drive_entry->d_name) == 68) { - char pad_path[512], state_path[512]; + char pad_path[1024], state_path[1024]; snprintf(pad_path, sizeof(pad_path), "%s/%s", user_mount_path, drive_entry->d_name); // Extract checksum from filename