summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-misc/bbacpi/files/bbacpi-0.1.5-overflows.patch')
-rw-r--r--x11-misc/bbacpi/files/bbacpi-0.1.5-overflows.patch79
1 files changed, 0 insertions, 79 deletions
diff --git a/x11-misc/bbacpi/files/bbacpi-0.1.5-overflows.patch b/x11-misc/bbacpi/files/bbacpi-0.1.5-overflows.patch
deleted file mode 100644
index 23a0ce6..0000000
--- a/x11-misc/bbacpi/files/bbacpi-0.1.5-overflows.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-Fix buffer overflows
-
-https://bugs.gentoo.org/show_bug.cgi?id=338936
-
-Patch written by Kevin Pyle
---- bbacpi.cc
-+++ bbacpi.cc
-@@ -167,7 +167,7 @@
- if (ret = (fp = fopen(name, "r"))) {
- char buffer[100];
- char present[20];
-- fgets(buffer,128,fp);
-+ fgets(buffer, sizeof(buffer),fp);
- sscanf(buffer,"present: %s", present);
- if (strncmp(present, "yes", 3) != 0) {
- fprintf(stderr, "Device %s not present.\n", device);
-@@ -195,7 +195,7 @@
- {
- /* Read data in any order */
- found = 0;
-- while (found < 11 && (fgets(buffer, 63, fp) != NULL)) {
-+ while (found < 11 && (fgets(buffer, sizeof(buffer), fp) != NULL)) {
- /* Present */
- if (strncmp(buffer, "present:", 7) == 0
- || strncmp(buffer, "Present:", 7) == 0) {
-@@ -277,7 +277,7 @@
- {
- /* Read data in any order */
- found = 0;
-- while (found < 11 && (fgets(buffer, 63, fp) != NULL)) {
-+ while (found < 11 && (fgets(buffer, sizeof(buffer), fp) != NULL)) {
- /* Present */
- if (strncmp(buffer, "present:", 7) == 0
- || strncmp(buffer, "Present:", 7) == 0) {
-@@ -361,7 +361,7 @@
- if ((fp = fopen(names.temptrip, "r")))
- {
- found = 0;
-- while (found < 2 && (fgets(buffer,128,fp) != NULL)) {
-+ while (found < 2 && (fgets(buffer, sizeof(buffer),fp) != NULL)) {
- /* Critical */
- if (strncmp(buffer, "critical", 8) == 0
- || strncmp(buffer, "Critical", 8) == 0) {
-@@ -425,7 +425,7 @@
- if (file_status.st_mtime != last_mtime)
- {
- found = 0;
-- while (found < 4 && (fgets(buffer, 63, fp) != NULL)) {
-+ while (found < 4 && (fgets(buffer, sizeof(buffer), fp) != NULL)) {
- /* Charging state */
- if (strncmp(buffer, "charging state:", 15) == 0
- || strncmp(buffer, "Charging State:", 15) == 0) {
-@@ -463,7 +463,7 @@
- if (file_status.st_mtime != last_mtime)
- {
- found = 0;
-- while (found < 4 && (fgets(buffer, 63, fp) != NULL)) {
-+ while (found < 4 && (fgets(buffer, sizeof(buffer), fp) != NULL)) {
- /* Charging state */
- if (strncmp(buffer, "charging state:", 15) == 0
- || strncmp(buffer, "Charging State:", 15) == 0) {
-@@ -497,7 +497,7 @@
- if ((fp = fopen(names.adapter, "r")))
- {
- found = 0;
-- while (found < 1 && (fgets(buffer, 63,fp) != NULL)) {
-+ while (found < 1 && (fgets(buffer, sizeof(buffer),fp) != NULL)) {
- if (strncmp(buffer, "state:", 6) == 0
- || strncmp(buffer, "State:", 6) == 0) {
- sscanf(buffer+offset,"%s", adapter.state);
-@@ -511,7 +511,7 @@
- if ((fp = fopen(names.temperature, "r")))
- {
- found = 0;
-- while (found < 1 && (fgets(buffer, 63,fp) != NULL)) {
-+ while (found < 1 && (fgets(buffer, sizeof(buffer),fp) != NULL)) {
- if (strncmp(buffer, "temperature:", 12) == 0
- || strncmp(buffer, "Temperature:", 12) == 0) {
- sscanf(buffer+offset,"%u", &temperature.celcius);