svn commit: r198820 - head/sbin/ddb

John Baldwin jhb at FreeBSD.org
Mon Nov 2 20:18:52 UTC 2009


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':


More information about the svn-src-all mailing list