Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[base16] Ensure base16_encode() always terminates its result string
base16_encode() will fail to generate a terminating NUL if the length of the raw data is zero, since the loop calling sprintf() will never execute. Fix by explicitly terminating the result with a NUL. Reported-by: Marin Hannache <git@mareo.fr> Debugged-by: Marin Hannache <git@mareo.fr> Tested-by: Marin Hannache <git@mareo.fr> Signed-off-by: Michael Brown <mcb30@ipxe.org>
- Loading branch information