Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Nov 2009 20:18:51 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r198820 - head/sbin/ddb
Message-ID:  <200911022018.nA2KIp6Q068433@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Mon Nov  2 20:18:50 2009
New Revision: 198820
URL: http://svn.freebsd.org/changeset/base/198820

Log:
  Ensure 'kvm' is always initialized.  If "-M" was not specified and the
  garbage value on the stack was not zero, then 'ddb capture' would try to
  use the garbage value as a kvm_t pointer.
  
  MFC after:	1 week

Modified:
  head/sbin/ddb/ddb_capture.c

Modified: head/sbin/ddb/ddb_capture.c
==============================================================================
--- head/sbin/ddb/ddb_capture.c	Mon Nov  2 19:13:12 2009	(r198819)
+++ head/sbin/ddb/ddb_capture.c	Mon Nov  2 20:18:50 2009	(r198820)
@@ -204,6 +204,7 @@ ddb_capture(int argc, char *argv[])
 
 	mflag = NULL;
 	nflag = NULL;
+	kvm = NULL;
 	while ((ch = getopt(argc, argv, "M:N:")) != -1) {
 		switch (ch) {
 		case 'M':



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911022018.nA2KIp6Q068433>