summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authoruvok cheetah2024-09-14 17:51:22 +0200
committeruvok cheetah2024-09-14 17:51:22 +0200
commit1a86fe35bb4f143d3df97950b874f9d05dc913f8 (patch)
tree7e46a7f0aec517d50c6909682632e3eadf8e56e1 /patches
parent44ef6b634ace907a577407d396da18df9aeb74ea (diff)
busybox fix: add zero termination (whoops!)
Diffstat (limited to 'patches')
-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';
+ }
+ }
+