diff options
author | jsing <> | 2021-04-19 16:47:25 +0000 |
---|---|---|
committer | jsing <> | 2021-04-19 16:47:25 +0000 |
commit | a781147be0607c2030c602b8de9b181330876373 (patch) | |
tree | 31c96061ae63ae5f1743da5307dbf52d32fcc378 /src | |
parent | 091bc97ac899631cafc4769bfd4b88c5fdda0b4f (diff) | |
download | openbsd-a781147be0607c2030c602b8de9b181330876373.tar.gz openbsd-a781147be0607c2030c602b8de9b181330876373.tar.bz2 openbsd-a781147be0607c2030c602b8de9b181330876373.zip |
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 'src')
-rw-r--r-- | src/lib/libssl/s3_lib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index 9df06c51be..6563de5be2 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/lib/libssl/s3_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s3_lib.c,v 1.206 2021/03/24 18:43:59 jsing Exp $ */ | 1 | /* $OpenBSD: s3_lib.c,v 1.207 2021/04/19 16:47:25 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -1627,6 +1627,7 @@ ssl3_clear(SSL *s) | |||
1627 | 1627 | ||
1628 | free(S3I(s)->alpn_selected); | 1628 | free(S3I(s)->alpn_selected); |
1629 | S3I(s)->alpn_selected = NULL; | 1629 | S3I(s)->alpn_selected = NULL; |
1630 | S3I(s)->alpn_selected_len = 0; | ||
1630 | 1631 | ||
1631 | memset(S3I(s), 0, sizeof(*S3I(s))); | 1632 | memset(S3I(s), 0, sizeof(*S3I(s))); |
1632 | internal = S3I(s); | 1633 | internal = S3I(s); |