Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/emips/stand/common fix sprintf



details:   https://anonhg.NetBSD.org/src/rev/d95114fea912
branches:  trunk
changeset: 794843:d95114fea912
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Mar 26 16:10:20 2014 +0000

description:
fix sprintf

diffstat:

 sys/arch/emips/stand/common/boot.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r fee96bb9f7e9 -r d95114fea912 sys/arch/emips/stand/common/boot.c
--- a/sys/arch/emips/stand/common/boot.c        Wed Mar 26 16:08:45 2014 +0000
+++ b/sys/arch/emips/stand/common/boot.c        Wed Mar 26 16:10:20 2014 +0000
@@ -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 @@
 
        /* 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);



Home | Main Index | Thread Index | Old Index