From: Alan T. DeKok Date: Thu, 15 Dec 2022 15:13:36 +0000 (-0500) Subject: add assert to match commit b5c9a3cd25121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd681716da28fe99123313dc8a03931ec7cbd48f;p=thirdparty%2Ffreeradius-server.git add assert to match commit b5c9a3cd25121 --- diff --git a/src/lib/util/dlist.h b/src/lib/util/dlist.h index bf4b5b89755..4a97e40c1ee 100644 --- a/src/lib/util/dlist.h +++ b/src/lib/util/dlist.h @@ -260,6 +260,8 @@ static inline CC_HINT(nonnull) void fr_dlist_entry_replace(fr_dlist_t *entry, fr */ static inline void _fr_dlist_init(fr_dlist_head_t *list_head, size_t offset, char const *type) { + fr_assert(offset < (1 << 20)); /* list_head->offset is `unsigned int`, and 1G structs are stupid. */ + fr_dlist_entry_init(&list_head->entry); list_head->offset = offset; list_head->type = type;