rand/libreboot/utils: prevent div by zero

not really a thing. bufsiz would never be zero,
unless the demon takes over linux

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-26 08:59:03 +00:00
parent cf16d07df9
commit d6087901c1
+6
View File
@@ -72,6 +72,12 @@
* or your program dies.
*/
#ifndef BUFSIZ
#define BUFSIZ 8192 /* reasonably on modern 64-bit systems */
#elif (BUFSIZ <= 0)
#error defined buffer size BUFSIZ below or equal to zero
#endif
int
win_lottery(char **buf) /* are u lucky? */
{