From 7750e4b583a0962f18c3844e74b6ee87206d84e6 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Fri, 26 Jun 2015 20:22:03 +0200 Subject: Bondary checking --- ber/obj.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ber/obj.go') diff --git a/ber/obj.go b/ber/obj.go index a8b590e..ff8aef8 100644 --- a/ber/obj.go +++ b/ber/obj.go @@ -24,7 +24,7 @@ func debase128(b []byte) int { } func marshalObj(obj []int) (b []byte) { - if len(obj) < 2 { + if len(obj) < 2 || obj[0] > 2 { return []byte{} } if obj[0] < 2 && obj[1] > 39 { -- cgit v1.2.3