From 1a96ac813b27bd488eeea5da2b39538f1c0c6632 Mon Sep 17 00:00:00 2001 From: Doug Hogan Date: Wed, 29 Apr 2015 01:31:40 +0000 Subject: Call CBS_mem_equal() rather than reimplementing it. ok jsing@ --- lib/libssl/src/ssl/bs_ber.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib') 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); } /* -- cgit v1.2.3