From 8e1dcd44fcad7826e5f8fa6c5caa6c23989518d9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 7 Apr 2023 14:43:34 +0200 Subject: Merging upstream version 2.4+really2.4. Signed-off-by: Daniel Baumann --- plugins/fdp/fdp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/fdp/fdp.c') diff --git a/plugins/fdp/fdp.c b/plugins/fdp/fdp.c index 9fef271..1e292e8 100644 --- a/plugins/fdp/fdp.c +++ b/plugins/fdp/fdp.c @@ -350,7 +350,8 @@ static int fdp_status(int argc, char **argv, struct command *cmd, struct plugin goto out; } - len = le16_to_cpu(hdr.nruhsd) * sizeof(struct nvme_fdp_ruh_status_desc); + len = sizeof(struct nvme_fdp_ruh_status) + + le16_to_cpu(hdr.nruhsd) * sizeof(struct nvme_fdp_ruh_status_desc); buf = malloc(len); if (!buf) { err = -ENOMEM; -- cgit v1.2.3