mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-20 11:55:03 +00:00
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: f1b20acb4a
("hashtable: Fix length calculation in hexport_r")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
This commit is contained in:
parent
8b1312662b
commit
4bca32497c
1 changed files with 1 additions and 1 deletions
|
@ -662,7 +662,7 @@ ssize_t hexport_r(struct hsearch_data *htab, const char sep, int flag,
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
size = totlen;
|
size = totlen + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if the user provided a buffer */
|
/* Check if the user provided a buffer */
|
||||||
|
|
Loading…
Add table
Reference in a new issue