Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/berusky-1.7.2/src/animation.h
Examining data/berusky-1.7.2/src/profile.cpp
Examining data/berusky-1.7.2/src/types.h
Examining data/berusky-1.7.2/src/input.cpp
Examining data/berusky-1.7.2/src/level_active.h
Examining data/berusky-1.7.2/src/gui.cpp
Examining data/berusky-1.7.2/src/stack.h
Examining data/berusky-1.7.2/src/level_changer.cpp
Examining data/berusky-1.7.2/src/editor.cpp
Examining data/berusky-1.7.2/src/graphics.cpp
Examining data/berusky-1.7.2/src/data_parser_tables.h
Examining data/berusky-1.7.2/src/llist.h
Examining data/berusky-1.7.2/src/berusky.cpp
Examining data/berusky-1.7.2/src/data_parser.cpp
Examining data/berusky-1.7.2/src/level_changer.h
Examining data/berusky-1.7.2/src/utils.cpp
Examining data/berusky-1.7.2/src/events.h
Examining data/berusky-1.7.2/src/level_game.h
Examining data/berusky-1.7.2/src/berusky_gui.h
Examining data/berusky-1.7.2/src/game_logic.cpp
Examining data/berusky-1.7.2/src/portability.h
Examining data/berusky-1.7.2/src/data_parser.h
Examining data/berusky-1.7.2/src/graphics.h
Examining data/berusky-1.7.2/src/game_logic.h
Examining data/berusky-1.7.2/src/level.h
Examining data/berusky-1.7.2/src/animation.cpp
Examining data/berusky-1.7.2/src/editor.h
Examining data/berusky-1.7.2/src/gui.h
Examining data/berusky-1.7.2/src/data_parser_tables.cpp
Examining data/berusky-1.7.2/src/input.h
Examining data/berusky-1.7.2/src/level_active.cpp
Examining data/berusky-1.7.2/src/ini.cpp
Examining data/berusky-1.7.2/src/utils.h
Examining data/berusky-1.7.2/src/ini.h
Examining data/berusky-1.7.2/src/2d_graph.h
Examining data/berusky-1.7.2/src/level.cpp
Examining data/berusky-1.7.2/src/events.cpp
Examining data/berusky-1.7.2/src/level_game.cpp
Examining data/berusky-1.7.2/src/profile.h
Examining data/berusky-1.7.2/src/berusky.h
Examining data/berusky-1.7.2/src/2d_graph.cpp
Examining data/berusky-1.7.2/src/berusky_gui.cpp
Examining data/berusky-1.7.2/src/main.cpp
Examining data/berusky-1.7.2/src/main.h
Examining data/berusky-1.7.2/src/defines.h
Examining data/berusky-1.7.2/acconfig.h

FINAL RESULTS:

data/berusky-1.7.2/src/2d_graph.cpp:1143:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(text,2000,p_text,arguments);
data/berusky-1.7.2/src/2d_graph.cpp:1159:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(text,2000,p_text,arguments);
data/berusky-1.7.2/src/2d_graph.cpp:1174:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(text,2000,p_text,arguments);
data/berusky-1.7.2/src/berusky.cpp:196:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(file,LEVELSET_MASK,set);
data/berusky-1.7.2/src/berusky_gui.cpp:2126:3:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  snprintf(start_mark,1000,MARK_START,set+1,level+1);
data/berusky-1.7.2/src/berusky_gui.cpp:2166:3:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  snprintf(file,MAX_FILENAME,SET_END_FILE_TEXT,set);
data/berusky-1.7.2/src/berusky_gui.cpp:2472:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf(line, 1000, SET_END_FILE_BACK, set+1);
data/berusky-1.7.2/src/berusky_gui.cpp:2673:15:  [4] (shell) execlp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    int ret = execlp(p_dir->game_binary_get(),p_dir->game_binary_get(),"-e",NULL);
data/berusky-1.7.2/src/berusky_gui.cpp:2688:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
  strcat(tmp, p_dir->game_binary_get());
data/berusky-1.7.2/src/editor.cpp:626:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(text,200,p_text,arguments);
data/berusky-1.7.2/src/editor.cpp:1010:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(level_name,p_dir->levels_user_get());
data/berusky-1.7.2/src/editor.cpp:1012:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(level_name,DEFAULT_LEVEL_NAME);
data/berusky-1.7.2/src/editor.cpp:1580:17:  [4] (shell) execlp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      int ret = execlp(p_dir->game_binary_get(),p_dir->game_binary_get(),"-u",level_name,NULL);
data/berusky-1.7.2/src/editor.cpp:1598:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(game_path, p_dir->game_binary_get());
data/berusky-1.7.2/src/editor.cpp:1602:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(level_path, level_name);
data/berusky-1.7.2/src/editor.cpp:1926:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(p_tmp,max_lenght,p_text,arguments);
data/berusky-1.7.2/src/editor.cpp:2018:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(input_line_title+strlen(input_line_title)," (%s/%s) ",
data/berusky-1.7.2/src/editor.cpp:2142:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(output_lines[1]+2,CONSOLE_MAX_INPUT_LINE-2,p_text,arguments);
data/berusky-1.7.2/src/graphics.h:354:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(file, BACKGROUND_NAME, back_num + 1);
data/berusky-1.7.2/src/gui.cpp:523:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(title,200,p_text,arguments);
data/berusky-1.7.2/src/ini.cpp:94:11:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  return (strcpy(p_out, p_default));
data/berusky-1.7.2/src/ini.cpp:104:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    return (strcpy(p_out, p_default));
data/berusky-1.7.2/src/ini.cpp:116:11:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  return (strcpy(p_out, p_default));
data/berusky-1.7.2/src/level_active.cpp:127:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(p_list[i].levelname,subdir);
data/berusky-1.7.2/src/level_game.cpp:293:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(p_lev->signum, H_LEVEL);
data/berusky-1.7.2/src/portability.h:50:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf          _snprintf
data/berusky-1.7.2/src/portability.h:50:27:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf          _snprintf
data/berusky-1.7.2/src/portability.h:52:9:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
#define mktemp            _mktemp
data/berusky-1.7.2/src/profile.cpp:89:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(filename, p_file);
data/berusky-1.7.2/src/profile.cpp:120:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(profile_name, p_name);
data/berusky-1.7.2/src/profile.cpp:122:3:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
  mktemp(filename);
data/berusky-1.7.2/src/utils.cpp:135:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(levels_user,DIRECTORY_GET(INI_USER_LEVELS));
data/berusky-1.7.2/src/utils.cpp:138:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(tmp,tmpfile_get(path));
data/berusky-1.7.2/src/utils.cpp:469:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(tmp_dir, p_dir);
data/berusky-1.7.2/src/utils.cpp:515:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy((*p_list)[i].name, namelist[i]->d_name);
data/berusky-1.7.2/src/utils.cpp:552:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy((*p_list)[size++].name, Data.name);
data/berusky-1.7.2/src/utils.cpp:769:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(file, BACKGROUND_NAME, j+1);
data/berusky-1.7.2/src/utils.h:230:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(text,2000,p_text,arguments);
data/berusky-1.7.2/src/utils.h:245:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(text,2000,p_text,arguments);
data/berusky-1.7.2/src/utils.h:261:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(text,2000,p_text,arguments);
data/berusky-1.7.2/src/utils.h:399:28:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
  return (p_end ? (char *) strcat(p_str, p_end) : p_str);
data/berusky-1.7.2/src/animation.cpp:267:21:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    time_array[i] = random()%30+1;
data/berusky-1.7.2/src/berusky_gui.cpp:53:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(SDL_GetTicks());
data/berusky-1.7.2/src/main.cpp:281:3:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  srand(clock());
data/berusky-1.7.2/src/portability.h:49:9:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
#define random()          rand()
data/berusky-1.7.2/src/utils.cpp:451:17:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  char *p_tmp = getenv("HOME");
data/berusky-1.7.2/src/2d_graph.cpp:177:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char file[MAX_FILENAME];
data/berusky-1.7.2/src/2d_graph.cpp:729:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char    filename[200];
data/berusky-1.7.2/src/2d_graph.cpp:730:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char    line[200];
data/berusky-1.7.2/src/2d_graph.cpp:816:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(p_sprites+shandle,&tmp, sizeof(tmp));
data/berusky-1.7.2/src/2d_graph.cpp:834:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(p_sprites+shandle,&tmp, sizeof(tmp));      
data/berusky-1.7.2/src/2d_graph.cpp:845:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(p_sprites+start,p_spr,sizeof(p_spr[0])*num);
data/berusky-1.7.2/src/2d_graph.cpp:1004:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char line[10];
data/berusky-1.7.2/src/2d_graph.cpp:1034:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char  tmp[2000];
data/berusky-1.7.2/src/2d_graph.cpp:1035:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf(tmp, "font%d.spr", font_index);
data/berusky-1.7.2/src/2d_graph.cpp:1136:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char      text[2000];
data/berusky-1.7.2/src/2d_graph.cpp:1152:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char      text[2000];
data/berusky-1.7.2/src/2d_graph.cpp:1167:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char      text[2000];
data/berusky-1.7.2/src/2d_graph.h:147:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char graphics_dir[MAX_FILENAME];
data/berusky-1.7.2/src/animation.cpp:68:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if(!data_file.open(p_file, p_dir))
data/berusky-1.7.2/src/berusky.cpp:195:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char file[MAX_FILENAME];
data/berusky-1.7.2/src/berusky.cpp:218:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char *p_name_table[LEVEL_SET_NUM] = {NULL,NULL,NULL,NULL,NULL,NULL};
data/berusky-1.7.2/src/berusky_gui.cpp:172:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char last_profile[MAX_FILENAME];
data/berusky-1.7.2/src/berusky_gui.cpp:377:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char profile_name[MAX_PROFILE_NAME] = "";
data/berusky-1.7.2/src/berusky_gui.cpp:1441:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          char tmp[3];
data/berusky-1.7.2/src/berusky_gui.cpp:1445:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
          int level = atoi(tmp);
data/berusky-1.7.2/src/berusky_gui.cpp:2125:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char start_mark[1000];
data/berusky-1.7.2/src/berusky_gui.cpp:2129:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char line[1000];
data/berusky-1.7.2/src/berusky_gui.cpp:2144:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char hint_buffer[HINT_BUFFER_LENGHT];
data/berusky-1.7.2/src/berusky_gui.cpp:2165:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char file[MAX_FILENAME];
data/berusky-1.7.2/src/berusky_gui.cpp:2169:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char end_buffer[END_BUFFER_LENGHT];
data/berusky-1.7.2/src/berusky_gui.cpp:2182:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char cr_buffer[END_BUFFER_LENGHT];
data/berusky-1.7.2/src/berusky_gui.cpp:2292:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char tmp[100];
data/berusky-1.7.2/src/berusky_gui.cpp:2406:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char tmp[100];
data/berusky-1.7.2/src/berusky_gui.cpp:2471:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char line[1000];
data/berusky-1.7.2/src/berusky_gui.cpp:2687:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tmp[PATH_MAX] = "\"";
data/berusky-1.7.2/src/data_parser.cpp:71:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        sum = (sum == NO_VALUE) ? atoi(p_token) : (add_operation == OPERATION_ADD ? sum + atoi(p_token) : sum | atoi(p_token));
data/berusky-1.7.2/src/data_parser.cpp:71:91:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        sum = (sum == NO_VALUE) ? atoi(p_token) : (add_operation == OPERATION_ADD ? sum + atoi(p_token) : sum | atoi(p_token));
data/berusky-1.7.2/src/data_parser.cpp:71:113:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        sum = (sum == NO_VALUE) ? atoi(p_token) : (add_operation == OPERATION_ADD ? sum + atoi(p_token) : sum | atoi(p_token));
data/berusky-1.7.2/src/data_parser.cpp:179:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int data_parser::open(const char *p_file, const char *p_dir)
data/berusky-1.7.2/src/data_parser.h:38:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[MAX_POS_NAME];
data/berusky-1.7.2/src/data_parser.h:60:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char                 record[MAX_RECORD_LEN];
data/berusky-1.7.2/src/data_parser.h:100:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int  open(const char *p_file, const char *p_dir);
data/berusky-1.7.2/src/editor.cpp:622:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char      text[200];
data/berusky-1.7.2/src/editor.cpp:824:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char *layer_names[ALL_LEVEL_LAYERS] = 
data/berusky-1.7.2/src/editor.cpp:860:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char * layers_status[2] = 
data/berusky-1.7.2/src/editor.cpp:1039:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char file[MAX_FILENAME] = "";
data/berusky-1.7.2/src/editor.cpp:1097:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char file[MAX_FILENAME] = "";
data/berusky-1.7.2/src/editor.cpp:1570:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char filename[MAX_FILENAME];
data/berusky-1.7.2/src/editor.cpp:1577:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char level_name[MAX_FILENAME];
data/berusky-1.7.2/src/editor.cpp:1593:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char level_name[MAX_FILENAME];
data/berusky-1.7.2/src/editor.cpp:1597:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char game_path[PATH_MAX] = "\"";
data/berusky-1.7.2/src/editor.cpp:1601:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char level_path[PATH_MAX] = "\"";
data/berusky-1.7.2/src/editor.h:422:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char         output_lines[CONSOLE_OUTPUT_LINES][CONSOLE_MAX_INPUT_LINE];
data/berusky-1.7.2/src/editor.h:427:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char         input_line_title[CONSOLE_MAX_INPUT_LINE];
data/berusky-1.7.2/src/editor.h:435:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char         input_string[CONSOLE_MAX_INPUT_LINE];
data/berusky-1.7.2/src/editor.h:619:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char level_name[MAX_FILENAME];
data/berusky-1.7.2/src/graphics.h:350:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char file[MAX_FILENAME];
data/berusky-1.7.2/src/gui.cpp:519:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char title[200];
data/berusky-1.7.2/src/ini.cpp:83:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char line[MAX_TOKEN_LEN];
data/berusky-1.7.2/src/ini.cpp:100:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char line[MAX_TOKEN_LEN];
data/berusky-1.7.2/src/ini.cpp:121:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char line[MAX_TOKEN_LEN];
data/berusky-1.7.2/src/ini.cpp:128:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      return (atoi(ini_remove_end_of_line(p_rest)));
data/berusky-1.7.2/src/ini.cpp:136:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char line[MAX_TOKEN_LEN];
data/berusky-1.7.2/src/ini.cpp:147:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      return (atoi(ini_remove_end_of_line(p_rest)));
data/berusky-1.7.2/src/ini.cpp:157:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char line[MAX_TOKEN_LEN];
data/berusky-1.7.2/src/ini.cpp:174:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char line[MAX_TOKEN_LEN];
data/berusky-1.7.2/src/ini.cpp:234:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char line[MAX_TOKEN_LEN];
data/berusky-1.7.2/src/ini.cpp:287:17:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
  FHANDLE f_new(tmpfile());
data/berusky-1.7.2/src/level.cpp:157:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if(!data_file.open(p_item_definition_file, p_dir)) {    
data/berusky-1.7.2/src/level.cpp:191:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if(!data_file.open(p_item_animation_file, p_dir))
data/berusky-1.7.2/src/level.h:97:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char         *item_desc_name[MAX_ITEM_NAMES];
data/berusky-1.7.2/src/level.h:99:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char         *item_desc_rotation[MAX_ITEM_ROTATIONS];
data/berusky-1.7.2/src/level_active.cpp:99:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tmp[PATH_MAX];
data/berusky-1.7.2/src/level_active.cpp:100:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char subdir[PATH_MAX] = "";
data/berusky-1.7.2/src/level_active.h:85:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char levelname[MAX_LEVELNAME];
data/berusky-1.7.2/src/level_active.h:86:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char password[MAX_PASSWORD];
data/berusky-1.7.2/src/level_game.cpp:162:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char file[MAX_FILENAME];
data/berusky-1.7.2/src/level_game.h:211:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char signum[30];               // -> "Berusky (C) Anakreon 1998"
data/berusky-1.7.2/src/level_game.h:214:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char rot[5];                   // -> players rotation
data/berusky-1.7.2/src/level_game.h:215:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char rezerved[100];            // -> reserved
data/berusky-1.7.2/src/main.cpp:83:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char in_buffer[4000];
data/berusky-1.7.2/src/profile.cpp:86:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tmp[MAX_FILENAME];
data/berusky-1.7.2/src/profile.cpp:104:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[1024];
data/berusky-1.7.2/src/profile.cpp:121:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
  strcpy(filename,"profileXXXXXX");
data/berusky-1.7.2/src/profile.cpp:123:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
  strcat(filename,".ini");
data/berusky-1.7.2/src/profile.h:51:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char              filename[MAX_FILENAME];  
data/berusky-1.7.2/src/profile.h:57:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char              profile_name[MAX_FILENAME];
data/berusky-1.7.2/src/utils.cpp:81:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char logfile[1000];
data/berusky-1.7.2/src/utils.cpp:99:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[MAX_FILENAME];
data/berusky-1.7.2/src/utils.cpp:137:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char path[PATH_MAX];
data/berusky-1.7.2/src/utils.cpp:158:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tmp[100];
data/berusky-1.7.2/src/utils.cpp:170:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tmp[100];
data/berusky-1.7.2/src/utils.cpp:183:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tmp[100];  
data/berusky-1.7.2/src/utils.cpp:265:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char filename[MAX_FILENAME];
data/berusky-1.7.2/src/utils.cpp:267:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  tmp = fopen(return_path(p_dir, p_file, filename, MAX_FILENAME),p_mode);
data/berusky-1.7.2/src/utils.cpp:269:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char cwd[MAX_FILENAME];
data/berusky-1.7.2/src/utils.cpp:361:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[FILE_BUF_SIZE];
data/berusky-1.7.2/src/utils.cpp:467:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tmp_dir[MAX_FILENAME];
data/berusky-1.7.2/src/utils.cpp:501:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tmp[MAX_FILENAME];
data/berusky-1.7.2/src/utils.cpp:528:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char current_dir[MAX_FILENAME];
data/berusky-1.7.2/src/utils.cpp:768:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char file[MAX_FILENAME];
data/berusky-1.7.2/src/utils.h:190:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(p_tmp, p_src, size);
data/berusky-1.7.2/src/utils.h:226:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char      text[2000];
data/berusky-1.7.2/src/utils.h:241:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char      text[2000];
data/berusky-1.7.2/src/utils.h:257:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char      text[2000];
data/berusky-1.7.2/src/utils.h:297:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char levels[MAX_FILENAME];
data/berusky-1.7.2/src/utils.h:298:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char levels_user[MAX_FILENAME];
data/berusky-1.7.2/src/utils.h:299:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char gamedata[MAX_FILENAME];
data/berusky-1.7.2/src/utils.h:300:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char graphics[MAX_FILENAME];
data/berusky-1.7.2/src/utils.h:301:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tmp[MAX_FILENAME];
data/berusky-1.7.2/src/utils.h:302:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char game_binary[MAX_FILENAME];
data/berusky-1.7.2/src/utils.h:303:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char cwd[MAX_FILENAME];
data/berusky-1.7.2/src/utils.h:406:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[MAX_FILENAME];
data/berusky-1.7.2/src/2d_graph.cpp:732:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(filename, p_file, 200);
data/berusky-1.7.2/src/2d_graph.h:153:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(graphics_dir,p_dir,MAX_FILENAME);
data/berusky-1.7.2/src/berusky_gui.cpp:463:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        int  len = strlen(profile_name);
data/berusky-1.7.2/src/berusky_gui.cpp:2155:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    p_tmp = p_tmp + strlen(p_tmp);
data/berusky-1.7.2/src/berusky_gui.cpp:2689:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
  strcat(tmp, "\"");
data/berusky-1.7.2/src/editor.cpp:1033:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(level_name,p_name,MAX_FILENAME);  
data/berusky-1.7.2/src/editor.cpp:1044:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(file,p_file,MAX_FILENAME);
data/berusky-1.7.2/src/editor.cpp:1111:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(file, p_file, MAX_FILENAME);
data/berusky-1.7.2/src/editor.cpp:1599:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat(game_path, "\"");
data/berusky-1.7.2/src/editor.cpp:1603:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat(level_path, "\"");
data/berusky-1.7.2/src/editor.cpp:2014:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(p_text, input_line_title, CONSOLE_MAX_INPUT_LINE);
data/berusky-1.7.2/src/editor.cpp:2018:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    sprintf(input_line_title+strlen(input_line_title)," (%s/%s) ",
data/berusky-1.7.2/src/editor.cpp:2022:5:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
    sprintf(input_line_title+strlen(input_line_title)," ");
data/berusky-1.7.2/src/editor.cpp:2022:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    sprintf(input_line_title+strlen(input_line_title)," ");
data/berusky-1.7.2/src/editor.cpp:2138:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(output_lines[0],output_lines[1],CONSOLE_MAX_INPUT_LINE);
data/berusky-1.7.2/src/editor.h:474:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(input_string,p_str,CONSOLE_MAX_INPUT_LINE);
data/berusky-1.7.2/src/editor.h:477:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    input_string_lenght = strlen(input_string);
data/berusky-1.7.2/src/editor.h:494:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(input_line_title,p_str,CONSOLE_MAX_INPUT_LINE);
data/berusky-1.7.2/src/ini.cpp:218:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
       (c = fgetc(f_in)) != EOF && c != separator && len + 2 < max;
data/berusky-1.7.2/src/level_active.cpp:62:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(p_list[0].levelname, p_level, sizeof(p_list[0].levelname));
data/berusky-1.7.2/src/level_active.cpp:85:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(p_subdir, p_tmp, PATH_MAX);
data/berusky-1.7.2/src/level_active.cpp:106:7:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
      strcat(subdir,"/");
data/berusky-1.7.2/src/level_active.cpp:133:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(p_list[i].levelname,p_start,sizeof(p_list[i].levelname));
data/berusky-1.7.2/src/level_active.cpp:139:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(p_list[i].password,p_start,sizeof(p_list[i].password));
data/berusky-1.7.2/src/profile.cpp:114:73:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  file_save(DIRECTORY_GET(INI_USER_PROFILES), filename, (void *)buffer, strlen(buffer), "w");
data/berusky-1.7.2/src/utils.cpp:239:7:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
      strncat(p_buffer,p_dir+1,max_lenght-strlen(p_buffer)-1);
data/berusky-1.7.2/src/utils.cpp:239:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      strncat(p_buffer,p_dir+1,max_lenght-strlen(p_buffer)-1);
data/berusky-1.7.2/src/utils.cpp:241:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(p_buffer,p_dir,max_lenght-1);
data/berusky-1.7.2/src/utils.cpp:244:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat(p_buffer,"/");
data/berusky-1.7.2/src/utils.cpp:246:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat(p_buffer,"\\");
data/berusky-1.7.2/src/utils.cpp:248:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(p_buffer,p_file,max_lenght-strlen(p_buffer));
data/berusky-1.7.2/src/utils.cpp:248:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strncat(p_buffer,p_file,max_lenght-strlen(p_buffer));
data/berusky-1.7.2/src/utils.cpp:252:7:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
      strncat(p_buffer,p_file+1,max_lenght-strlen(p_buffer)-1);
data/berusky-1.7.2/src/utils.cpp:252:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      strncat(p_buffer,p_file+1,max_lenght-strlen(p_buffer)-1);
data/berusky-1.7.2/src/utils.cpp:254:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(p_buffer,p_file,max_lenght-1);
data/berusky-1.7.2/src/utils.cpp:453:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(p_dir,p_tmp,max);
data/berusky-1.7.2/src/utils.h:273:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int delka = strlen(p_kor);

ANALYSIS SUMMARY:

Hits = 191
Lines analyzed = 21413 in approximately 0.50 seconds (42467 lines/second)
Physical Source Lines of Code (SLOC) = 14866
Hits@level = [0]  28 [1]  37 [2] 108 [3]   5 [4]  41 [5]   0
Hits@level+ = [0+] 219 [1+] 191 [2+] 154 [3+]  46 [4+]  41 [5+]   0
Hits/KSLOC@level+ = [0+] 14.7316 [1+] 12.8481 [2+] 10.3592 [3+] 3.09431 [4+] 2.75797 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.