summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-04-14 22:10:49 +0200
committerLennart Poettering <lennart@poettering.net>2009-04-14 22:10:49 +0200
commit7c90816de0a2cd7269b71b50dfcaf1f83e9bb3ac (patch)
tree9aa8f2427146976a0d378f5a6a6a4b7879469e83
parentf0b138b207297bc6b9eb0fb391989ff4871d15c8 (diff)
initialize cmd data before passing it to the scsi ioctls
-rw-r--r--atasmart.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/atasmart.c b/atasmart.c
index f1cf4ea..2d8b820 100644
--- a/atasmart.c
+++ b/atasmart.c
@@ -487,6 +487,8 @@ static int disk_sunplus_command(SkDisk *d, SkAtaCommand command, SkDirection dir
cdb[1] = 0x00;
cdb[2] = 0x21;
+ memset(buf, 0, sizeof(buf));
+
/* Ask for response */
if ((ret = sg_io(d->fd, SG_DXFER_FROM_DEV, cdb, sizeof(cdb), buf, sizeof(buf), sense, sizeof(sense))) < 0)
return ret;