Skip to content

Commit

Permalink
Check for ITS cableID mapper out of bound access
Browse files Browse the repository at this point in the history
  • Loading branch information
shahor02 committed May 26, 2024
1 parent 5b42afc commit b9f0dfc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class ChipMappingITS
uint8_t cableHW2Pos(uint8_t ruType, uint8_t hwid) const { return mCableHW2Pos[ruType][hwid]; }

///< convert HW cable ID to SW ID for given RU type (see ChipOnRUInfo.cableSW explanation)
uint8_t cableHW2SW(uint8_t ruType, uint8_t hwid) const { return mCableHW2SW[ruType][hwid]; }
uint8_t cableHW2SW(uint8_t ruType, uint8_t hwid) const { return hwid < mCableHW2SW[ruType].size() ? mCableHW2SW[ruType][hwid] : 0xff; }

///< convert cable iterator ID to the position on the ActiveLanes word in the GBT.header for given RU type; MFT lanes position compatible
uint8_t cablePos(uint8_t ruType, uint8_t id) const { return mCablePos[ruType][id]; }
Expand Down

0 comments on commit b9f0dfc

Please sign in to comment.