Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/cksum Forgot +1 for NUL termination.



details:   https://anonhg.NetBSD.org/src/rev/3d9abdf628c5
branches:  trunk
changeset: 583976:3d9abdf628c5
user:      elad <elad%NetBSD.org@localhost>
date:      Fri Sep 02 16:52:34 2005 +0000

description:
Forgot +1 for NUL termination.

diffstat:

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

diffs (27 lines):

diff -r 371806350dbb -r 3d9abdf628c5 usr.bin/cksum/cksum.c
--- a/usr.bin/cksum/cksum.c     Fri Sep 02 16:52:03 2005 +0000
+++ b/usr.bin/cksum/cksum.c     Fri Sep 02 16:52:34 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cksum.c,v 1.28 2005/09/02 16:52:03 elad Exp $  */
+/*     $NetBSD: cksum.c,v 1.29 2005/09/02 16:52:34 elad Exp $  */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -81,7 +81,7 @@
 #if 0
 static char sccsid[] = "@(#)cksum.c    8.2 (Berkeley) 4/28/95";
 #endif
-__RCSID("$NetBSD: cksum.c,v 1.28 2005/09/02 16:52:03 elad Exp $");
+__RCSID("$NetBSD: cksum.c,v 1.29 2005/09/02 16:52:34 elad Exp $");
 #endif /* not lint */
 
 #include <sys/cdefs.h>
@@ -350,7 +350,7 @@
 int
 hash_digest_file(char *fn, struct hash *hash, int normal)
 {
-       char buf[MAXHASHLEN], *cp;
+       char buf[MAXHASHLEN + 1], *cp;
 
        cp = hash->filefunc(fn, buf);
        if (cp == NULL)



Home | Main Index | Thread Index | Old Index