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/rocksndiamonds-4.2.0.4+dfsg/src/anim.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/main.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_mus.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_mus.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_hlp.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conftime.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/Electrons.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/Input.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/DDSpriteBuffer.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/DDSpriteBuffer.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/Explosions.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/MainGameLoop.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/MainForm.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/vb_lib.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/DDScrollBuffer.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/Globals.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/OrangeDisk.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/main.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/SnikSnaks.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/DoGameStuff.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/BugsTerminals.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/Display.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/Sound.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/SnikSnaks.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/BugsTerminals.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/Input.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/Explosions.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/Infotrons.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/InitGameConditions.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/global.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/Electrons.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/init.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/Zonk.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/DDScrollBuffer.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/vb_lib.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/ASM.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/Globals.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/export.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/OrangeDisk.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/InitGameConditions.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/Zonk.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/MainForm.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/DoGameStuff.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/ASM.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/file.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/Infotrons.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/Murphy.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/MainGameLoop.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/Murphy.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/main_sp.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/Sound.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/Display.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/game_sp.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/network.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_g2m.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/main.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_cus.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/files.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_esg.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_var.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/netserv.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/tape.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/tape.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/tools.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/editor.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_chr.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/confhash.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/anim.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_e2s.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_snd.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/init.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_e2g.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_fnt.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/config.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/config.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/engines.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_grp.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/tools.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/netserv.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_grp.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/init.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_act.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_snd.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/files.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_tools.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_init.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_game.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_tools.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_main.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_game.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/game_mm.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_main.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_files.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/export.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/main_mm.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_gfx.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_cus.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_g2s.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/network.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_gfx.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/conf_chr.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/events.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/screens.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/logic.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/cave.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/emerald.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/main_em.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/game_em.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/global.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/init.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/cave.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/export.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/reademc.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/graphics.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/convert.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/game.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/random.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/sound.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/image.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/sound.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/miniunz.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/iowin32.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/ioapi.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/unzip.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/iowin32.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/miniunz.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/unzip.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/ioapi.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/android.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/macosx.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/types.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/platform.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/snapshot.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/libgame.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/random.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/windows.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/joystick.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/hash.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/sdl.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/system.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/sdl.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/image.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/joystick.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/snapshot.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/hash.h
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/system.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/events.c
Examining data/rocksndiamonds-4.2.0.4+dfsg/src/game.c

FINAL RESULTS:

data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1639:5:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    chmod(dir, dir_mode);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1658:3:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
  chmod(filename, perms);
data/rocksndiamonds-4.2.0.4+dfsg/src/config.c:38:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(program_version_string, "%d.%d.%d.%d%s",
data/rocksndiamonds-4.2.0.4+dfsg/src/config.c:59:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(program_init_string, "%s %s",
data/rocksndiamonds-4.2.0.4+dfsg/src/config.c:113:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(window_title_string, "%s (%d %%) [%s]",
data/rocksndiamonds-4.2.0.4+dfsg/src/config.c:117:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(window_title_string, "%s [%s]",
data/rocksndiamonds-4.2.0.4+dfsg/src/config.c:124:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(window_title_string, "%s (%d %%)",
data/rocksndiamonds-4.2.0.4+dfsg/src/config.c:127:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(window_title_string, "%s",
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:5526:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(basename, "%s.txt", element_info[element].token_name);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:5532:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(basename, "%s.txt", element_info[element].class_name);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:6413:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(infotext, "%s counter value by 1, 5 or 10",
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:6604:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(infotext, "Enter %s", textinput_info[i].infotext);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:6654:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(infotext, "Enter %s", textarea_info[i].infotext);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:6729:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(infotext, "Select %s", selectbox_info[i].infotext);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:6798:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(infotext, "%s", textbutton_info[i].infotext);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:12063:2:  [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(part, MAX_CB_PART_SIZE + 1, format, prefix, element);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:12064:2:  [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(text, part);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:13223: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(textinput_info[type_id].value, gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14375:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(shortcut, " ('%s%c')",
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14379:2:  [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(infotext, shortcut);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14506:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf(infotext, "%s: %d, %d", text, lx, ly);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14508:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf(infotext, "%s: %d, %d", text,
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14553: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(infotext, drawingarea_info[type_id].infotext);
data/rocksndiamonds-4.2.0.4+dfsg/src/events.c:1573:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(message_part1, "New %s set%s added",
data/rocksndiamonds-4.2.0.4+dfsg/src/events.c:1580:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(message, "%s, but %d dropped file%s failed!",
data/rocksndiamonds-4.2.0.4+dfsg/src/events.c:1583:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(message, "%s!", message_part1);
data/rocksndiamonds-4.2.0.4+dfsg/src/events.c:1587:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(message, "Failed to process dropped file%s!",
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:1717: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(level->name, NAMELESS_LEVEL_NAME);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:1718: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(level->author, ANONYMOUS_NAME);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:1749:4:  [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->author, PROGRAM_AUTHOR_STRING);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:1960: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,   level_backup.name);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:1961: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.author, level_backup.author);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:2050:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(basename, "%s", LEVELTEMPLATE_FILENAME);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:2052:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(basename, "%03d.%s", nr, extension);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:2069: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(basename, UNDEFINED_FILENAME);		// default: undefined file
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:2088:2:  [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(basename, entry_basename);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:2136:3:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
  vsprintf(basename, format, ap);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:3391: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(cookie, chunk_name);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:4032: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(level_mm->name, level->name);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:4033: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(level_mm->author, level->author);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:4069: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(level->name, level_mm->name);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:4073: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->author, level_mm->author);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5918: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(line_raw, line);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5924:9:  [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(previous_line, line_ptr);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5926: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(line, previous_line);      // copy storage buffer to line
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5935: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(previous_line, line);      // copy line to storage buffer
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5953: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(last_comment, line_ptr);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5961: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(level_name, &line[1]);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:7379: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(xx_default_description, getDefaultElementDescription(ei));
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:7416: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(xx_default_description, getDefaultElementDescription(ei));
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:7954: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(cookie, chunk_name);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:8317: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(highscore[i].Name, EMPTY_PLAYER_NAME);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:8916:12:  [4] (shell) system:
  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.
    &setup.system.sdl_renderdriver,		"system.sdl_renderdriver"
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:8920:12:  [4] (shell) system:
  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.
    &setup.system.sdl_videodriver,		"system.sdl_videodriver"
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:8924:12:  [4] (shell) system:
  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.
    &setup.system.sdl_audiodriver,		"system.sdl_audiodriver"
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:8928:12:  [4] (shell) system:
  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.
    &setup.system.audio_fragment_size,		"system.audio_fragment_size"
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9364:7:  [4] (shell) system:
  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.
  si->system.sdl_renderdriver = getStringCopy(ARG_DEFAULT);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9365:7:  [4] (shell) system:
  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.
  si->system.sdl_videodriver = getStringCopy(ARG_DEFAULT);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9366:7:  [4] (shell) system:
  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.
  si->system.sdl_audiodriver = getStringCopy(ARG_DEFAULT);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9367:7:  [4] (shell) system:
  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.
  si->system.audio_fragment_size = DEFAULT_AUDIO_FRAGMENT_SIZE;
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9569:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(prefix, "%s%d", TOKEN_STR_PLAYER_PREFIX, pnr + 1);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9576:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(full_token, "%s%s", prefix, player_setup_tokens[i].text);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9843:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(prefix, "%s%d", TOKEN_STR_PLAYER_PREFIX, pnr + 1);
data/rocksndiamonds-4.2.0.4+dfsg/src/game.c:4976:4:  [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(highscore[l].Name, highscore[l - 1].Name);
data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_files.c:124: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(native_mm_level.name, NAMELESS_LEVEL_NAME);
data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_files.c:125: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(native_mm_level.author, ANONYMOUS_NAME);
data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_files.c:296: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(cookie, chunk_name);
data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_game.c:3988:4:  [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(highscore[l].Name, highscore[l - 1].Name);
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5163:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access(global.create_images_dir, W_OK) != 0)
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5228:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(string_in_brackets, "[%s]", string);
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5439:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(font_token, "%s_%d", CONFIG_TOKEN_FONT_INITIAL, j + 1);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:332:2:  [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(text, gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:968:2:  [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(gi->textinput.last_value, gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:978:4:  [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(gi->textinput.last_value, gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:988:4:  [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(gi->textinput.last_value, gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:1000:4:  [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(gi->textinput.last_value, gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:1006:4:  [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(gi->textbutton.value, gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:1007:4:  [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(gi->textarea.value, gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:1008:4:  [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(gi->textarea.last_value, gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:1019:4:  [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(gi->textinput.last_value, gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:1025:4:  [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(gi->textarea.last_value, gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:1720:2:  [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(gi->textinput.last_value, gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:1729:2:  [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(gi->textarea.last_value, gi->textarea.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2219: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(text, gi->textarea.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2220: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(&gi->textarea.value[cursor_position + 1], &text[cursor_position]);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2245:2:  [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(gi->textinput.value, gi->textinput.last_value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2254:4:  [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(gi->textarea.last_value, gi->textarea.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2282:2:  [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(gi->textinput.last_value, gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2325: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(text, gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2326: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(&gi->textinput.value[cursor_pos + 1], &text[cursor_pos]);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2346: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(text, gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2347: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(&gi->textinput.value[cursor_pos - 1], &text[cursor_pos]);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2354: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(text, gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2355: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(&gi->textinput.value[cursor_pos], &text[cursor_pos + 1]);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2405: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(text, gi->textarea.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2406: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(&gi->textarea.value[cursor_pos - 1], &text[cursor_pos]);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2414: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(text, gi->textarea.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2415: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(&gi->textarea.value[cursor_pos], &text[cursor_pos + 1]);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:57: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_new, MAX_OUTPUT_LINESIZE, format, ap);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:105:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(program.log_file_default[LOG_ERR_ID], format, ap2);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:111:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf(file, format, ap);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:125:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(program.log_file_default[LOG_ERR_ID], format, ap2);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:132:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf(file, format, ap);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:207:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(program.log_file_default[LOG_OUT_ID], format, ap2);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:213:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf(file, format, ap);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:231:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf(file, format, ap);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:384: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(message_ptr, size_left, format, ap);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:797: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(login_name, ANONYMOUS_NAME);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:937:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(complete_string, "%s%s%s", s1, sep, s2);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:951:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(complete_string, "%s%s%s%s%s", s1, sep, s2, sep, s3);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1025: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(s_copy, s);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1195: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(option_str, option);			// copy argument into buffer
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1801:4:  [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(name_buffer, translate_key[i].name);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1836:4:  [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(name_buffer, translate_key[i].x11name);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2625:22:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  boolean success = (access(filename, F_OK) == 0);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:3875:5:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vprintf(format, ap);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/sdl.c:455:23:  [4] (shell) system:
  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.
  if (!strEqual(setup.system.sdl_renderdriver, ARG_DEFAULT))
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/sdl.c:456:47:  [4] (shell) system:
  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.
    SDL_SetHint(SDL_HINT_RENDER_DRIVER, setup.system.sdl_renderdriver);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/sdl.c:2417:13:  [4] (shell) system:
  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.
		    setup.system.audio_fragment_size) < 0)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:553:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(basename, "%03d.%s", nr, TAPEFILE_EXTENSION);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:566:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(basename, "%03d.%s", nr, TAPEFILE_EXTENSION);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:592:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(basename, "%03d.%s", nr, SCOREFILE_EXTENSION);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:687:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(basename, "%s_%d.txt",
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1669:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(cookie, "%s_%s_FILE_VERSION_%d.%d",
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1749:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(entry, "%s:", token);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1754: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(entry, value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1980: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(line_raw_copy, line_copy);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:2154: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(line_raw, line);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:2160:2:  [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(previous_line, line_ptr);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:2162: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(line, previous_line);	// copy storage buffer to line
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:2171: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(previous_line, line);	// copy line to storage buffer
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4279: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(value_string, (*(boolean *)value ? "true" : "false"));
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4283: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(value_string, (*(boolean *)value ? "on" : "off"));
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4287: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(value_string, (*(int *)value == AUTO  ? "auto" :
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4292: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(value_string, (*(boolean *)value ? "yes" : "no"));
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4296: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(value_string, (*(int *)value == AUTO  ? "auto" :
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4301: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(value_string, (*(boolean *)value ? "AGA" : "ECS"));
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4305: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(value_string, getKeyNameFromKey(*(Key *)value));
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4309: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(value_string, getX11KeyNameFromKey(*(Key *)value));
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4320: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(value_string, *(char **)value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4349:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(token_string, "%s%s", prefix, token_text);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4369:7:  [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(line, keyname);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/system.h:1433:26:  [4] (shell) system:
  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.
  struct SetupSystemInfo system;
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:168:3:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
  vsprintf(buffer, format, ap);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:183:3:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
  vsprintf(buffer, format, ap);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:351: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(buffer, line);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:593:4:  [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(buffer, line_ptr);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:639:21:  [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.
  int text_length = vsnprintf(text_buffer, MAX_OUTPUT_LINESIZE, format, ap);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/ioapi.c:27:11:  [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/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/ioapi.c:27:20:  [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/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/miniunz.c:61:28:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    do { if (DEBUG_PRINTF) fprintf(stderr, __VA_ARGS__); } while (0)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/miniunz.c:201: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(buffer, newdir);
data/rocksndiamonds-4.2.0.4+dfsg/src/netserv.c:105: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((char *)ptr, s);
data/rocksndiamonds-4.2.0.4+dfsg/src/network.c:297:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(message, "Failed to resolve network server hostname '%s'!",
data/rocksndiamonds-4.2.0.4+dfsg/src/network.c:309:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(message, "Connecting to network server host %s ...", hostname);
data/rocksndiamonds-4.2.0.4+dfsg/src/network.c:786:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(message, (cause_for_stopping == NETWORK_STOP_BY_ERROR ?
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:1099:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(main_text_name,         "%s",   local_team_mode ? "Team:" : "Name:");
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:1101: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(main_text_first_level,  int2str(leveldir_current->first_level,
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:1103: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(main_text_last_level,   int2str(leveldir_current->last_level,
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:1105: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(main_text_level_number, int2str(level_nr,
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:2906: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(token, element_info[element].token_name);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:2909: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(token, element_action_info[action].suffix);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:2912: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(token, element_direction_info[MV_DIR_TO_BIT(direction)].suffix);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:3772:53:  [4] (shell) system:
  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.
  DrawTextF(xstart2, ystart, font_text, "%s", setup.system.sdl_renderdriver);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:3780:53:  [4] (shell) system:
  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.
  DrawTextF(xstart2, ystart, font_text, "%s", setup.system.sdl_videodriver);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:3788:53:  [4] (shell) system:
  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.
  DrawTextF(xstart2, ystart, font_text, "%s", setup.system.sdl_audiodriver);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:3980: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(last_player_name, setup.player_name);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4009: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(setup.player_name, last_player_name);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4842:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4902:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4951:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(identifier, "%s", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4952:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4989: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(network_server_hostname, STR_NETWORK_AUTO_DETECT_SETUP);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5081:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5157:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(identifier, "%s", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5158:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5207:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(identifier, "%s", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5208:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5258:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(identifier, "%s", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5259:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5426:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5494:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5562:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5711:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(identifier, "%s", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5712:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5752:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5794:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5836:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5882:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf(name, "%s", text);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:6154:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(message, "Game speed set to %s for VSync to work!", game_speed_text);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:7632: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(step->mapping, mapping);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:7749: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(mapping, step->field);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:7751: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(mapping, temp);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:7774:8:  [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(mapping, step->field);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:7777:8:  [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(mapping, temp);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:7795:8:  [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(mapping, step->field);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:7797:8:  [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(mapping, temp);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:7827:8:  [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(mapping, prev_step->mapping);
data/rocksndiamonds-4.2.0.4+dfsg/src/tape.c:319: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(s, (type & DATETIME_DATE_YYYY ? int2str(year4, 4) :
data/rocksndiamonds-4.2.0.4+dfsg/src/tape.c:335: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(s, (type & DATETIME_TIME_HH  ? int2str(hh, 2) :
data/rocksndiamonds-4.2.0.4+dfsg/src/tools.c:189:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(s, "%d\t['%s']", element, token_name);
data/rocksndiamonds-4.2.0.4+dfsg/src/game.c:12214:16:  [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.
      random = random * 129 + 1;
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/export.h:31:16:  [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.
  unsigned int random;
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/game.c:90:28:  [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.
  game_em.random = game_em.random * 129 + 1;
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/init.c:82:32:  [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.
      game_em.random = game_em.random * 129 + 1;
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/init.c:84:20:  [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.
    seed = game_em.random;
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/logic.c:7454:30:  [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.
  start_check_nr = ((game_em.random & 128 ? 0 : 1) * 2 +
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/logic.c:7455:16:  [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.
		    (game_em.random & 256 ? 0 : 1));
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/logic.c:7492:18:  [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.
  seed = game_em.random;
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/logic.c:7519:12:  [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.
  uint64_t random;
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/logic.c:7521:12:  [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.
  uint32_t random;
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/logic.c:7556:20:  [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.
  random = game_em.random;
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/logic.c:7560:25:  [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.
    x = lev.left - 1 + (random >> 10) % (CAVE_WIDTH  + 2);
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/logic.c:7561:25:  [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.
    y = lev.top  - 1 + (random >> 20) % (CAVE_HEIGHT + 2);
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/logic.c:7567:14:  [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.
    random = random * 129 + 1;
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/logic.c:7571:26:  [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.
      random = (uint32_t)random;
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/logic.c:7575:20:  [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.
  game_em.random = random;
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1505:16:  [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.
    if ((dir = getenv("HOME")) == NULL)
data/rocksndiamonds-4.2.0.4+dfsg/src/config.c:36: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 program_version_string[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:1342:8:  [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 levelset_name[MAX_LEVEL_NAME_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:1343:8:  [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 levelset_author[MAX_LEVEL_AUTHOR_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:2388:8:  [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 options_change_page_strings[MAX_CHANGE_PAGES][10];
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:5522: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 basename[MAX_FILENAME_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:6376: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 infotext[max_infotext_len + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:6576: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 infotext[MAX_OUTPUT_LINESIZE + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:6647: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 infotext[MAX_OUTPUT_LINESIZE + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:6698: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 infotext[MAX_OUTPUT_LINESIZE + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:6789: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 infotext[MAX_OUTPUT_LINESIZE + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:7773:15:  [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).
  if ((file = fopen(filename_levelinfo, MODE_APPEND)))
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:8046:5:  [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(options_change_page_strings[i], "%d", i + 1);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:10274: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_chars_per_line + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:11679: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 infotext[MAX_OUTPUT_LINESIZE + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:12038: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 part[MAX_CB_PART_SIZE + 1] = "";
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:12039: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 text[MAX_CB_TEXT_SIZE + 1] = "";
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:12228: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 request[100];
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:12230:7:  [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(request, "Replace level with %dx%d level sketch from clipboard?",
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14022: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 level_saved_msg[64];
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14025:6:  [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(level_saved_msg,
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14029:6:  [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(level_saved_msg, "Level saved!");
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14330:51:  [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 (gi->mapped && gi->active && gi->selectbox.open)
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14348: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 infotext[MAX_OUTPUT_LINESIZE + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14349: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 shortcut[MAX_OUTPUT_LINESIZE + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14365:2:  [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(shortcut, " ('.' or '%c')", key);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14367:2:  [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(shortcut, " ('%c' or 'Ctrl')", key);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14369:2:  [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(shortcut, " ('Enter' or 'Shift-%c')", key);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14371:2:  [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(shortcut, " ('%c/Shift-U')", key);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14373:2:  [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(shortcut, " ('%c', '0', '-')", key);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14419: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 infotext[MAX_OUTPUT_LINESIZE + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14514:2:  [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(infotext, "Level position: %d, %d", lx, ly);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14539:7:  [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(infotext, "custom element content position: %d, %d", sx, sy);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14541:7:  [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(infotext, "group element position: %d", sx + 1);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14544:7:  [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(infotext, "content area %d position: %d, %d",
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14548:7:  [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(infotext, "content area %d position: %d, %d",
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14551:7:  [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(infotext, "android element position: %d", sx + 1);
data/rocksndiamonds-4.2.0.4+dfsg/src/events.c:1567: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 message[100];
data/rocksndiamonds-4.2.0.4+dfsg/src/events.c:1571: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 message_part1[50];
data/rocksndiamonds-4.2.0.4+dfsg/src/events.c:1802: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 cheat_input[2 * MAX_CHEAT_INPUT_LEN + 1] = "";
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:130:8:  [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 xx_default_description[MAX_ELEMENT_NAME_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:133:8:  [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 xx_default_string_empty[1] = "";
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:1491: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 description[MAX_ELEMENT_NAME_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:1537:18:  [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 *string = (char *)(conf[i].value);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:1586:23:  [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 *string      = (char *)(conf[i].value);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:1587:23:  [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 *string_copy = (char *)(conf[i].value_copy);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:2023: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 chunk_name[CHUNK_ID_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:2047: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 basename[MAX_FILENAME_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:2064: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 basename[MAX_FILENAME_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:2132: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 basename[MAX_FILENAME_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:3072:20:  [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 *string = (char *)(conf[i].value);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:3342: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 cookie[MAX_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:3343: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 chunk_name[CHUNK_ID_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:3643: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(level->name, "Level %d", level->file_info.nr);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5732: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 magic_bytes[num_magic_bytes + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5854: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_LINE_LEN], line_raw[MAX_LINE_LEN], previous_line[MAX_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5855: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_comment[MAX_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5856: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_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:6068:5:  [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(level->name, "--> Level %d <--", level_file_info->nr);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:7431:16:  [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).
  if (!(file = fopen(filename, MODE_WRITE)))
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:7913: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 cookie[MAX_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:7914: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 chunk_name[CHUNK_ID_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:8160:16:  [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).
  if (!(file = fopen(filename, MODE_WRITE)))
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:8309: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 cookie[MAX_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:8310: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_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:8321:16:  [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).
  if (!(file = fopen(filename, MODE_READ)))
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:8374:16:  [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).
  if (!(file = fopen(filename, MODE_WRITE)))
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9244: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 *default_grid_button[6][2] =
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9461: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 hide_setup_token[MAX_HIDE_SETUP_TOKEN_SIZE];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9540: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 token_string[MAX_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9542:7:  [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(token_string, "touch.virtual_buttons.%d.%02d", i, y);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9567: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 prefix[30];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9574: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 full_token[100];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9725: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 mapping_guid[MAX_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9751:16:  [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).
  if (!(file = fopen(filename, MODE_READ)))
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9760: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 line[MAX_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9779:16:  [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).
  if (!(file = fopen(filename, MODE_WRITE)))
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9813: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 token_string[MAX_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9814: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 value_string[MAX_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9816:7:  [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(token_string, "touch.virtual_buttons.%d.%02d", i, y);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9841: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 prefix[30];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9878:16:  [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).
  if (!(file = fopen(filename, MODE_WRITE)))
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9907:16:  [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).
  if (!(file = fopen(filename, MODE_WRITE)))
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9933:16:  [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).
  if (!(file = fopen(filename, MODE_WRITE)))
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:10006:12:  [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(value);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:11355:40:  [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).
      (*elements)[(*num_elements)++] = atoi(value);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:11713:17:  [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 delay = atoi(list->value);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:11730:21:  [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).
	add_helpanim_entry(atoi(element_value), -1, -1, delay,
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:11755:21:  [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).
	add_helpanim_entry(atoi(element_value), -1, -1, delay,
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:11769:26:  [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).
      add_helpanim_entry(atoi(element_value), atoi(action_value), -1, delay,
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:11769:47:  [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).
      add_helpanim_entry(atoi(element_value), atoi(action_value), -1, delay,
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:11781:26:  [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).
      add_helpanim_entry(atoi(element_value), -1, atoi(direction_value), delay,
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:11781:51:  [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).
      add_helpanim_entry(atoi(element_value), -1, atoi(direction_value), delay,
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:11795:21:  [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).
	add_helpanim_entry(atoi(element_value), -1, -1, delay,
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:11818:21:  [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).
	add_helpanim_entry(atoi(element_value), -1, -1, delay,
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:11833:26:  [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).
      add_helpanim_entry(atoi(element_value), atoi(action_value),
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:11833:47:  [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).
      add_helpanim_entry(atoi(element_value), atoi(action_value),
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:11834:5:  [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).
			 atoi(direction_value), delay, &num_list_entries);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:11846:26:  [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).
      add_helpanim_entry(atoi(element_value), -1, -1, delay,
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:12043: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 basename1[16];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:12044: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 basename2[16];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:12048:5:  [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(basename1, "%04d.bmp", i);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:12049:5:  [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(basename2, "%04ds.bmp", i);
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/cave.c:102:12:  [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.
  unsigned char raw_leveldata[MAX_EM_LEVEL_SIZE];
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/reademc.c:484:23:  [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 const unsigned char map_v6[256] =
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/reademc.c:509:23:  [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 const unsigned char map_v5[256] =
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/reademc.c:534:23:  [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 const unsigned char map_v4[256] =
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/reademc.c:559:23:  [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 const unsigned char map_v4_eater[28] =
data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/export.h:165: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[MM_MAX_LEVEL_NAME_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/export.h:166: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 author[MM_MAX_LEVEL_AUTHOR_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_files.c:248: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 cookie[MAX_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_files.c:249: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 chunk_name[CHUNK_ID_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_files.c:421:16:  [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).
  if (!(file = fopen(filename, MODE_WRITE)))
data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_game.c:120:14:  [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 const char mm_masks[10][16][16 + 1] =
data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_main.h:185: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_PLAYER_NAME_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/Globals.h:251: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 LevelTitle[23];
data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/export.h:72: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 LevelTitle[23];
data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/file.c:302: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 mpx_chunk_name[4 + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/game_sp/file.c:521:16:  [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).
  if (!(file = fopen(filename, MODE_WRITE)))
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:348:12:  [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(value);
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:1233:29:  [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 (value != NULL ? atoi(value) : EL_UNDEFINED);
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:1251:29:  [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 (value != NULL ? atoi(value) : fallback_graphic);
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5068:17:  [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_nr = atoi(str_ptr);		// get level_nr value
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5120:17:  [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_nr = atoi(str_ptr);		// get level_nr value
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5154:33:  [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).
      global.convert_level_nr = atoi(str_ptr);	// get level_nr value
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5240: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(id_suffix, ".%03d", id_nr);
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5247: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 *image_id_prefix[MAX_NUM_ELEMENTS +
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5250: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 *sound_id_prefix[2 * MAX_NUM_ELEMENTS +
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5252: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 *music_id_prefix[NUM_MUSIC_PREFIXES +
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5254: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 *action_id_suffix[NUM_ACTIONS + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5255: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 *direction_id_suffix[NUM_DIRECTIONS_FULL + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5256: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 *special_id_suffix[NUM_SPECIAL_GFX_ARGS + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5257: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 *level_id_suffix[MAX_LEVELS + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5258: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 *dummy[1] = { NULL };
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5436: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 font_token[128];
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5448:28:  [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).
	  font_initial[j].src_x = atoi(image_config[i].value);
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5450:28:  [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).
	  font_initial[j].src_y = atoi(image_config[i].value);
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5452:28:  [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).
	  font_initial[j].width = atoi(image_config[i].value);
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5454:29:  [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).
	  font_initial[j].height = atoi(image_config[i].value);
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5904: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 *leveldir_current_identifier[3] = { NULL, NULL, NULL };
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:127:48:  [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).
	gi->type & GD_TYPE_SELECTBOX && gi->selectbox.open &&
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:308:2:  [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 cursor_string[2];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:309:2:  [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[MAX_GADGET_TEXTSIZE + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:358:2:  [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 cursor_string[2];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:447:2:  [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[MAX_GADGET_TEXTSIZE + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:496:23:  [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 (!gi->selectbox.open)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:611:8:  [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(text, "  ");
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:625:25:  [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).
	else if (gi->selectbox.open)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:967:2:  [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(gi->textinput.value, "%d", gi->textinput.number_value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:977:4:  [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(gi->textinput.value, "%d", gi->textinput.number_value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:987:4:  [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(gi->textinput.value, "%d", gi->textinput.number_value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:1311:5:  [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(text->value, "%d", text->number_value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:1459:32:  [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).
  gi->textinput.number_value = atoi(gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:1466: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(gi->textinput.value, "%d", gi->textinput.number_value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:1703:60:  [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).
     new_gi->type & GD_TYPE_SELECTBOX && new_gi->selectbox.open &&
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:1877:60:  [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).
    else if (gi->type & GD_TYPE_SELECTBOX && gi->selectbox.open &&
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2213: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[MAX_GADGET_TEXTSIZE + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2315: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 text[MAX_GADGET_TEXTSIZE + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2362: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 text[MAX_GADGET_TEXTSIZE + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.h:164: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 value[MAX_GADGET_TEXTSIZE + 1];	// text written on the button
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.h: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 value[MAX_GADGET_TEXTSIZE + 1];	// text string in input field
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.h:171: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_value[MAX_GADGET_TEXTSIZE + 1];// last text string in input field
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.h:181: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 value[MAX_GADGET_TEXTSIZE + 1];	// text string in input field
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.h:182: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_value[MAX_GADGET_TEXTSIZE + 1];// last text string in input field
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.h:205:11:  [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).
  boolean open;				// opening state of selectbox
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.h:239: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 info_text[MAX_INFO_TEXTSIZE + 1];// short popup info text
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/joystick.c:110: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 *joystick_device_name[MAX_PLAYERS] =
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/joystick.c:124: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 name[MAX_JOYSTICK_NAME_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:54: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_new[MAX_OUTPUT_LINESIZE];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:330: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 line_char[2] = { format[0], '\0' };
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:368: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 message[MAX_LINE_LEN] = { 0 };
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:487: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 shift_array[10][40];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:498:5:  [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(s, "                    %09d", number);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:503:5:  [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(s, "%d", number);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:524: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(a, "%d", i);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:823:12:  [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 buffer[MAX_USERNAME_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1000:5:  [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[strlen(filename) - 3], "pcx");
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1002:5:  [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[strlen(filename) - 3], "png");
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1186: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 option_str[MAX_OPTION_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1344:29:  [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).
      options.server_port = atoi(*options_left);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1780:12:  [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 name_buffer[30];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1784:7:  [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(name_buffer, "%c", 'A' + (char)(key - KSYM_A));
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1786:7:  [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(name_buffer, "%c", 'a' + (char)(key - KSYM_a));
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1788:7:  [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(name_buffer, "%c", '0' + (char)(key - KSYM_0));
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1790:7:  [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(name_buffer, "F%d", (int)(key - KSYM_FKEY_FIRST + 1));
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1792:7:  [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(name_buffer, "(undefined)");
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1808:2:  [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(name_buffer, "(unknown)");
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1815:12:  [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 name_buffer[30];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1819:7:  [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(name_buffer, "XK_%c", 'A' + (char)(key - KSYM_A));
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1821:7:  [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(name_buffer, "XK_%c", 'a' + (char)(key - KSYM_a));
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1823:7:  [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(name_buffer, "XK_%c", '0' + (char)(key - KSYM_0));
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1825:7:  [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(name_buffer, "XK_F%d", (int)(key - KSYM_FKEY_FIRST + 1));
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1827:7:  [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(name_buffer, "[undefined]");
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1843:2:  [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(name_buffer, "0x%04x", (unsigned int)key);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1909:6:  [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).
	d = atoi(&name_ptr[4]);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2098:16:  [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).
      result = atoi(s);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2269:16:  [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).
  file->file = fopen(filename, mode);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2524: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 line[MAX_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:3732:32:  [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).
    if ((program.log_file[i] = fopen(program.log_filename[i], MODE_WRITE))
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:3757:20:  [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).
  FILE *log_file = fopen(program.log_filename[nr], MODE_READ);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:39:8:  [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 *levelclass_desc[NUM_LEVELCLASS_DESC] =
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:238: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_suffix[10];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:244:5:  [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(subdir_suffix, "_%d", i);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:549: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 basename[MAX_FILENAME_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:562: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 basename[MAX_FILENAME_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:575:5:  [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(basename, "%03d.sln", nr);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:588: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 basename[MAX_FILENAME_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:685: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 basename[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1663: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 cookie[MAX_COOKIE_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1742: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 entry[MAX_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1970: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 line_copy[MAX_LINE_LEN + 1], line_raw_copy[MAX_LINE_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:2103: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_LINE_LEN], line_raw[MAX_LINE_LEN], previous_line[MAX_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:2267:16:  [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).
  if (!(file = fopen(filename, MODE_WRITE)))
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:2947: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).
  return (file_status.st_mtime != atoi(timestamp_string));
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:3091: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 *top_dir_conf_filename[NUM_BASE_TREE_TYPES] = { NULL };
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:3092: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 *conf_basename[NUM_BASE_TREE_TYPES] =
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:3293:26:  [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).
      if ((marker_file = fopen(marker_filename, MODE_WRITE)))
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4125: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_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4149:19:  [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).
  if ((file     = fopen(filename,     MODE_READ)) &&
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4150:19:  [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).
      (file_tmp = fopen(filename_tmp, MODE_WRITE)))
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4196:16:  [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).
  if (!(file = fopen(filename, MODE_WRITE)))
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4271: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 value_string[MAX_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4313:7:  [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(value_string, "%d", *(int *)value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4324:7:  [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(value_string, "player_%d", *(int *)value + 1);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4333:5:  [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(value_string, "n/a");
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4342: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 token_string[MAX_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4368:7:  [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(line, "# ");
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4432:16:  [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).
  if (!(file = fopen(filename, MODE_WRITE)))
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4497: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 levelnum_str[4];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4503:24:  [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).
      levelnum_value = atoi(levelnum_str);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4560:18:  [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).
      level_nr = atoi(token_value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4574:22:  [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_nr = atoi(token_value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4599:17:  [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_nr = atoi(token);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4602: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).
	  LevelStats_setPlayed(level_nr, atoi(value));	// read 1st column
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4607: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).
	  LevelStats_setSolved(level_nr, atoi(value));	// read 2nd column
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4639:16:  [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).
  if (!(file = fopen(filename, MODE_WRITE)))
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4661: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 token[16];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4662: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 value[16];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4664:7:  [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(token, "%03d", i);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4665:7:  [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(value, "%d %d", LevelStats_getPlayed(i), LevelStats_getSolved(i));
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/snapshot.c:42: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(bi->buffer_copy, buffer, size);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/snapshot.c:52: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(bi->buffer_orig, bi->buffer_copy, bi->size);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/snapshot.c:110:42:  [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).
    next_snapshot_key = (snapshot_list ? atoi(snapshot_list->key) + 1 : 0);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/system.h:949: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 *log_filename[NUM_LOGS];		// log filenames for out/err messages
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/system.h:1174: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 grid_button[MAX_GRID_XSIZE][MAX_GRID_YSIZE];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/system.h:1210: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 grid_button[2][MAX_GRID_XSIZE][MAX_GRID_YSIZE];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:164: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_OUTPUT_LINESIZE + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:179: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_OUTPUT_LINESIZE + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:343: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 line[MAX_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:489: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[line_length + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:511: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 line[MAX_LINE_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:638: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_buffer[MAX_OUTPUT_LINESIZE];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/ioapi.c:125:16:  [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).
        file = fopen(filename, mode_fopen);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/ioapi.h:32:19:  [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).
#  define fopen64 fopen
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/ioapi.h:37:21:  [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).
#    define fopen64 fopen
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/ioapi.h:42:21:  [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).
#    define fopen64 fopen
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/iowin32.c:119:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        MultiByteToWideChar(CP_ACP, 0, (const char*)filename, -1, filenameW, FILENAME_MAX + 0x200);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/iowin32.c:148:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        MultiByteToWideChar(CP_ACP, 0, (const char*)filename, -1, filenameW, FILENAME_MAX + 0x200);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/iowin32.c:208:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        MultiByteToWideChar(CP_ACP, 0, (const char*)filename, -1, filenameW, FILENAME_MAX + 0x200);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/miniunz.c:245:18:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    pathLength = MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0) + 1;
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/miniunz.c:247:5:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    MultiByteToWideChar(CP_UTF8, 0, path, -1, pathWide, pathLength);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/miniunz.c: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 number[21] = { 0 };
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/miniunz.c:307: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 filename_inzip[256] = {0};
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/miniunz.c:384: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 filename_inzip[256] = {0};
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/miniunz.c:439:13:  [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 answer[128];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/miniunz.c:620: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 last_directory[max_directory_size];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/unzip.c:1072: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 source[12];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/unzip.c:1236:22:  [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.
            unsigned char passverify_archive[AES_PWVERIFYSIZE];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/unzip.c:1237:22:  [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.
            unsigned char passverify_password[AES_PWVERIFYSIZE];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/unzip.c:1238:22:  [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.
            unsigned char salt_value[AES_MAXSALTLENGTH];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/unzip.c:1641:18:  [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.
        unsigned char authcode[AES_AUTHCODESIZE];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/unzip.c:1642:18:  [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.
        unsigned char rauthcode[AES_AUTHCODESIZE];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/unzip.c:1710:9:  [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(pfile_info, &s->cur_file_info, sizeof(unz_file_info64));
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/unzip.c:1747:9:  [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(pfile_info, &s->cur_file_info, sizeof(unz_file_info64));
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/unzip.c:1764: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 current_filename[UNZ_MAXFILENAMEINZIP+1];
data/rocksndiamonds-4.2.0.4+dfsg/src/main.h:3026: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_PLAYER_NAME_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/main.h:3043: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[MAX_ENVELOPE_TEXT_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/main.h:3094: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_LEVEL_NAME_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/main.h:3095: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 author[MAX_LEVEL_AUTHOR_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/main.h:3344: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 description[MAX_ELEMENT_NAME_LEN + 1];	// for custom/group elements
data/rocksndiamonds-4.2.0.4+dfsg/src/netserv.c:29: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 player_name[MAX_PLAYER_NAME_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/netserv.c:329:16:  [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).
  if (!(file = fopen(filename, MODE_WRITE)))
data/rocksndiamonds-4.2.0.4+dfsg/src/network.c:30: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_PLAYER_NAME_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/network.c:52:8:  [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 stop_network_client_message[MAX_OUTPUT_LINESIZE + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/network.c:258: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 message[100];
data/rocksndiamonds-4.2.0.4+dfsg/src/network.c:262:4:  [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(message, "Network server found at %d.%d.%d.%d!",
data/rocksndiamonds-4.2.0.4+dfsg/src/network.c:291: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 message[100];
data/rocksndiamonds-4.2.0.4+dfsg/src/network.c:513: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(stop_network_client_message, "Network protocol version mismatch! Server expects version %d.%d.x instead of %d.%d.%d!",
data/rocksndiamonds-4.2.0.4+dfsg/src/network.c:600: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 request[100];
data/rocksndiamonds-4.2.0.4+dfsg/src/network.c:602:5:  [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(request, "Sorry! Player %d already exists! You are player %d!",
data/rocksndiamonds-4.2.0.4+dfsg/src/network.c:678: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 message[100];
data/rocksndiamonds-4.2.0.4+dfsg/src/network.c:680:5:  [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(message, "Player %d left network server! Network game stopped!",
data/rocksndiamonds-4.2.0.4+dfsg/src/network.c:781: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 message[100];
data/rocksndiamonds-4.2.0.4+dfsg/src/network.c:784:7:  [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(message, "Network game stopped by player %d!", client_nr);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:655:8:  [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 str_main_text_name[10];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:656:8:  [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 str_main_text_first_level[10];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:657:8:  [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 str_main_text_last_level[10];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:658:8:  [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 str_main_text_level_number[10];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:660:8:  [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 network_server_hostname[MAX_SETUP_TEXT_INPUT_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:2904: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 token[MAX_LINE_LEN];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:3963: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 last_player_name[MAX_PLAYER_NAME_LEN + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4162: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 buffer[max_buffer_len + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4309:21:  [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 new_level_nr = atoi(level_number_current->identifier);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4539:25:  [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 new_level_nr = atoi(level_number_current->identifier);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4583: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 identifier[32], name[64];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4805:8:  [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 *grid_size_text[2][2];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4834: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 identifier[32], name[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4841:7:  [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(identifier, "%d", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4879:28:  [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).
  setup.game_frame_delay = atoi(game_speed_current->identifier);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4894: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 identifier[32], name[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4901:7:  [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(identifier, "%d", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4929:30:  [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).
  setup.scroll_delay_value = atoi(scroll_delay_current->identifier);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4944: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 identifier[32], name[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5073: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 identifier[32], name[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5080:7:  [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(identifier, "%d", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5099: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 identifier[32], name[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5105:7:  [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(identifier, "%d", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5106:7:  [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(name, "%d %% (Current)", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5135:34:  [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).
  setup.window_scaling_percent = atoi(window_size_current->identifier);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5150: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 identifier[32], name[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5200: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 identifier[32], name[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5251: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 identifier[32], name[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5418: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 identifier[32], name[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5425:7:  [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(identifier, "%d", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5444: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 identifier[32], name[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5450:7:  [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(identifier, "%d", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5451:7:  [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(name, "%d %% (Current)", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5486: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 identifier[32], name[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5493:7:  [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(identifier, "%d", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5512: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 identifier[32], name[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5518:7:  [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(identifier, "%d", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5519:7:  [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(name, "%d %% (Current)", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5554: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 identifier[32], name[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5561:7:  [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(identifier, "%d", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5580: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 identifier[32], name[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5586:7:  [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(identifier, "%d", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5587:7:  [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(name, "%d %% (Current)", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5614:25:  [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).
  setup.volume_simple = atoi(volume_simple_current->identifier);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5615:25:  [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).
  setup.volume_loops  = atoi(volume_loops_current->identifier);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5616:25:  [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).
  setup.volume_music  = atoi(volume_music_current->identifier);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5704: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 identifier[32], name[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5744: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 identifier[32], name[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5751:7:  [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(identifier, "%d", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5786: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 identifier[32], name[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5793:7:  [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(identifier, "%d", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5828: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 identifier[32], name[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5835:7:  [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(identifier, "%d", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5874: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 identifier[32], name[32];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5881:4:  [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(identifier, "%d", value);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5925:31:  [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).
  setup.touch.move_distance = atoi(move_distance_current->identifier);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5926:31:  [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).
  setup.touch.drop_distance = atoi(drop_distance_current->identifier);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5927:30:  [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).
  setup.touch.transparency = atoi(transparency_current->identifier);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5931:33:  [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).
    setup.touch.grid_xsize[i] = atoi(grid_size_current[i][0]->identifier);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:5932:33:  [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).
    setup.touch.grid_ysize[i] = atoi(grid_size_current[i][1]->identifier);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:6144: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 message[100];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:7138: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 *joystick_name[MAX_PLAYERS] =
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:7550: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 mapping[4096], temp[4096];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:7567: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 mapping[4096];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:7939: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 message1[MAX_OUTPUT_LINESIZE + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:7954:5:  [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(message1, "Joystick %d", nr);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:8019: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 grid_button_old[MAX_GRID_XSIZE][MAX_GRID_YSIZE];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:8020: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 grid_button_tmp[MAX_GRID_XSIZE][MAX_GRID_YSIZE];
data/rocksndiamonds-4.2.0.4+dfsg/src/tape.c:312: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 s[MAX_DATETIME_STRING_SIZE];
data/rocksndiamonds-4.2.0.4+dfsg/src/tape.c:329: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 s[MAX_DATETIME_STRING_SIZE];
data/rocksndiamonds-4.2.0.4+dfsg/src/tape.c:471:8:  [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 tape_patch_info[MAX_OUTPUT_LINESIZE];
data/rocksndiamonds-4.2.0.4+dfsg/src/tools.c:191:5:  [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(s, "%d", element);
data/rocksndiamonds-4.2.0.4+dfsg/src/tools.c:704: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[100];
data/rocksndiamonds-4.2.0.4+dfsg/src/tools.c:711: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(text, " %04.1f fps", global.frames_per_second);
data/rocksndiamonds-4.2.0.4+dfsg/src/tools.c:736: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 diff_bar[2 * diff_2_max + 5];
data/rocksndiamonds-4.2.0.4+dfsg/src/tools.c:3310: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 label_text[MAX_OUTPUT_LINESIZE + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/tools.c:3409: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 label_text[MAX_OUTPUT_LINESIZE + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/tools.c:4645: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 text_line[max_request_line_len + 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/config.c:56:42:  [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).
    program_init_string = checked_malloc(strlen(getProgramTitleString()) + 1 +
data/rocksndiamonds-4.2.0.4+dfsg/src/config.c:57:7:  [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).
					 strlen(getProgramVersionString()) + 1);
data/rocksndiamonds-4.2.0.4+dfsg/src/config.c:109: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).
  window_title_string = checked_malloc(strlen(getProgramInitString()) + 20 +
data/rocksndiamonds-4.2.0.4+dfsg/src/config.c:110:12:  [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).
				       strlen(getSourceDateString()) + 2 + 1);
data/rocksndiamonds-4.2.0.4+dfsg/src/config.c:121: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).
  window_title_string = checked_malloc(strlen(getProgramInitString()) + 20);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:5480:9:  [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).
    if (strlen(element_info[element].description) > 0)
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:6711:6:  [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).
	if (strlen(selectbox_info[i].options[j].text) > selectbox_info[i].size)
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:6712:29:  [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).
	  selectbox_info[i].size = strlen(selectbox_info[i].options[j].text);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:6794:33:  [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).
      textbutton_info[i].size = strlen(textbutton_info[i].text);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:7816:9:  [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).
    if (strlen(mod_name) > MAX_LEVEL_AUTHOR_LEN)
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:7820:9:  [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).
    if (strlen(mod_name) > MAX_LEVEL_AUTHOR_LEN)
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:7823:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(level.author, mod_name, MAX_LEVEL_AUTHOR_LEN);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:7827:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(level.name, mod_name, MAX_LEVEL_NAME_LEN);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:9535:29:  [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 percentage_text_len = strlen(percentage_text) * font1_width;
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:9536:29:  [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 properties_text_len = strlen(properties_text) * font1_width;
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:10276:7:  [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).
  if (strlen(element_name) <= max_chars_per_line)
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:10282:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buffer, element_name, max_chars_per_line);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:10295:11:  [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).
      if (strlen(&element_name[i + 1]) <= max_chars_per_line)
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:10304:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buffer, &element_name[next_pos], max_chars_per_line);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:11681:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(infotext, getElementInfoText(new_element), max_infotext_len);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:12067: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(text, "\n");
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:12127:6:  [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).
	if (strlen(ptr) < strlen(prefix))
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:12127: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).
	if (strlen(ptr) < strlen(prefix))
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:12137:11:  [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).
	  ptr += strlen(prefix);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:12147:4:  [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).
	  strlen(ptr) >= 3 &&
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:13244:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(textarea_info[type_id].value, gi->textarea.value,
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14352: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).
  if (gi == NULL || strlen(gi->info_text) == 0)
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14355:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(infotext, gi->info_text, max_infotext_len);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14378:11:  [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).
      if (strlen(infotext) + strlen(shortcut) <= max_infotext_len)
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14378: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).
      if (strlen(infotext) + strlen(shortcut) <= max_infotext_len)
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14512:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(infotext, getElementInfoText(Tile[lx][ly]), max_infotext_len);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14534:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(infotext, getElementInfoText(element), max_infotext_len);
data/rocksndiamonds-4.2.0.4+dfsg/src/editor.c:14558:7:  [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).
  if (strlen(infotext) > 0)
data/rocksndiamonds-4.2.0.4+dfsg/src/events.c:1416:2:  [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).
	strlen(text),
data/rocksndiamonds-4.2.0.4+dfsg/src/events.c:1804:25:  [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 cheat_input_len = strlen(cheat_input);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:1502:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(description, default_description, MAX_ELEMENT_NAME_LEN);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:1539:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(string, default_string, max_num_entities);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:1589:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(string_copy, string, max_num_entities);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:1741:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(level->author, leveldir_current->author, MAX_LEVEL_AUTHOR_LEN);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:1753:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy(level->author, leveldir_current->name, MAX_LEVEL_AUTHOR_LEN);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:1758:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy(level->author, getRealName(), MAX_LEVEL_AUTHOR_LEN);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:1989:7:  [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).
  if (strlen(basename) == 10 && strPrefixLower(basename, "levels.d"))
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:3394:9:  [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).
    if (strlen(cookie) > 0 && cookie[strlen(cookie) - 1] == '\n')
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:3394:38:  [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).
    if (strlen(cookie) > 0 && cookie[strlen(cookie) - 1] == '\n')
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:3395:14:  [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).
      cookie[strlen(cookie) - 1] = '\0';
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5909:9:  [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).
    if (strlen(line) > 0 && line[strlen(line) - 1] == '\n')
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5909:34:  [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).
    if (strlen(line) > 0 && line[strlen(line) - 1] == '\n')
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5913: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).
    for (line_ptr = &line[strlen(line)]; line_ptr >= line; line_ptr--)
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5923:11:  [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).
      if (strlen(previous_line) + strlen(line_ptr) < MAX_LINE_LEN)
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5923:35:  [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).
      if (strlen(previous_line) + strlen(line_ptr) < MAX_LINE_LEN)
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5932:9:  [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).
    if (strlen(line) > 0 && line[strlen(line) - 1] == '\\')
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5932:34:  [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).
    if (strlen(line) > 0 && line[strlen(line) - 1] == '\\')
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5934:12:  [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).
      line[strlen(line) - 1] = '\0';    // cut off trailing backslash
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5963:11:  [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).
      if (strlen(level_name) > 0 && level_name[strlen(level_name) - 1] == '\'')
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5963:48:  [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).
      if (strlen(level_name) > 0 && level_name[strlen(level_name) - 1] == '\'')
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:5964:13:  [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).
	level_name[strlen(level_name) - 1] = '\0';
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:6058:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(level->name, level_name, MAX_LEVEL_NAME_LEN);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:6063:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(level->name, last_comment, MAX_LEVEL_NAME_LEN);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:6897:22:  [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 envelope_len = strlen(level->envelope_text[envelope_nr]) + 1;
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:7246:25:  [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 string_length = strlen(string);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:7957:9:  [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).
    if (strlen(cookie) > 0 && cookie[strlen(cookie) - 1] == '\n')
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:7957:38:  [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).
    if (strlen(cookie) > 0 && cookie[strlen(cookie) - 1] == '\n')
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:7958:14:  [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).
      cookie[strlen(cookie) - 1] = '\0';
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:8118:31:  [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 level_identifier_size = strlen(tape->level_identifier) + 1;
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:8169:26:  [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).
  info_chunk_size = 2 + (strlen(tape.level_identifier) + 1) + 2;
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:8327:7:  [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).
  if (strlen(cookie) > 0 && cookie[strlen(cookie) - 1] == '\n')
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:8327:36:  [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).
  if (strlen(cookie) > 0 && cookie[strlen(cookie) - 1] == '\n')
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:8328:12:  [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).
    cookie[strlen(cookie) - 1] = '\0';
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:8347:9:  [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).
    if (strlen(line) > 0 && line[strlen(line) - 1] == '\n')
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:8347:34:  [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).
    if (strlen(line) > 0 && line[strlen(line) - 1] == '\n')
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:8348:12:  [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).
      line[strlen(line) - 1] = '\0';
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:8354:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(highscore[i].Name, line_ptr, MAX_PLAYER_NAME_LEN);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9164:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(login_name_new, login_name, MAX_PLAYER_NAME_LEN);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9167:7:  [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).
  if (strlen(login_name) > MAX_PLAYER_NAME_LEN)		// name has been cut
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:9729:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(mapping_guid, mapping_line, MAX_LINE_LEN - 1);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:10107:7:  [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).
  if (strlen(s_contained) > strlen(s))
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:10107:29:  [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).
  if (strlen(s_contained) > strlen(s))
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:10110:31:  [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).
  if (strncmp(s, s_contained, strlen(s_contained)) == 0)
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:10112:24:  [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).
    char next_char = s[strlen(s_contained)];
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:10162: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).
    pattern_1_len = strlen(pattern_1[i]);
data/rocksndiamonds-4.2.0.4+dfsg/src/files.c:10197:14:  [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).
    s_ptr += strlen(pattern_2);
data/rocksndiamonds-4.2.0.4+dfsg/src/game.c:2617:9:  [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).
	size = strlen(int2str(value, size));
data/rocksndiamonds-4.2.0.4+dfsg/src/game.c:2775:11:  [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).
	  size = strlen(s);
data/rocksndiamonds-4.2.0.4+dfsg/src/game.c:4983:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(highscore[k].Name, setup.player_name, MAX_PLAYER_NAME_LEN);
data/rocksndiamonds-4.2.0.4+dfsg/src/game_em/reademc.c:571:11:  [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).
  return (strlen(basename) == 3 &&
data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_files.c:298:9:  [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).
    if (strlen(cookie) > 0 && cookie[strlen(cookie) - 1] == '\n')
data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_files.c:298:38:  [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).
    if (strlen(cookie) > 0 && cookie[strlen(cookie) - 1] == '\n')
data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_files.c:299:14:  [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).
      cookie[strlen(cookie) - 1] = '\0';
data/rocksndiamonds-4.2.0.4+dfsg/src/game_mm/mm_game.c:3996:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(highscore[k].Name, setup.player_name, MAX_PLAYER_NAME_LEN);
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:2069: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).
    int len_effect_text = strlen(sound->token);
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:2078:29:  [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_action_text = strlen(element_action_info[j].suffix);
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:2097:23:  [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_class_text = strlen(element_info[j].class_name);
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:2212:26:  [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_music_text = strlen(music->token);
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:2220:29:  [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_prefix_text = strlen(music_prefix_info[j].prefix);
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5226:45:  [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).
  char *string_in_brackets = checked_malloc(strlen(string) + 3);
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5440:24:  [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).
      len_font_token = strlen(font_token);
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5444:16:  [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).
      else if (strlen(image_config[i].token) > len_font_token &&
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5491:24:  [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_anim_token = strlen(anim_token);
data/rocksndiamonds-4.2.0.4+dfsg/src/init.c:5535:16:  [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).
      else if (strlen(image_config[i].token) > len_anim_token &&
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:276:18:  [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 text_size = strlen(gi->textbutton.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:333:2:  [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(text, " ");
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:482:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(text, gi->selectbox.options[gi->selectbox.index].text,
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:595:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(text, gi->selectbox.options[i].text, gi->selectbox.size);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:907:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(gi->info_text, text, max_textsize);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:969:34:  [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).
	gi->textinput.cursor_position = strlen(gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:999:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy(gi->textinput.value, va_arg(ap, char *), max_textsize);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:1003:36:  [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).
	  gi->textinput.cursor_position = strlen(gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:1470: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).
  else if (gi->textinput.cursor_position > strlen(gi->textinput.value))
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:1471:37:  [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).
    gi->textinput.cursor_position = strlen(gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:1851:48:  [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).
      else if (gi->textinput.cursor_position > strlen(gi->textinput.value))
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:1852:34:  [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).
	gi->textinput.cursor_position = strlen(gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2216:7:  [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).
  if (strlen(gi->textarea.value) >= MAX_GADGET_TEXTSIZE) // no space left
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2316:23:  [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 text_length = strlen(gi->textinput.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2363:23:  [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 text_length = strlen(gi->textarea.value);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/gadgets.c:2456:17:  [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).
	token = &token[strlen(prefix)];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/joystick.c:97:19:  [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).
  c = device_name[strlen(device_name) - 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/joystick.c:132:26:  [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).
  for (i = 0, j = 0; i < strlen(name_raw) && i < MAX_JOYSTICK_NAME_LEN; i++)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:331:28:  [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 line_length = 80 - strlen(log_token) - 3;
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:334:22:  [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).
      line_length -= strlen(mode) + 3;
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:378:33:  [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).
  char *message_ptr = message + strlen(message);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:379:34:  [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 size_left = MAX_LINE_LEN - strlen(message);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:390:13:  [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).
    message[strlen(message) - 1] = '\0';
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:499: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).
    return &s[strlen(s) - size];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:836:47:  [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).
    if ((pwd = getpwuid(getuid())) != NULL && strlen(pwd->pw_gecos) != 0)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:934:42:  [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).
  char *complete_string = checked_malloc(strlen(s1) + strlen(sep) +
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:934:55:  [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).
  char *complete_string = checked_malloc(strlen(s1) + strlen(sep) +
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:935:7:  [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).
					 strlen(s2) + 1);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:947:42:  [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).
  char *complete_string = checked_malloc(strlen(s1) + strlen(sep) +
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:947:55:  [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).
  char *complete_string = checked_malloc(strlen(s1) + strlen(sep) +
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:948:7:  [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).
					 strlen(s2) + strlen(sep) +
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:948: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).
					 strlen(s2) + strlen(sep) +
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:949:7:  [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).
					 strlen(s3) + 1);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1000:22:  [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).
    strcpy(&filename[strlen(filename) - 3], "pcx");
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1002:22:  [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).
    strcpy(&filename[strlen(filename) - 3], "png");
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1024: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).
  s_copy = checked_malloc(strlen(s) + 1);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1039:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(s_copy, s, s_len);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1058:33:  [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).
  char *s_copy = checked_malloc(strlen(s) + 1);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1096:23:  [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).
	  strncmp(s, prefix, strlen(prefix)) == 0);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1104:4:  [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).
	  strlen(s) < strlen(suffix)  ? FALSE :
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1104:16:  [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).
	  strlen(s) < strlen(suffix)  ? FALSE :
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1105:14:  [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).
	  strcmp(&s[strlen(s) - strlen(suffix)], suffix) == 0);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1105:26:  [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).
	  strcmp(&s[strlen(s) - strlen(suffix)], suffix) == 0);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1190:22:  [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 option_len = strlen(option);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1214:18:  [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).
    option_len = strlen(option);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1550:16:  [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).
  num_bytes += strlen(chunk_name);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1853:9:  [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).
    if (strlen(*name) == 1)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1890:39:  [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).
    if (strPrefix(name_ptr, "XK_") && strlen(name_ptr) == 4)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:1901:45:  [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).
    else if (strPrefix(name_ptr, "XK_F") && strlen(name_ptr) <= 6)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2020:7:  [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).
  if (strlen(keyname) == 1)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2386:10:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return fgetc(file->file);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2407:9:  [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).
    if (strlen(line) == 0)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2538:9:  [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).
    if (strlen(line) == 0)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2544:14:  [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).
    if (line[strlen(line) - 1] == '/')
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2548:12:  [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).
      line[strlen(line) - 1] = '\0';
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2655: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).
  basename_length = strlen(basename_lower);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2656:19:  [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).
  prefix_length = strlen(prefix);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2678: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).
  basename_length = strlen(basename_lower);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2679:19:  [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).
  suffix_length = strlen(suffix);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2752:28:  [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_token_prefix = strlen(map_token_prefix[i][0]);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2765:41:  [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).
    char *token_suffix = &token_gfx_pos[strlen(gfx_substring)];
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2839: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).
      len_suffix = strlen(suffix_list[i].token);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2841:32:  [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).
  return getStringCopyN(token, strlen(token) - len_suffix);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2900:28:  [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_config_token = strlen(config_list[i].token);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2905:24:  [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_suffix = strlen(suffix_list[j].token);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2960:19:  [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_token = strlen(token);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:2961: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_suffix = strlen(suffix);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:3206: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).
    int len_token = strlen(token);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:3214:24:  [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_suffix = strlen(suffix_list[i].token);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:3229:29:  [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_base_prefix = strlen(base_prefix);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:3269:24:  [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_ext1_suffix = strlen(ext1_suffix);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:3306:24:  [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_ext2_suffix = strlen(ext2_suffix);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:3343:24:  [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_ext3_suffix = strlen(ext3_suffix);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:3763:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    fputc(fgetc(log_file), stdout);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/misc.c:3859:53:  [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).
	  debug_print_timestamp_get_padding(padding_size - strlen(message)),
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:475: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).
    main_data_path[strlen(main_data_path) -
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:476:6:  [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).
		   strlen(MAC_APP_BINARY_SUBDIR)] = '\0';
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:480:22:  [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).
      main_data_path[strlen(main_data_path) - 1] = '\0';
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:509:26:  [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).
      command_filename_1[strlen(command_filename_1) - 4] = '\0';
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1500:7:  [1] (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 character.
      strcpy(dir, ".");
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1587:10:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
  return umask(mask);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1665:7:  [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).
  if (strlen(program.cookie_prefix) + 1 +
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1666:7:  [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).
      strlen(file_type) + strlen("_FILE_VERSION_x.x") > MAX_COOKIE_LEN)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1666: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).
      strlen(file_type) + strlen("_FILE_VERSION_x.x") > MAX_COOKIE_LEN)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1692:26:  [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).
  const int len_cookie = strlen(cookie);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1693:28:  [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).
  const int len_pattern1 = strlen(pattern1);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1694:28:  [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).
  const int len_pattern2 = strlen(pattern2);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1721:26:  [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).
  const int len_cookie = strlen(cookie);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1722:28:  [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).
  const int len_template = strlen(template);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1723: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).
  const int len_pattern = strlen(pattern);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1750:12:  [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).
  for (i = strlen(entry); i < token_value_position; i++)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1751: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(entry, " ");
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1976:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(line_copy, line, MAX_LINE_LEN);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:1995:25:  [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).
  for (line_ptr = &line[strlen(line)]; line_ptr >= line; line_ptr--)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:2075:26:  [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).
  for (line_ptr = &token[strlen(token)]; line_ptr >= token; line_ptr--)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:2145:9:  [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).
    if (strlen(line) > 0 && line[strlen(line) - 1] == '\n')
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:2145:34:  [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).
    if (strlen(line) > 0 && line[strlen(line) - 1] == '\n')
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:2149: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).
    for (line_ptr = &line[strlen(line)]; line_ptr >= line; line_ptr--)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:2159:11:  [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).
      if (strlen(previous_line) + strlen(line_ptr) < MAX_LINE_LEN)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:2159:35:  [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).
      if (strlen(previous_line) + strlen(line_ptr) < MAX_LINE_LEN)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:2168:9:  [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).
    if (strlen(line) > 0 && line[strlen(line) - 1] == '\\')
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:2168:34:  [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).
    if (strlen(line) > 0 && line[strlen(line) - 1] == '\\')
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:2170:12:  [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).
      line[strlen(line) - 1] = '\0';	// cut off trailing backslash
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:3192:16:  [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).
  top_dir_path[strlen(top_dir_path) - 1] = '\0';
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:3252:11:  [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).
  top_dir[strlen(top_dir) - 1] = '\0';
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4364: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(line, " ");
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4365:16:  [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).
      for (i = strlen(line); i < token_comment_position; i++)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4366:2:  [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(line, " ");
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4493:9:  [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).
    if (strlen(dir_entry->basename) > 4 &&
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4500:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(levelnum_str, dir_entry->basename, 3);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/setup.c:4594:11:  [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).
      if (strlen(token) == 3 &&
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:78:26:  [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).
  return (text != NULL ? strlen(text) * getFontWidth(font_nr) : 0);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:171:7:  [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).
  if (strlen(buffer) > MAX_OUTPUT_LINESIZE)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:186:7:  [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).
  if (strlen(buffer) > MAX_OUTPUT_LINESIZE)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:282:11:  [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).
      if (strlen(text) == 1)	// only one char inverted => draw cursor
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:349:38:  [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).
    buffer = checked_realloc(buffer, strlen(buffer) + strlen(line) + 1);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:349:55:  [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).
    buffer = checked_realloc(buffer, strlen(buffer) + strlen(line) + 1);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:409:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(&buffer[buffer_len], text_ptr, word_len);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:424:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(buffer, text_ptr, line_length);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:467: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 buffer_len = strlen(buffer);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:574:9:  [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).
    if (strlen(line) == 0)		// special case: force empty line
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:575:7:  [1] (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 character.
      strcpy(line, "\n");
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:590:6:  [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).
	if (strlen(line_ptr) <= line_length)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:592:17:  [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).
	  buffer_len = strlen(line_ptr);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/text.c:598:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy(buffer, line_ptr, line_length);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/ioapi.c:106:36:  [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).
    ioposix->filenameLength = (int)strlen(filename) + 1;
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/ioapi.c:108:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((char*)ioposix->filename, filename, ioposix->filenameLength);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/ioapi.c:161:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(diskFilename, (const char*)ioposix->filename, ioposix->filenameLength);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/ioapi.c:186:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(diskFilename, (const char*)ioposix->filename, ioposix->filenameLength);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/ioapi.c:205:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        return read;
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/ioapi.c:208:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return read;
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/iowin32.c:130:29:  [1] (buffer) _tcslen:
  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).
    iowin->filenameLength = _tcslen(filename) + 1;
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/iowin32.c:132:5:  [1] (buffer) _tcsncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    _tcsncpy(iowin->filename, filename, iowin->filenameLength);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/iowin32.c:158:29:  [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).
    iowin->filenameLength = strlen(filename) + 1;
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/iowin32.c:160:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(iowin->filename, filename, iowin->filenameLength);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/iowin32.c:186:33:  [1] (buffer) wcslen:
  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).
        iowin->filenameLength = wcslen(filename) + 1;
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/iowin32.c:188:9:  [1] (buffer) wcsncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        wcsncpy(iowin->filename, filename, iowin->filenameLength);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/iowin32.c:219:29:  [1] (buffer) _tcslen:
  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).
    iowin->filenameLength = _tcslen((TCHAR*)filename) + 1;
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/iowin32.c:221:5:  [1] (buffer) _tcsncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    _tcsncpy(iowin->filename, (TCHAR*)filename, iowin->filenameLength);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/iowin32.c:236:5:  [1] (buffer) _tcsncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    _tcsncpy(diskFilename, iowin->filename, iowin->filenameLength);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/iowin32.c:261:5:  [1] (buffer) wcsncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    wcsncpy(diskFilename, iowin->filename, iowin->filenameLength);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/iowin32.c:286:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(diskFilename, iowin->filename, iowin->filenameLength);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/iowin32.c:311:5:  [1] (buffer) _tcsncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    _tcsncpy(diskFilename, iowin->filename, iowin->filenameLength);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/miniunz.c:189: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 = (int)strlen(newdir);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/miniunz.c:441:17:  [1] (buffer) scanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
            if (scanf("%1s", answer) != 1)
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/unzip.c:1253: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).
                (uint32_t)strlen(password), salt_value, passverify_password, &s->pfile_in_zip_read->aes_ctx);
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/unzip.c:1423:48:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                return (read == 0) ? UNZ_EOF : read;
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/unzip.c:1490:48:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                return (read == 0) ? UNZ_EOF : read;
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/unzip.c:1537:48:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                return (read == 0) ? UNZ_EOF : read;
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/unzip.c:1540:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            return read;
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/unzip.c:1576:48:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                return (read == 0) ? UNZ_EOF : read;
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/unzip.c:1585:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        return read;
data/rocksndiamonds-4.2.0.4+dfsg/src/libgame/zip/unzip.c:1769:9:  [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).
    if (strlen(filename) >= UNZ_MAXFILENAMEINZIP)
data/rocksndiamonds-4.2.0.4+dfsg/src/main.c:7716: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).
	userdata_basename[strlen(userdata_basename) - 5] = '\0';
data/rocksndiamonds-4.2.0.4+dfsg/src/main.c:7729:7:  [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).
      strlen(setup.internal.program_title) > 0)
data/rocksndiamonds-4.2.0.4+dfsg/src/main.c:7734:7:  [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).
      strlen(setup.internal.program_version) > 0)
data/rocksndiamonds-4.2.0.4+dfsg/src/main.c:7739:7:  [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).
      strlen(setup.internal.program_icon_file) > 0)
data/rocksndiamonds-4.2.0.4+dfsg/src/netserv.c:107:10:  [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).
  return strlen(s) + 1;
data/rocksndiamonds-4.2.0.4+dfsg/src/netserv.c:307:14:  [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).
  nb->pos += strlen(s) + 1;
data/rocksndiamonds-4.2.0.4+dfsg/src/netserv.c:314:19:  [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 num_bytes = strlen(s) + 1;
data/rocksndiamonds-4.2.0.4+dfsg/src/netserv.c:619:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(player->player_name, player_name, MAX_PLAYER_NAME_LEN);
data/rocksndiamonds-4.2.0.4+dfsg/src/network.c:169:38:  [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).
      if (player->nr == player_nr && strlen(player->name) > 0)
data/rocksndiamonds-4.2.0.4+dfsg/src/network.c:229: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 data_len = strlen(data_ptr) + 1;
data/rocksndiamonds-4.2.0.4+dfsg/src/network.c:623:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(player->name, player_name, MAX_PLAYER_NAME_LEN);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:1135: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).
    int text_chars  = (text  != NULL ? strlen(text)  : 0);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:1136: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).
    int input_chars = (input != NULL ? strlen(input) : 0);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:2081:19:  [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).
	  HandleTypeName(strlen(setup.player_name), 0);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:2947:7:  [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).
  if (strlen(text) <= max_chars_per_line)	// only one line of text
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4018:19:  [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).
    pos->width = (strlen(setup.player_name) + 1) * font_width;
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4026:18:  [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).
    pos->width = strlen(setup.player_name) * font_width;
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4050: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).
    max_text_size = MAX(max_text_size, strlen(node->name));
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4167:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buffer, node->name, max_buffer_len);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:4993:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(network_server_hostname, setup.network_server_hostname,
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:6735:9:  [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).
    if (strlen(value_string) > max_value_len)
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:7108:7:  [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).
  if (strlen(device_name) > 1)
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:7110: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).
    char c1 = device_name[strlen(device_name) - 1];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:7111: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).
    char c2 = device_name[strlen(device_name) - 2];
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:7114:19:  [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).
      device_name[strlen(device_name) - 1] = '0' + (char)(device_nr % 10);
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:7117:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(device_name, getDeviceNameFromJoystickNr(device_nr),
data/rocksndiamonds-4.2.0.4+dfsg/src/screens.c:7118:6:  [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).
	    strlen(device_name));
data/rocksndiamonds-4.2.0.4+dfsg/src/tape.c:1370:5:  [1] (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 character.
    strcpy(tape_patch_info, "");
data/rocksndiamonds-4.2.0.4+dfsg/src/tools.c:186:22:  [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).
  s = checked_malloc(strlen(token_name) + 10 + 1);
data/rocksndiamonds-4.2.0.4+dfsg/src/tools.c:717:54:  [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).
  DrawTextExt(backbuffer, SX + SXSIZE - font_width * strlen(text), SY, text,
data/rocksndiamonds-4.2.0.4+dfsg/src/tools.c:2963:42:  [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).
    text_door_style = checked_malloc(2 * strlen(text) + 1);
data/rocksndiamonds-4.2.0.4+dfsg/src/tools.c:3332:7:  [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).
  if (strlen(label_text) > 0)
data/rocksndiamonds-4.2.0.4+dfsg/src/tools.c:3335:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(label_text,
data/rocksndiamonds-4.2.0.4+dfsg/src/tools.c:3346:7:  [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).
  if (strlen(label_text) > 0)
data/rocksndiamonds-4.2.0.4+dfsg/src/tools.c:3416:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(label_text, leveldir_current->name, max_len_label_text);
data/rocksndiamonds-4.2.0.4+dfsg/src/tools.c:3492:2:  [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).
	strlen(leveldir_current->imported_from) > 0)
data/rocksndiamonds-4.2.0.4+dfsg/src/tools.c:3495:2:  [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).
	strlen(leveldir_current->imported_by) > 0)
data/rocksndiamonds-4.2.0.4+dfsg/src/tools.c:4669:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(text_line, text_ptr, tl);

ANALYSIS SUMMARY:

Hits = 879
Lines analyzed = 184626 in approximately 3.62 seconds (50939 lines/second)
Physical Source Lines of Code (SLOC) = 150349
Hits@level = [0]  74 [1] 290 [2] 371 [3]  17 [4] 199 [5]   2
Hits@level+ = [0+] 953 [1+] 879 [2+] 589 [3+] 218 [4+] 201 [5+]   2
Hits/KSLOC@level+ = [0+] 6.33859 [1+] 5.8464 [2+] 3.91755 [3+] 1.44996 [4+] 1.33689 [5+] 0.0133024
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.