summaryrefslogtreecommitdiff
path: root/lib/libssl/bs_cbs.c
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2019-01-23 22:20:41 +0000
committerBob Beck <beck@cvs.openbsd.org>2019-01-23 22:20:41 +0000
commit895f6c3a8980ba4a15f47b7de7d56eed0260efb2 (patch)
tree27765fe119783d634df40f9878d84f3ce3851eab /lib/libssl/bs_cbs.c
parent8cd2926ea4ada4dac877f1e3882a606f2a39edf6 (diff)
assert.h is often misused. It should not be used in a library
ok bcook@ jsing@
Diffstat (limited to 'lib/libssl/bs_cbs.c')
-rw-r--r--lib/libssl/bs_cbs.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/libssl/bs_cbs.c b/lib/libssl/bs_cbs.c
index ea1f0108f61..5c3b9e3ec6c 100644
--- a/lib/libssl/bs_cbs.c
+++ b/lib/libssl/bs_cbs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bs_cbs.c,v 1.17 2015/06/24 09:44:18 jsing Exp $ */
+/* $OpenBSD: bs_cbs.c,v 1.18 2019/01/23 22:20:40 beck Exp $ */
/*
* Copyright (c) 2014, Google Inc.
*
@@ -14,7 +14,6 @@
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
-#include <assert.h>
#include <stdlib.h>
#include <string.h>
@@ -347,10 +346,8 @@ cbs_get_asn1(CBS *cbs, CBS *out, unsigned int tag_value, int skip_header)
tag != tag_value)
return 0;
- if (skip_header && !CBS_skip(out, header_len)) {
- assert(0);
+ if (skip_header && !CBS_skip(out, header_len))
return 0;
- }
return 1;
}