diff options
author | doug <> | 2015-06-23 05:58:28 +0000 |
---|---|---|
committer | doug <> | 2015-06-23 05:58:28 +0000 |
commit | 9a31903e554f01ace552d6ed0a48e3af5e464664 (patch) | |
tree | cc3e1e5801554d143de4b8556a8caae9d54939e5 /src/lib/libssl/bs_cbs.c | |
parent | 84ef3d24fb4f24599400c3ca9569f6d0ba74b2bf (diff) | |
download | openbsd-9a31903e554f01ace552d6ed0a48e3af5e464664.tar.gz openbsd-9a31903e554f01ace552d6ed0a48e3af5e464664.tar.bz2 openbsd-9a31903e554f01ace552d6ed0a48e3af5e464664.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 'src/lib/libssl/bs_cbs.c')
-rw-r--r-- | src/lib/libssl/bs_cbs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libssl/bs_cbs.c b/src/lib/libssl/bs_cbs.c index ea31cfc530..d45353a890 100644 --- a/src/lib/libssl/bs_cbs.c +++ b/src/lib/libssl/bs_cbs.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bs_cbs.c,v 1.15 2015/06/20 01:21:51 doug Exp $ */ | 1 | /* $OpenBSD: bs_cbs.c,v 1.16 2015/06/23 05:58:28 doug Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014, Google Inc. | 3 | * Copyright (c) 2014, Google Inc. |
4 | * | 4 | * |
@@ -36,6 +36,7 @@ void | |||
36 | CBS_dup(const CBS *cbs, CBS *out) | 36 | CBS_dup(const CBS *cbs, CBS *out) |
37 | { | 37 | { |
38 | CBS_init(out, CBS_data(cbs), CBS_len(cbs)); | 38 | CBS_init(out, CBS_data(cbs), CBS_len(cbs)); |
39 | out->initial_len = cbs->initial_len; | ||
39 | } | 40 | } |
40 | 41 | ||
41 | static int | 42 | static int |