diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-26 23:23:51 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-26 23:28:27 +0000 |
| commit | c6d42ea60f32995f6597a18c098b5ae467f9a7fc (patch) | |
| tree | 69d4d1744dd7a44666089805975c7d8b56b51928 /util | |
| parent | a29a3ac6f6bdfc2823462450edd28aa6cbbc5a9c (diff) | |
challenge
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
| -rw-r--r-- | util/libreboot-utils/lottery.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/util/libreboot-utils/lottery.c b/util/libreboot-utils/lottery.c index 9e396d1d..9b37d117 100644 --- a/util/libreboot-utils/lottery.c +++ b/util/libreboot-utils/lottery.c @@ -1,12 +1,12 @@ -/* SPDX-License-Identifier: MIT ( >:3 ) - * Copyright (c) 2026 Leah Rowe <leah@libreboot.org> /| |\ - / \*/ -#include <stdio.h> +/* SPDX-License-Identifier: MIT ( >:3 ) + * Copyright (c) 2026 Leah Rowe <leah@libreboot.org> /| |\*/ +#include <stdio.h> /* / \ */ +#include <stdint.h> #include <string.h> /* (^.>) - are u lucky? */ #include "include/common.h" /* \| /= */ static int rigged(char **s, int spew) { /* l \ */ - size_t size[2] = { rsize(1 << 17), rsize(1 << 17) }; - spew &= size[1] = !(size[0] && size[0] == size[1] && size[0] <=1<<18 && + size_t size[2] = { rsize(SIZE_MAX >> 1), rsize(SIZE_MAX >> 1) }; + spew &= size[1] = !(size[0] && size[0]==size[1] && size[0]<=SIZE_MAX && s != NULL) || memcmp(*s = mkrbuf(size[0] << 1), *s + size[0], size[0]); if (spew && !size[1]) printf("%s\n\n", *s); |
