lbutils, rand: err on zero return (fatal)

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-25 19:51:46 +00:00
parent bce1099509
commit 34f26319d7
+3
View File
@@ -70,6 +70,9 @@ retry_rand:
goto err; /* possibly unsupported by kernel */
}
if (rc == 0)
goto err; /* prevent infinite loop on fatal err */
if ((off += (size_t)rc) < n)
goto retry_rand;