Page MenuHomeFreeBSD

D36495.diff
No OneTemporary

D36495.diff

diff --git a/sys/dev/acpica/acpi_thermal.c b/sys/dev/acpica/acpi_thermal.c
--- a/sys/dev/acpica/acpi_thermal.c
+++ b/sys/dev/acpica/acpi_thermal.c
@@ -176,7 +176,7 @@
static int acpi_tz_polling_rate = TZ_POLLRATE;
static int acpi_tz_override;
-/* Timezone polling thread */
+/* Thermal zone polling thread */
static struct proc *acpi_tz_proc;
ACPI_LOCK_DECL(thermal, "ACPI thermal zone");
@@ -201,7 +201,7 @@
struct acpi_tz_softc *sc;
struct acpi_softc *acpi_sc;
int error;
- char oidname[8];
+ char oidname[16];
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
@@ -257,7 +257,7 @@
"allow override of thermal settings");
}
sysctl_ctx_init(&sc->tz_sysctl_ctx);
- sprintf(oidname, "tz%d", device_get_unit(dev));
+ snprintf(oidname, sizeof(oidname), "tz%d", device_get_unit(dev));
sc->tz_sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&sc->tz_sysctl_ctx,
SYSCTL_CHILDREN(acpi_tz_sysctl_tree), OID_AUTO, oidname,
CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "", "thermal_zone");

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 26, 12:27 PM (10 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28029444
Default Alt Text
D36495.diff (1 KB)

Event Timeline