rand.c: fix initialisation bug in mrkbuf

should be null on bad return

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-28 01:14:25 +00:00
parent 29296fc513
commit 998528c404
2 changed files with 57 additions and 3 deletions
+1 -1
View File
@@ -118,7 +118,7 @@ mkrstr(size_t n) /* emulates spkmodem-decode */
void *
mkrbuf(size_t n)
{
void *buf = "";
void *buf = NULL;
if (n == 0)
err_no_cleanup(0, EPERM, "mkrbuf: zero-byte request");