Module Name: src Committed By: dholland Date: Sun Aug 9 00:53:38 UTC 2020
Modified Files: src/bin/csh: csh.c Log Message: Use the right size for several calloc calls. When allocating for a Char **, it should use sizeof(Char *), not sizeof(Char **). This doesn't actually affect the results except on DS9000 though :-) (part 2, the instance in this file was as far as I can tell inexplicably missed by CVS on the first go...) To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/bin/csh/csh.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/bin/csh/csh.c diff -u src/bin/csh/csh.c:1.52 src/bin/csh/csh.c:1.53 --- src/bin/csh/csh.c:1.52 Sun Aug 9 00:51:12 2020 +++ src/bin/csh/csh.c Sun Aug 9 00:53:38 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: csh.c,v 1.52 2020/08/09 00:51:12 dholland Exp $ */ +/* $NetBSD: csh.c,v 1.53 2020/08/09 00:53:38 dholland Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = "@(#)csh.c 8.2 (Berkeley) 10/12/93"; #else -__RCSID("$NetBSD: csh.c,v 1.52 2020/08/09 00:51:12 dholland Exp $"); +__RCSID("$NetBSD: csh.c,v 1.53 2020/08/09 00:53:38 dholland Exp $"); #endif #endif /* not lint */ @@ -697,7 +697,7 @@ importpath(Char *cp) * i+2 where i is the number of colons in the path. There are i+1 * directories in the path plus we need room for a zero terminator. */ - pv = xcalloc((size_t) (i + 2), sizeof(Char **)); + pv = xcalloc((size_t) (i + 2), sizeof(*pv)); dp = cp; i = 0; if (*dp)