Skip to content

Commit

Permalink
Merge pull request #37253 from gk199/L1emulator_ASANfix
Browse files Browse the repository at this point in the history
L1T ASAN heap-buffer-overflow fix resulting from PR #36919
  • Loading branch information
cmsbuild committed Mar 20, 2022
2 parents 462cc82 + 24cd926 commit 4145e52
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 4145e52

Please sign in to comment.