From: Sergey Matveev Date: Wed, 20 Nov 2024 12:38:20 +0000 (+0300) Subject: Fix condition X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=497ff38d9cf23e9e2894f8d6953b4063ea78860c65c33e4ad9ec52de4421c612;p=keks.git Fix condition 1<<63 value is also reserved (not allowed) one. --- diff --git a/pyac/pyac.py b/pyac/pyac.py index 257a898..4941451 100755 --- a/pyac/pyac.py +++ b/pyac/pyac.py @@ -258,7 +258,7 @@ def loads(v, sets=False): if len(v) < 1+l: raise NotEnoughData(1+l) secs = int.from_bytes(v[1:1+8], "big") - if secs > (1 << 63): + if secs >= (1 << 63): raise DecodeError("reserved TAI64 value is in use") secs -= TAI64Base diff = 0