From e1994d3d3f2bb80d039d0db567706e0739161e79 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Sun, 12 Jan 2025 21:10:34 -0700 Subject: lib9p: Limit count and offset to INT{32,64}_MAX --- lib9p/idl/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib9p/idl/__init__.py') diff --git a/lib9p/idl/__init__.py b/lib9p/idl/__init__.py index 3379bdf..c08a89e 100644 --- a/lib9p/idl/__init__.py +++ b/lib9p/idl/__init__.py @@ -447,7 +447,7 @@ def parse_file( typs: list[Type] = [x for x in env.values() if not isinstance(x, Primitive)] for typ in [typ for typ in typs if isinstance(typ, Struct)]: - valid_syms = ["end", *["&" + m.name for m in typ.members]] + valid_syms = ["end", "s32_max", "s64_max", *["&" + m.name for m in typ.members]] for member in typ.members: for tok in [*member.max.tokens, *member.val.tokens]: if isinstance(tok, ExprSym) and tok.name not in valid_syms: -- cgit v1.2.3-2-g168b