Skip to content

Commit

Permalink
fixed buffer overflow but caused by using global instead of local enum
Browse files Browse the repository at this point in the history
  • Loading branch information
erikfrojdh committed Jan 26, 2021
1 parent 7aeb394 commit 997e5dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions slsDetectorSoftware/src/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,9 @@ void Module::setAllThresholdEnergy(std::array<int, 3> e_eV,
myMod.dacs[M_VTRIM] = sum / counters.size();

// copy vth1, vth2 and vth3 from the correct threshold mods
myMod.dacs[VTH1] = myMods[0].dacs[VTH1];
myMod.dacs[VTH2] = myMods[1].dacs[VTH2];
myMod.dacs[VTH3] = myMods[2].dacs[VTH3];
myMod.dacs[M_VTH1] = myMods[0].dacs[M_VTH1];
myMod.dacs[M_VTH2] = myMods[1].dacs[M_VTH2];
myMod.dacs[M_VTH3] = myMods[2].dacs[M_VTH3];

// check if dacs are different
for (size_t j = 0; j < 16; ++j) {
Expand Down

0 comments on commit 997e5dd

Please sign in to comment.