summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src
diff options
context:
space:
mode:
authordoug <doug@openbsd.org>2015-04-29 01:31:39 +0000
committerdoug <doug@openbsd.org>2015-04-29 01:31:39 +0000
commite9bb426a54ed3b2af34878baa98ed2294fc1e56f (patch)
treed5aa4f466440b414da617693880470835084deaa /lib/libssl/src
parentAvoid NULL deref in CBS_get_any_asn1_element(). (diff)
downloadwireguard-openbsd-e9bb426a54ed3b2af34878baa98ed2294fc1e56f.tar.xz
wireguard-openbsd-e9bb426a54ed3b2af34878baa98ed2294fc1e56f.zip
Call CBS_mem_equal() rather than reimplementing it.
ok jsing@
Diffstat (limited to 'lib/libssl/src')
-rw-r--r--lib/libssl/src/ssl/bs_ber.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libssl/src/ssl/bs_ber.c b/lib/libssl/src/ssl/bs_ber.c
index cfc9475f9a2..1dde38264e3 100644
--- a/lib/libssl/src/ssl/bs_ber.c
+++ b/lib/libssl/src/ssl/bs_ber.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bs_ber.c,v 1.2 2015/02/06 22:22:33 doug Exp $ */
+/* $OpenBSD: bs_ber.c,v 1.3 2015/04/29 01:31:39 doug Exp $ */
/*
* Copyright (c) 2014, Google Inc.
*
@@ -89,8 +89,7 @@ is_primitive_type(unsigned tag)
static char
is_eoc(size_t header_len, CBS *contents)
{
- return header_len == 2 && CBS_len(contents) == 2 &&
- memcmp(CBS_data(contents), "\x00\x00", 2) == 0;
+ return header_len == 2 && CBS_mem_equal(contents, "\x00\x00", 2);
}
/*