Module Name:    src
Committed By:   mrg
Date:           Wed Feb  6 04:20:40 UTC 2019

Modified Files:
        src/sys/dev/nor: cfi.c

Log Message:
memset(0) the structure, not the pointer itself, and what ever
data happens to be after the pointer's stack location.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/nor/cfi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/nor/cfi.c
diff -u src/sys/dev/nor/cfi.c:1.8 src/sys/dev/nor/cfi.c:1.9
--- src/sys/dev/nor/cfi.c:1.8	Fri Sep 18 21:30:02 2015
+++ src/sys/dev/nor/cfi.c	Wed Feb  6 04:20:40 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: cfi.c,v 1.8 2015/09/18 21:30:02 phx Exp $	*/
+/*	$NetBSD: cfi.c,v 1.9 2019/02/06 04:20:40 mrg Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -33,7 +33,7 @@
 #include "opt_cfi.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cfi.c,v 1.8 2015/09/18 21:30:02 phx Exp $"); 
+__KERNEL_RCSID(0, "$NetBSD: cfi.c,v 1.9 2019/02/06 04:20:40 mrg Exp $"); 
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -829,7 +829,7 @@ cfi_jedec_fill(struct cfi *cfi, const st
 	cfi->cfi_name = jt->jt_name;
 
 	struct cfi_query_data *qryp = &cfi->cfi_qry_data;
-	memset(&qryp, 0, sizeof(*qryp));
+	memset(qryp, 0, sizeof(*qryp));
 	qryp->id_pri = jt->jt_id_pri;
 	qryp->id_alt = jt->jt_id_alt;
 	qryp->interface_code_desc = jt->jt_interface_code_desc;

Reply via email to