Module Name: src
Committed By: christos
Date: Wed Mar 26 16:10:20 UTC 2014
Modified Files:
src/sys/arch/emips/stand/common: boot.c
Log Message:
fix sprintf
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/emips/stand/common/boot.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/arch/emips/stand/common/boot.c
diff -u src/sys/arch/emips/stand/common/boot.c:1.2 src/sys/arch/emips/stand/common/boot.c:1.3
--- src/sys/arch/emips/stand/common/boot.c:1.2 Mon Feb 24 02:46:33 2014
+++ src/sys/arch/emips/stand/common/boot.c Wed Mar 26 12:10:20 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: boot.c,v 1.2 2014/02/24 07:46:33 martin Exp $ */
+/* $NetBSD: boot.c,v 1.3 2014/03/26 16:10:20 christos Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -320,7 +320,7 @@ devcanon(char *fname)
/* Copy kernel name before we overwrite, then do it */
strcpy(file_name, (*cp) ? cp : kernelnames[0]);
- sprintf(fname,"%c/%s(%c,%c)/%s",
+ snprintf(fname, PATH_MAX, "%c/%s(%c,%c)/%s",
ctlr + '0', device_name, unit + '0', part + '0', file_name);
//printf("devcanon -> %s\n",fname);