Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void
- G4HEInelastic::MediumEnergyClusterProduction(....)
- {
- ....
- G4double alem[] = {1.40, 2.30, 2.70, 3.00, 3.40, 4.60, 7.00};
- ....
- for (j = 1; j < 8; j++) {
- if (alekw < alem[j]) {
- jmax = j;
- break;
- }
- }
- ....
- }
- 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 'j' index could reach 7. g4heinelastic.cc 4682
- 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