summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sid.ml2
-rw-r--r--sid_test.ml4
2 files changed, 5 insertions, 1 deletions
diff --git a/sid.ml b/sid.ml
index 0bcba50..df17c0a 100644
--- a/sid.ml
+++ b/sid.ml
@@ -248,7 +248,7 @@ module MkStringFmt (Con : Conformance) = struct
(* Below constant determines the lowest length at which it is sensible
to test for the “-0x…” component that indicates a hex encoded ia. We
require at least one hex digit to allow non-conformant parsing modes. *)
- let min_hexlen = String.length "S-1-0xf"
+ let min_hexlen = String.length "0xf"
let read_ident_auth s p =
let r = String.length s - p in
diff --git a/sid_test.ml b/sid_test.ml
index b339190..d9cc464 100644
--- a/sid_test.ml
+++ b/sid_test.ml
@@ -285,6 +285,10 @@ let mssf_parse_hex_junk_ok () =
; "S-1-0xffffffffffff-1" , true , Some ("S-1-0xffffffffffff-1", true )
; "S-1-0xff00ff00ff-1" , false, Some ("S-1-0xff00ff00ff-1" , false)
; "S-1-0xff00ff00ff00ff-1", false, None
+ ; "S-1-0x4200000000-1" , false, Some ("S-1-0x4200000000-1" , false)
+ ; "S-1-0x1701d000-1" , false, Some ("S-1-385994752-1" , true )
+ ; "S-1-0x1337000-1" , false, Some ("S-1-20148224-1" , true )
+ ; "S-1-0xff-1" , false, Some ("S-1-255-1" , true )
; "S-1-4294967296-1" , false, Some ("S-1-0x100000000-1" , false)
; "S-1-01-1" , false, Some ("S-1-1-1" , true )
; "S-1-08-1" , false, Some ("S-1-8-1" , true )