aboutsummaryrefslogtreecommitdiff
path: root/ber/obj.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-06-26 20:22:03 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-06-26 20:22:03 +0200
commit7750e4b583a0962f18c3844e74b6ee87206d84e6 (patch)
tree0a3d07b372058d0fa36b98a83f4bf418ea4064ef /ber/obj.go
parentd9fb582cb9748e2f98e4ddb0471bdb037ea4f050 (diff)
Bondary checking
Diffstat (limited to 'ber/obj.go')
-rw-r--r--ber/obj.go2
1 files changed, 1 insertions, 1 deletions
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 {