From ec08b71fb47b82402f0fbb8859a2445519f79615 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 6 Nov 2018 21:34:30 +0100 Subject: sid: sid_test: validate identifier authority on create() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reject ia’s greater than six bytes can encompass. --- sid.ml | 1 + 1 file changed, 1 insertion(+) (limited to 'sid.ml') diff --git a/sid.ml b/sid.ml index 0d5c89b..2cced76 100644 --- a/sid.ml +++ b/sid.ml @@ -22,6 +22,7 @@ let create_unsafe sa ia = the number of subauths. *) let create ?(sa=[||]) ia = if Array.length sa > max_subauth_count then None else + if U64.compare ia max_ident_auth > 0 then None else Some (create_unsafe sa ia) let get_ident_auth s = s.sid_ident_auth -- cgit v1.2.3