Skip to content
Snippets Groups Projects
Commit d5d9afbe authored by Scott Snyder's avatar Scott Snyder Committed by Jiri Masik
Browse files

TrigT1Result: vector bounds checks.

TrigT1Result: vector bounds checks.

Protect against out-of-bounds vector reads.
parent 7774467d
No related branches found
No related tags found
2 merge requests!768302024-12-18: merge of 24.0 into main,!76775TrigT1Result: vector bounds checks.
/*
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
......@@ -18,15 +18,15 @@ inline uint32_t ROIB::Header::headerMarker() const {
}
inline uint32_t ROIB::Header::headerSize() const {
return m_header.empty() ? 0 : m_header[ 1 ];
return m_header.size() <= 1 ? 0 : m_header[ 1 ];
}
inline uint32_t ROIB::Header::formatVersion() const {
return m_header.empty() ? 0 : m_header[ 2 ];
return m_header.size() <= 2 ? 0 : m_header[ 2 ];
}
inline uint32_t ROIB::Header::sourceID() const {
return m_header.empty() ? 0 : m_header[ 3 ];
return m_header.size() <= 3 ? 0 : m_header[ 3 ];
}
inline uint32_t ROIB::Header::runNumber() const {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment