diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2021-04-19 16:47:26 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2021-04-19 16:47:26 +0000 |
commit | afeb7e4c58c45e302b008e7d3a1ff84eacddcb47 (patch) | |
tree | 4de87b7459e38606c032030f6fd5563fe18fbafa /lib | |
parent | 6cadf54aac24f378815a108b5865ce25616d020b (diff) |
Set alpn_selected_len to zero when freeing alpn_selected.
This is not strictly necessary since we proceed to zero the entire struct,
however it keeps the code consistent and easily auditable.
ok tb@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libssl/s3_lib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libssl/s3_lib.c b/lib/libssl/s3_lib.c index 9df06c51be3..6563de5be27 100644 --- a/lib/libssl/s3_lib.c +++ b/lib/libssl/s3_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: s3_lib.c,v 1.206 2021/03/24 18:43:59 jsing Exp $ */ +/* $OpenBSD: s3_lib.c,v 1.207 2021/04/19 16:47:25 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1627,6 +1627,7 @@ ssl3_clear(SSL *s) free(S3I(s)->alpn_selected); S3I(s)->alpn_selected = NULL; + S3I(s)->alpn_selected_len = 0; memset(S3I(s), 0, sizeof(*S3I(s))); internal = S3I(s); |