nvmf: zero out Get Log Page buffer

None of the log pages are actually implemented yet, but at the very
least, we don't want to leak random bits of uninitialized data.

Change-Id: Ic889260eb18d49122f2f250b645bdc5be3561dc5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2016-11-22 14:36:44 -07:00
parent 72054c70f6
commit 5e5a3851c3

View File

@ -155,6 +155,8 @@ nvmf_virtual_ctrlr_get_log_page(struct spdk_nvmf_request *req)
return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE; return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE;
} }
memset(req->data, 0, req->length);
lid = cmd->cdw10 & 0xFF; lid = cmd->cdw10 & 0xFF;
switch (lid) { switch (lid) {
case SPDK_NVME_LOG_ERROR: case SPDK_NVME_LOG_ERROR: