From 72add2417fe7edde3464708b2543d0d964da72d5 Mon Sep 17 00:00:00 2001
From: Shaun Roe <shaun.roe@cern.ch>
Date: Wed, 25 Mar 2020 19:36:53 +0000
Subject: [PATCH] introduce test for invalid hash in
 IdentifiableContainerMT::indexFindPtr

---
 .../EventContainers/IdentifiableContainerMT.h               | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Event/EventContainers/EventContainers/IdentifiableContainerMT.h b/Event/EventContainers/EventContainers/IdentifiableContainerMT.h
index 1fd416dd8eb..cb1e7bb2fb3 100644
--- a/Event/EventContainers/EventContainers/IdentifiableContainerMT.h
+++ b/Event/EventContainers/EventContainers/IdentifiableContainerMT.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef EVENTCONTAINERS_IDENTIFIABLECONTAINERMT_H
@@ -360,8 +360,8 @@ template < class T>
 const T*
 IdentifiableContainerMT<T>::indexFindPtr( IdentifierHash hashId ) const
 {
-    if(m_mask[hashId])  return castCache()->findWait(hashId);
-    else                return nullptr;
+    if((hashId < m_mask.size()) and m_mask[hashId])  return castCache()->findWait(hashId);
+    else return nullptr;
 }
 
 // insert collection into container with id hash
-- 
GitLab