From c48938c577aa9a9e91f0d925ae00a82cbbd428d3 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 27 Mar 2026 22:03:08 +0000 Subject: cleanup Signed-off-by: Leah Rowe --- util/libreboot-utils/lottery.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'util/libreboot-utils/lottery.c') diff --git a/util/libreboot-utils/lottery.c b/util/libreboot-utils/lottery.c index f7c467e2..540bb8d6 100644 --- a/util/libreboot-utils/lottery.c +++ b/util/libreboot-utils/lottery.c @@ -37,14 +37,15 @@ hell: size[0] = rsize(SIZE_MAX); /* \( ^o^)/ - then come play! */ size[1] = rsize(SIZE_MAX); /* | | */ -/* / \ */ + if (!(size[0] && (size[0] == size[1]) && (size[0] <= SIZE_MAX)) || ((size[0] & 1) && (*(b1 = mkrstr(1)) != *(b2 = mkrstr(1))))) - goto out; /* \(^-^)/ - it could be you! */ - if (!(size[0] &= ~(size_t)1)) /* \ / */ - goto hell; /* / \ */ - - if (s == NULL) { + goto out; + if (!(size[0] &= ~(size_t)1)) + goto hell; +/* \(^-^)/ - it could be you! */ + if (s == NULL) { /* \ / */ +/* \/ */ if ((s = malloc(BUFSIZ)) == NULL) goto out; } -- cgit v1.2.1