Commit 4bca32497c09ef53ad669dfa4c413c00321ad7ca

Authored by AKASHI Takahiro
Committed by Tom Rini
1 parent 8b1312662b

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -662,7 +662,7 @@
662 662 return (-1);
663 663 }
664 664 } else {
665   - size = totlen;
  665 + size = totlen + 1;
666 666 }
667 667  
668 668 /* Check if the user provided a buffer */