hashtable: fix length calculation in hexport_r
The commit below incorrectly fixed hexport_r();
> size = totlen + 1;
One extra byte is necessary to NULL-terminate a whole buffer, "resp."
Fixes: f1b20acb4a03 ("hashtable: Fix length calculation in hexport_r")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
diff --git a/lib/hashtable.c b/lib/hashtable.c
index 1c48692..93028ed 100644
--- a/lib/hashtable.c
+++ b/lib/hashtable.c
@@ -662,7 +662,7 @@
return (-1);
}
} else {
- size = totlen;
+ size = totlen + 1;
}
/* Check if the user provided a buffer */