Source-Changes-HG archive

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

[src/trunk]: src/bin/ksh Wrong buffer len being passed to strlcpy(). Innocuous



details:   https://anonhg.NetBSD.org/src/rev/7fdd7d7ef074
branches:  trunk
changeset: 748377:7fdd7d7ef074
user:      seanb <seanb%NetBSD.org@localhost>
date:      Thu Oct 22 15:53:19 2009 +0000

description:
Wrong buffer len being passed to strlcpy().  Innocuous
here but...

diffstat:

 bin/ksh/misc.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r bec94101bd48 -r 7fdd7d7ef074 bin/ksh/misc.c
--- a/bin/ksh/misc.c    Thu Oct 22 14:30:05 2009 +0000
+++ b/bin/ksh/misc.c    Thu Oct 22 15:53:19 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: misc.c,v 1.13 2009/04/25 05:11:37 lukem Exp $  */
+/*     $NetBSD: misc.c,v 1.14 2009/10/22 15:53:19 seanb Exp $  */
 
 /*
  * Miscellaneous functions
@@ -6,7 +6,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: misc.c,v 1.13 2009/04/25 05:11:37 lukem Exp $");
+__RCSID("$NetBSD: misc.c,v 1.14 2009/10/22 15:53:19 seanb Exp $");
 #endif
 
 
@@ -96,7 +96,7 @@
                return NULL;
        len = strlen(s)+1;
        p = alloc(len, ap);
-       strlcpy(p, s, len+1);
+       strlcpy(p, s, len);
        return (p);
 }
 



Home | Main Index | Thread Index | Old Index