Merge pull request #8406 from sfc-gh-yiwu/encrypt_asan

Fix heap-use-after-free in TenantAwareEncryptionKeyProvider
This commit is contained in:
Jingyu Zhou 2022-10-06 12:49:35 -07:00 committed by GitHub
commit 14107b315d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -384,7 +384,7 @@ private:
return FDB_DEFAULT_ENCRYPT_DOMAIN_NAME;
}
if (tenantPrefixIndex.isValid()) {
StringRef prefix = TenantMapEntry::idToPrefix(domainId);
Key prefix(TenantMapEntry::idToPrefix(domainId));
auto view = tenantPrefixIndex->atLatest();
auto itr = view.find(prefix);
if (itr != view.end()) {