util/nvmutil: add guard in rhex()

i removed this before, but it's good to put it
here defensively, in case i ever mess up
the urandom read function again.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-09 21:08:36 +00:00
parent f8ddb6ef84
commit b5af1bf3ac
+3
View File
@@ -973,6 +973,9 @@ rhex(void)
#else
n = (size_t)read_dev_urandom(
urandom_fd, rnum, sizeof(rnum));
if (!n || n > sizeof(rnum))
err(ECANCELED, "Randomisation failure");
#endif
}