Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define DATUM_CODE_LENGTH 7
- typedef struct Datum_Table_Row
- {
- ...
- char Code[DATUM_CODE_LENGTH];
- ...
- } Datum_Row;
- long Initialize_Datums_File(const char *File_7Parms,
- const char *File_3Parms)
- {
- ...
- for (i = 0; i < DATUM_CODE_LENGTH; i++)
- Datum_Table_3Param[index].Code[i] =
- Datum_Table_3Param[index].Code[i+1];
- ...
- }
- This suspicious code was found in saga project by PVS-Studio static code analyzer.
- Warning message is:
- V557 Array overrun is possible. The value of 'i + 1' index could reach 7. pj_geotrans datum.c 367
- 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
Advertisement