commit | 765751395cf12e5842145d56ec339a1a07a1ea53 | [log] [tgz] |
---|---|---|
author | David Benjamin <davidben@google.com> | Fri Apr 26 14:30:33 2024 -0400 |
committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Apr 26 19:26:52 2024 +0000 |
tree | 6684b62172756746e0b16772fd4933ad086557cb | |
parent | 9eab28fb27dc90e0913bb82c62cfc49741bc494c [diff] |
Reset DTLS1_BITMAP without resorting to memset After f94f3ed3965ea033001fb9ae006084eee408b861, there's a std::bitset in it, so memset is not guaranteed to do what we want. There are still other problems here, and we may decide not to keep the reset at all, but fix the memset for now. See these discussions for more details: https://boringssl-review.googlesource.com/c/boringssl/+/68027/comment/7ff3d697_a6808cee/ https://boringssl-review.googlesource.com/c/boringssl/+/68027/comment/74cabada_eadf5394/ Change-Id: I79c62d71d74a58be4ac822e0cc5a41586472a26a Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/68067 Reviewed-by: Nick Harper <nharper@chromium.org> Commit-Queue: David Benjamin <davidben@google.com> Reviewed-by: Bob Beck <bbe@google.com> Auto-Submit: David Benjamin <davidben@google.com>
diff --git a/ssl/dtls_method.cc b/ssl/dtls_method.cc index 677418b..e3d7eaf 100644 --- a/ssl/dtls_method.cc +++ b/ssl/dtls_method.cc
@@ -89,7 +89,7 @@ } ssl->d1->r_epoch++; - OPENSSL_memset(&ssl->d1->bitmap, 0, sizeof(ssl->d1->bitmap)); + ssl->d1->bitmap = DTLS1_BITMAP(); ssl->s3->read_sequence = 0; ssl->s3->aead_read_ctx = std::move(aead_ctx);