From 3cbc9a1dd5649aa66bcd4214a733801d360d43ab Mon Sep 17 00:00:00 2001 From: "User Lan at serverfault.com" Date: Wed, 14 Feb 2018 05:03:03 +0100 Subject: [PATCH] Initialize the SCSI command properly This fixes Sense Code: Illegal Request (0x05) Source: https://serverfault.com/questions/864580/what-could-cause-a-sense-error-when-setting-lto-encryption --- src/scsiencrypt.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scsiencrypt.cpp b/src/scsiencrypt.cpp index e17b335..02b9651 100644 --- a/src/scsiencrypt.cpp +++ b/src/scsiencrypt.cpp @@ -261,6 +261,7 @@ bool SCSIWriteEncryptOptions(string tapeDevice, SCSIEncryptOptions* eOptions){ //create the key descriptor if(eOptions->keyName!=""){ SSP_KAD kad; + memset(&kad,0,sizeof(kad)); kad.type=0x00; kad.authenticated=0; //set the descriptor length to the length of the keyName