diff options
author | 2015-06-23 05:58:28 +0000 | |
---|---|---|
committer | 2015-06-23 05:58:28 +0000 | |
commit | 6cb2edf4ea3adf0dfef7b7a700b0ccce2ab6e718 (patch) | |
tree | 01963e181ed7399f16067630f1df32dfd88cc907 /lib/libssl/bs_cbs.c | |
parent | Convert bytestringtest to individual checks and don't short circuit. (diff) | |
download | wireguard-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.c | 3 |
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 |