Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/lib/libkvm Pull up revision 1.45 (requested by jdolecek):
details: https://anonhg.NetBSD.org/src/rev/b07e41ed5286
branches: netbsd-1-5
changeset: 491026:b07e41ed5286
user: he <he%NetBSD.org@localhost>
date: Fri Mar 30 22:33:42 2001 +0000
description:
Pull up revision 1.45 (requested by jdolecek):
Properly '\0'-terminate data from sysctl() which might not end
properly if data would be longer than requested. Fixes PR#11467,
PR#12389 and possibly PR#12439.
diffstat:
lib/libkvm/kvm_proc.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r b2d40399fe8f -r b07e41ed5286 lib/libkvm/kvm_proc.c
--- a/lib/libkvm/kvm_proc.c Fri Mar 30 22:29:40 2001 +0000
+++ b/lib/libkvm/kvm_proc.c Fri Mar 30 22:33:42 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kvm_proc.c,v 1.36 2000/06/04 23:03:27 tron Exp $ */
+/* $NetBSD: kvm_proc.c,v 1.36.2.1 2001/03/30 22:33:42 he Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
#if 0
static char sccsid[] = "@(#)kvm_proc.c 8.3 (Berkeley) 9/23/93";
#else
-__RCSID("$NetBSD: kvm_proc.c,v 1.36 2000/06/04 23:03:27 tron Exp $");
+__RCSID("$NetBSD: kvm_proc.c,v 1.36.2.1 2001/03/30 22:33:42 he Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -1065,6 +1065,7 @@
return NULL;
bp = kd->argspc;
+ bp[kd->arglen-1] = '\0'; /* make sure the string ends with nul */
ap = kd->argv;
endp = bp + MIN(nchr, bufs);
Home |
Main Index |
Thread Index |
Old Index