summaryrefslogtreecommitdiffstats
path: root/lib/libutil
diff options
context:
space:
mode:
authormartijn <martijn@openbsd.org>2019-08-05 12:30:50 +0000
committermartijn <martijn@openbsd.org>2019-08-05 12:30:50 +0000
commita93a062f22c7a7bd3f531f7f646f262ac1a47766 (patch)
treee3105550356868d89e0b34ba21080160ab92d435 /lib/libutil
parentRemove -port option from s_server since it is same as -accept (diff)
downloadwireguard-openbsd-a93a062f22c7a7bd3f531f7f646f262ac1a47766.tar.xz
wireguard-openbsd-a93a062f22c7a7bd3f531f7f646f262ac1a47766.zip
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')
-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;