mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
lbutils, rand: err on zero return (fatal)
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user