summaryrefslogtreecommitdiff
path: root/lib/libutil/ber.c
diff options
context:
space:
mode:
authorMartijn van Duren <martijn@cvs.openbsd.org>2019-08-05 12:30:51 +0000
committerMartijn van Duren <martijn@cvs.openbsd.org>2019-08-05 12:30:51 +0000
commit9d0c24716315a3efb2f66fdcc99f05e1084597a4 (patch)
tree32cac9b0cd0e72190264aecd9a2b81c5cca248ca /lib/libutil/ber.c
parentad3bd5f008268646acab6b9f09664a542674c118 (diff)
There's no reason why the first digit of an OID can't be 0.
OK claudio@ "Good find" deraadt@
Diffstat (limited to 'lib/libutil/ber.c')
-rw-r--r--lib/libutil/ber.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/libutil/ber.c b/lib/libutil/ber.c
index 3be9d93ecaf..e1ada8372b4 100644
--- a/lib/libutil/ber.c
+++ b/lib/libutil/ber.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ber.c,v 1.9 2019/06/01 19:40:05 rob Exp $ */
+/* $OpenBSD: ber.c,v 1.10 2019/08/05 12:30:50 martijn Exp $ */
/*
* Copyright (c) 2007, 2012 Reyk Floeter <reyk@openbsd.org>
@@ -546,9 +546,6 @@ ber_get_oid(struct ber_element *elm, struct ber_oid *o)
buf = elm->be_val;
len = elm->be_len;
- if (!buf[i])
- return (-1);
-
memset(o, 0, sizeof(*o));
o->bo_id[j++] = buf[i] / 40;
o->bo_id[j++] = buf[i++] % 40;