Module Name:    src
Committed By:   joerg
Date:           Wed Apr  8 12:39:27 UTC 2009

Modified Files:
        src/sys/dev/acpi: acpi.c

Log Message:
sprintf -> snprintf


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/sys/dev/acpi/acpi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/acpi.c
diff -u src/sys/dev/acpi/acpi.c:1.124 src/sys/dev/acpi/acpi.c:1.125
--- src/sys/dev/acpi/acpi.c:1.124	Wed Apr  8 00:23:30 2009
+++ src/sys/dev/acpi/acpi.c	Wed Apr  8 12:39:27 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi.c,v 1.124 2009/04/08 00:23:30 dyoung Exp $	*/
+/*	$NetBSD: acpi.c,v 1.125 2009/04/08 12:39:27 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.124 2009/04/08 00:23:30 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.125 2009/04/08 12:39:27 joerg Exp $");
 
 #include "opt_acpi.h"
 #include "opt_pcifixup.h"
@@ -519,7 +519,8 @@
 #endif
 	acpi_build_tree(sc);
 
-	sprintf(acpi_supported_states, "%s%s%s%s%s%s",
+	snprintf(acpi_supported_states, sizeof(acpi_supported_states),
+	    "%s%s%s%s%s%s",
 	    is_available_state(sc, ACPI_STATE_S0) ? "S0 " : "",
 	    is_available_state(sc, ACPI_STATE_S1) ? "S1 " : "",
 	    is_available_state(sc, ACPI_STATE_S2) ? "S2 " : "",

Reply via email to