Skip to content

Commit

Permalink
Merge pull request #37257 from gk199/L1emulator_ASANfix_12_4_X
Browse files Browse the repository at this point in the history
L1T ASAN heap-buffer-overflow fix resulting from PR #36919 (12_4_X)
  • Loading branch information
cmsbuild committed Mar 18, 2022
2 parents 5df93f6 + de47a67 commit 895c99a
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -108,11 +108,11 @@ namespace l1t {
HcalTrigTowerDetId id(cEta, cPhi);
const auto tp = hcalTPGs->find(id);

int fg_bits = 0;
for (int index = 0; index < 6; index++)
fg_bits += tp->SOI_fineGrain(index) << index;

if (tp != hcalTPGs->end()) {
uint32_t fg_bits = 0;
for (int index = 0; index < 6; index++)
fg_bits |= tp->SOI_fineGrain(index) << index;

ctp7Data.setET(cType, negativeEta, iEta, iPhi, tp->SOI_compressedEt());
ctp7Data.setFB(cType, negativeEta, iEta, iPhi, fg_bits);
}
Expand Down

0 comments on commit 895c99a

Please sign in to comment.