CorentinGS / Battleship

Unbound checked function calls lacking external bounds checking CXX-S1003
Security
Major
a year agoa year old
Unbound checked function calls lacking external bounds checking
46    const char COMPUTER_NAMES[5][MAX_NAME_SIZE] = {"Totoro", "Chihiro", "Haku", "Satsuki", "Kiki"};
47
48    srand(time(NULL));
49    strcpy(name, COMPUTER_NAMES[rand() % 2]);50}
51
52void
Unbound checked function calls lacking external bounds checking
 83    }
 84
 85    /* Set the player's name. */
 86    strcpy(player1->name, name); 87
 88    if (GAME_MODE_MULTI == game.mode) {
 89        /* Init the players. */
Unbound checked function calls lacking external bounds checking
 97        }
 98
 99        /* Set the player's name. */
100        strcpy(player2->name, name);101    } else {
102        /* Set the ai's name. */
103        get_random_ai_name(player2->name);