From 55cb814a168498571d8f5c0848055750b8931173 Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Wed, 27 May 2026 21:24:30 -0400 Subject: [PATCH] fix table lookup crash condition; --- src/common/lookups/AffiliationLookup.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/lookups/AffiliationLookup.cpp b/src/common/lookups/AffiliationLookup.cpp index a5570791..35bb546d 100644 --- a/src/common/lookups/AffiliationLookup.cpp +++ b/src/common/lookups/AffiliationLookup.cpp @@ -594,8 +594,9 @@ uint32_t AffiliationLookup::getGrantedCh(uint32_t dstId) m_grantChTable.lock(false); auto it = m_grantChTable.find(dstId); if (it != m_grantChTable.end()) { + uint32_t chNo = it->second; m_grantChTable.unlock(); - return m_grantChTable[dstId]; + return chNo; } m_grantChTable.unlock(); } @@ -660,8 +661,9 @@ uint32_t AffiliationLookup::getGrantedSrcId(uint32_t dstId) m_grantSrcIdTable.lock(false); auto it = m_grantSrcIdTable.find(dstId); if (it != m_grantSrcIdTable.end()) { + uint32_t srcId = it->second; m_grantSrcIdTable.unlock(); - return m_grantSrcIdTable[dstId]; + return srcId; } m_grantSrcIdTable.unlock(); }