From 484d60b5d1a85f5ceaddcfb6cd98aa82d44f86ed Mon Sep 17 00:00:00 2001 From: Felix Weiglhofer Date: Thu, 23 Apr 2026 16:36:16 +0200 Subject: [PATCH] GPUTPCClusterFinder: Add protection against Out-Of-Bounds read in PeakFinder. --- GPU/GPUTracking/TPCClusterFinder/GPUTPCCFPeakFinder.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPU/GPUTracking/TPCClusterFinder/GPUTPCCFPeakFinder.cxx b/GPU/GPUTracking/TPCClusterFinder/GPUTPCCFPeakFinder.cxx index 5d94e36febc0a..7c93435f8bef8 100644 --- a/GPU/GPUTracking/TPCClusterFinder/GPUTPCCFPeakFinder.cxx +++ b/GPU/GPUTracking/TPCClusterFinder/GPUTPCCFPeakFinder.cxx @@ -108,7 +108,7 @@ GPUd() void GPUTPCCFPeakFinder::findPeaksImpl(int32_t nBlocks, int32_t nThreads, CfChargePos pos = positions[CAMath::Min(idx, digitnum - 1)]; Charge charge = pos.valid() ? chargeMap[pos].unpack() : Charge(0); - bool hasLostBaseline = padHasLostBaseline[pos.gpad]; + bool hasLostBaseline = pos.valid() ? padHasLostBaseline[pos.gpad] : true; charge = hasLostBaseline ? 0.f : charge; uint8_t peak = isPeak(smem, charge, pos, SCRATCH_PAD_SEARCH_N, chargeMap, calib, smem.posBcast, smem.buf);