summaryrefslogtreecommitdiff
path: root/util/libreboot-utils/lottery.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/libreboot-utils/lottery.c')
-rw-r--r--util/libreboot-utils/lottery.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/util/libreboot-utils/lottery.c b/util/libreboot-utils/lottery.c
index 48565c87..fd39c68c 100644
--- a/util/libreboot-utils/lottery.c
+++ b/util/libreboot-utils/lottery.c
@@ -18,21 +18,21 @@ main(int argc, char **argv)
{
int same = 0;
char *buf;
+ size_t size = 8589934592;
(void) argc, (void) argv;
(void) errhook(exit_cleanup);
- if (lbsetprogname(argv[0]) == NULL)
- err_exit(errno, "could not set progname");
+ (void) lbsetprogname(argv[0]);
/* https://man.openbsd.org/pledge.2 */
xpledgex("stdio", NULL);
- buf = rmalloc(BUFSIZ);
- if (!memcmp(buf, buf + (BUFSIZ >> 1), BUFSIZ >> 1))
+ buf = rmalloc(size);
+ if (!memcmp(buf, buf + (size >> 1), size >> 1))
same = 1;
if (argc < 2) /* no spew */
- spew_hex(buf, BUFSIZ);
+ spew_hex(buf, size);
free_and_set_null(&buf);
fprintf(stderr, "\n%s\n", same ? "You win!" : "You lose!");