]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
Fixed problem with security-recv binary output not working correctly
authorThomas Bowen <thomas.r.bowen@intel.com>
Tue, 14 Mar 2017 19:58:14 +0000 (12:58 -0700)
committerScott Bauer <scott.bauer@intel.com>
Thu, 6 Apr 2017 16:05:09 +0000 (10:05 -0600)
Security Receive sent the wrong pointer, specifically a pointer to a
stack location. When using the Dump raw command we would dump stack
contents, not the buffer received from the controller.

Signed-off-by: Thomas Bowen <thomas.r.bowen@intel.com>
Signed-off-by: Scott Bauer <Scott.Bauer@intel.com>
nvme.c

diff --git a/nvme.c b/nvme.c
index 5fbb3630082a65cd5653557a9a6a1aaf43e5ab8e..4cc5a96d55c5396726823bd94f61e709785e3429 100644 (file)
--- a/nvme.c
+++ b/nvme.c
@@ -2498,7 +2498,7 @@ static int sec_recv(int argc, char **argv, struct command *cmd, struct plugin *p
                                                        result);
                        d(sec_buf, cfg.size, 16, 1);
                } else if (cfg.size)
-                       d_raw((unsigned char *)&sec_buf, cfg.size);
+                       d_raw((unsigned char *)sec_buf, cfg.size);
        }
        return err;
 }