diff options
author | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-02-03 21:22:20 +0000 |
---|---|---|
committer | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-02-03 21:22:20 +0000 |
commit | dafe12f5acb74ae505c96896788b3c47dfa54f46 (patch) | |
tree | 5c24ac7b7f86001fa9f49e5df91858f7588bc279 | |
parent | 54a340728ec97701036b16d2ff3eb0683e2a4c79 (diff) |
Initialize stack memory before use. Found with clang.
ok dlg@
-rw-r--r-- | sys/dev/ata/atascsi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c index 3d19bbc7133..f9f89edf3e1 100644 --- a/sys/dev/ata/atascsi.c +++ b/sys/dev/ata/atascsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.c,v 1.100 2011/01/26 21:41:00 drahn Exp $ */ +/* $OpenBSD: atascsi.c,v 1.101 2011/02/03 21:22:19 matthew Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -1539,6 +1539,7 @@ atascsi_pmp_inq(struct scsi_xfer *xs) return; } + bzero(&inq, sizeof(inq)); inq.device = 0x1E; /* "well known logical unit" seems reasonable */ inq.version = 0x05; /* SPC-3? */ inq.response_format = 2; |