summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--patches/busybox/0010-lsusb-show-goddamn-descriptors.patch4
1 files changed, 3 insertions, 1 deletions
diff --git a/patches/busybox/0010-lsusb-show-goddamn-descriptors.patch b/patches/busybox/0010-lsusb-show-goddamn-descriptors.patch
index 193cc4f..e937991 100644
--- a/patches/busybox/0010-lsusb-show-goddamn-descriptors.patch
+++ b/patches/busybox/0010-lsusb-show-goddamn-descriptors.patch
@@ -16,7 +16,7 @@ Index: busybox-1.36.1/util-linux/lsusb.c
parser = config_open2(uevent_filename, fopen_for_read);
free(uevent_filename);
-@@ -58,10 +62,37 @@ static int FAST_FUNC fileAction(struct r
+@@ -58,10 +62,39 @@ static int FAST_FUNC fileAction(struct r
continue;
}
}
@@ -29,6 +29,7 @@ Index: busybox-1.36.1/util-linux/lsusb.c
+ FILE* manu_file = fopen(manu_filename, "r");
+ fread(manu_buf, 1, MIN(manu_stat.st_size, sizeof(manu_buf)), manu_file);
+ fclose(manu_file);
++ manu_buf[sizeof(manu_buf) - 1] = '\0';
+ }
+ }
+ {
@@ -39,6 +40,7 @@ Index: busybox-1.36.1/util-linux/lsusb.c
+ FILE* product_file = fopen(product_filename, "r");
+ fread(product_buf, 1, MIN(product_stat.st_size, sizeof(product_buf)), product_file);
+ fclose(product_file);
++ product_buf[sizeof(product_buf) - 1] = '\0';
+ }
+ }
+