summaryrefslogtreecommitdiffstats
path: root/lib/libssl/bs_cbs.c
diff options
context:
space:
mode:
authordoug <doug@openbsd.org>2015-06-23 05:58:28 +0000
committerdoug <doug@openbsd.org>2015-06-23 05:58:28 +0000
commit6cb2edf4ea3adf0dfef7b7a700b0ccce2ab6e718 (patch)
tree01963e181ed7399f16067630f1df32dfd88cc907 /lib/libssl/bs_cbs.c
parentConvert bytestringtest to individual checks and don't short circuit. (diff)
downloadwireguard-openbsd-6cb2edf4ea3adf0dfef7b7a700b0ccce2ab6e718.tar.xz
wireguard-openbsd-6cb2edf4ea3adf0dfef7b7a700b0ccce2ab6e718.zip
Change CBS_dup() to also sync the offset.
Previously, CBS_dup() had its own offset. However, it is more consistent to copy everything. ok miod@ jsing@
Diffstat (limited to 'lib/libssl/bs_cbs.c')
-rw-r--r--lib/libssl/bs_cbs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libssl/bs_cbs.c b/lib/libssl/bs_cbs.c
index ea31cfc5300..d45353a8902 100644
--- a/lib/libssl/bs_cbs.c
+++ b/lib/libssl/bs_cbs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bs_cbs.c,v 1.15 2015/06/20 01:21:51 doug Exp $ */
+/* $OpenBSD: bs_cbs.c,v 1.16 2015/06/23 05:58:28 doug Exp $ */
/*
* Copyright (c) 2014, Google Inc.
*
@@ -36,6 +36,7 @@ void
CBS_dup(const CBS *cbs, CBS *out)
{
CBS_init(out, CBS_data(cbs), CBS_len(cbs));
+ out->initial_len = cbs->initial_len;
}
static int