Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enum { NENERGY=22, NANGLE=180 };
- class G4LEpp : public G4HadronicInteraction
- {
- ....
- G4float * sig[NANGLE];
- static G4float SigCoul[NENERGY][NANGLE];
- ....
- };
- G4LEpp::SetCoulombEffects(G4int State)
- {
- if (State) {
- for(G4int i=0; i<NANGLE; i++)
- {
- sig[i] = SigCoul[i];
- }
- elab = ElabCoul;
- }
- ....
- }
- This suspicious code was found in Geant4 project by PVS-Studio static code analyzer.
- Warning message is:
- V557 Array overrun is possible. The value of 'i' index could reach 179. g4lepp.cc 62
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment