From: Thomas Bowen Date: Tue, 14 Mar 2017 19:58:14 +0000 (-0700) Subject: Fixed problem with security-recv binary output not working correctly X-Git-Tag: v1.3~15^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7a6424e039922515940fab2cd9b5744e5b7c8be1;p=users%2Fsagi%2Fnvme-cli.git Fixed problem with security-recv binary output not working correctly 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 Signed-off-by: Scott Bauer --- diff --git a/nvme.c b/nvme.c index 5fbb3630..4cc5a96d 100644 --- 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; }