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

FINAL RESULTS:

data/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1546: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1565: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/mirrormagic-3.0.0+dfsg2/src/config.c:32: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/mirrormagic-3.0.0+dfsg2/src/config.c:53: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/mirrormagic-3.0.0+dfsg2/src/config.c:109: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/mirrormagic-3.0.0+dfsg2/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 [%s]",
data/mirrormagic-3.0.0+dfsg2/src/config.c:120: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/mirrormagic-3.0.0+dfsg2/src/config.c:123:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(window_title_string, "%s",
data/mirrormagic-3.0.0+dfsg2/src/config.c:133:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(window_title_string, "%s [%s]",
data/mirrormagic-3.0.0+dfsg2/src/config.c:138:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(window_title_string, "%s",
data/mirrormagic-3.0.0+dfsg2/src/editor.c:5457: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/mirrormagic-3.0.0+dfsg2/src/editor.c:5463: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/mirrormagic-3.0.0+dfsg2/src/editor.c:6341: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/mirrormagic-3.0.0+dfsg2/src/editor.c:6530: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/mirrormagic-3.0.0+dfsg2/src/editor.c:6580: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/mirrormagic-3.0.0+dfsg2/src/editor.c:6655: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/mirrormagic-3.0.0+dfsg2/src/editor.c:6724: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/mirrormagic-3.0.0+dfsg2/src/editor.c:12742: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/mirrormagic-3.0.0+dfsg2/src/editor.c:13897:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(shortcut, " ('%s%c')",
data/mirrormagic-3.0.0+dfsg2/src/editor.c:13901: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/mirrormagic-3.0.0+dfsg2/src/editor.c:14028: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/mirrormagic-3.0.0+dfsg2/src/editor.c:14030: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/mirrormagic-3.0.0+dfsg2/src/editor.c:14072: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/mirrormagic-3.0.0+dfsg2/src/files.c:1687: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/mirrormagic-3.0.0+dfsg2/src/files.c:1688: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/mirrormagic-3.0.0+dfsg2/src/files.c:1719: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/mirrormagic-3.0.0+dfsg2/src/files.c:1926: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/mirrormagic-3.0.0+dfsg2/src/files.c:1927: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/mirrormagic-3.0.0+dfsg2/src/files.c:2017:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(basename, "%s", LEVELTEMPLATE_FILENAME);
data/mirrormagic-3.0.0+dfsg2/src/files.c:2019: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/mirrormagic-3.0.0+dfsg2/src/files.c:2036: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/mirrormagic-3.0.0+dfsg2/src/files.c:2055: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/mirrormagic-3.0.0+dfsg2/src/files.c:2102:3:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
  vsprintf(basename, format, ap);
data/mirrormagic-3.0.0+dfsg2/src/files.c:3344: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/mirrormagic-3.0.0+dfsg2/src/files.c:4005: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/mirrormagic-3.0.0+dfsg2/src/files.c:4006: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/mirrormagic-3.0.0+dfsg2/src/files.c:4042: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/mirrormagic-3.0.0+dfsg2/src/files.c:4046: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/mirrormagic-3.0.0+dfsg2/src/files.c:5892: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/mirrormagic-3.0.0+dfsg2/src/files.c:5898: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/mirrormagic-3.0.0+dfsg2/src/files.c:5900: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/mirrormagic-3.0.0+dfsg2/src/files.c:5909: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/mirrormagic-3.0.0+dfsg2/src/files.c:5927: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/mirrormagic-3.0.0+dfsg2/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(level_name, &line[1]);
data/mirrormagic-3.0.0+dfsg2/src/files.c:7304: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/mirrormagic-3.0.0+dfsg2/src/files.c:7341: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/mirrormagic-3.0.0+dfsg2/src/files.c:7840: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/mirrormagic-3.0.0+dfsg2/src/files.c:8186: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/mirrormagic-3.0.0+dfsg2/src/files.c:8796: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/mirrormagic-3.0.0+dfsg2/src/files.c:8797: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/mirrormagic-3.0.0+dfsg2/src/files.c:8798: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/mirrormagic-3.0.0+dfsg2/src/files.c:8974: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/mirrormagic-3.0.0+dfsg2/src/files.c:8981: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/mirrormagic-3.0.0+dfsg2/src/files.c:8989:15:  [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.
  syi = setup.system;
data/mirrormagic-3.0.0+dfsg2/src/files.c:9239: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/mirrormagic-3.0.0+dfsg2/src/files.c:9248:15:  [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.
  syi = setup.system;
data/mirrormagic-3.0.0+dfsg2/src/game.c:4800: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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/src/game_mm/mm_game.c:4034: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/mirrormagic-3.0.0+dfsg2/src/init.c:5034: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/mirrormagic-3.0.0+dfsg2/src/init.c:5092: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/mirrormagic-3.0.0+dfsg2/src/init.c:5293: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:322: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:850: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:860: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:870: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:882: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:888: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:889: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:890: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:901: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:907: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:1588: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:2080: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:2081: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:2110: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:2154: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:2155: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:2175: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:2176: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:2183: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:2184: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:2234: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:2235: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:2243: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:2244: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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:572: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:712: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:726: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:800: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:969: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1140: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(internal_error, MAX_INTERNAL_ERROR_SIZE, format, ap);
data/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1690: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1729: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2500: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:3963: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/mirrormagic-3.0.0+dfsg2/src/libgame/sdl.c:496: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_videodriver, ARG_DEFAULT))
data/mirrormagic-3.0.0+dfsg2/src/libgame/sdl.c:497:56:  [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_putenv(getStringCat2("SDL_VIDEODRIVER=", setup.system.sdl_videodriver));
data/mirrormagic-3.0.0+dfsg2/src/libgame/sdl.c:2498: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_audiodriver, ARG_DEFAULT))
data/mirrormagic-3.0.0+dfsg2/src/libgame/sdl.c:2499:56:  [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_putenv(getStringCat2("SDL_AUDIODRIVER=", setup.system.sdl_audiodriver));
data/mirrormagic-3.0.0+dfsg2/src/libgame/sdl.c:2510: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:505: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:518: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:544: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:637:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(basename, "%s_%d.txt",
data/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1576: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1656:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(entry, "%s:", token);
data/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1661: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1887: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:2059: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:2065: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:2067: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:2076: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3831: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3835: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3839: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3844: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3848: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3853: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3857: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3861: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3872: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3897: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3917: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/mirrormagic-3.0.0+dfsg2/src/libgame/system.h:1193: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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:166:3:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
  vsprintf(buffer, format, ap);
data/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:181:3:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
  vsprintf(buffer, format, ap);
data/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:349: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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:591: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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:637: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/mirrormagic-3.0.0+dfsg2/src/network.c:223: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 *)&buffer[10], leveldir_current->identifier);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:1010: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/mirrormagic-3.0.0+dfsg2/src/screens.c:1012: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/mirrormagic-3.0.0+dfsg2/src/screens.c:1014: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/mirrormagic-3.0.0+dfsg2/src/screens.c:1016: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/mirrormagic-3.0.0+dfsg2/src/screens.c:2745: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/mirrormagic-3.0.0+dfsg2/src/screens.c:2748: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/mirrormagic-3.0.0+dfsg2/src/screens.c:2751: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/mirrormagic-3.0.0+dfsg2/src/screens.c:3611: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/mirrormagic-3.0.0+dfsg2/src/screens.c:3622: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/mirrormagic-3.0.0+dfsg2/src/screens.c:3814: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/mirrormagic-3.0.0+dfsg2/src/screens.c:3843: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/mirrormagic-3.0.0+dfsg2/src/screens.c:4588:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:4638:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:4687:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(identifier, "%s", value);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:4688:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:4785:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:4861:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(identifier, "%s", value);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:4862:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:4911:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(identifier, "%s", value);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:4912:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:5039:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:5107:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:5175:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:5278:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(identifier, "%s", value);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:5279:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:5321:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:5364:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(name, "%s", text);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:6675: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/mirrormagic-3.0.0+dfsg2/src/screens.c:6791: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/mirrormagic-3.0.0+dfsg2/src/screens.c:6793: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/mirrormagic-3.0.0+dfsg2/src/screens.c:6816: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/mirrormagic-3.0.0+dfsg2/src/screens.c:6819: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/mirrormagic-3.0.0+dfsg2/src/screens.c:6837: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/mirrormagic-3.0.0+dfsg2/src/screens.c:6839: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/mirrormagic-3.0.0+dfsg2/src/screens.c:6867: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/mirrormagic-3.0.0+dfsg2/src/tape.c:314: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/mirrormagic-3.0.0+dfsg2/src/tape.c:330: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/mirrormagic-3.0.0+dfsg2/src/tools.c:188: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/mirrormagic-3.0.0+dfsg2/src/game.c:12002: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/mirrormagic-3.0.0+dfsg2/src/game_em/synchro_2.c:14: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.
#define RANDOM (random = random << 31 | random >> 1)
data/mirrormagic-3.0.0+dfsg2/src/game_em/synchro_2.c:14:41:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
#define RANDOM (random = random << 31 | random >> 1)
data/mirrormagic-3.0.0+dfsg2/src/game_em/synchro_2.c:4871: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.
  RandomEM = random;
data/mirrormagic-3.0.0+dfsg2/src/game_em/synchro_3.c:16: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/mirrormagic-3.0.0+dfsg2/src/game_em/synchro_3.c:50:10:  [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 = (random >> 10) % (WIDTH - 2);
data/mirrormagic-3.0.0+dfsg2/src/game_em/synchro_3.c:51:10:  [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 = (random >> 20) % (HEIGHT - 2);
data/mirrormagic-3.0.0+dfsg2/src/game_em/synchro_3.c:69: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/mirrormagic-3.0.0+dfsg2/src/game_em/synchro_3.c:72: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.
  RandomEM = random;
data/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1411: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/mirrormagic-3.0.0+dfsg2/src/config.c:30: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/mirrormagic-3.0.0+dfsg2/src/editor.c:1309: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/mirrormagic-3.0.0+dfsg2/src/editor.c:1310: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/mirrormagic-3.0.0+dfsg2/src/editor.c:2346: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/mirrormagic-3.0.0+dfsg2/src/editor.c:5453: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/mirrormagic-3.0.0+dfsg2/src/editor.c:6304: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/mirrormagic-3.0.0+dfsg2/src/editor.c:6502: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/mirrormagic-3.0.0+dfsg2/src/editor.c:6573: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/mirrormagic-3.0.0+dfsg2/src/editor.c:6624: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/mirrormagic-3.0.0+dfsg2/src/editor.c:6715: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/mirrormagic-3.0.0+dfsg2/src/editor.c:7673: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/mirrormagic-3.0.0+dfsg2/src/editor.c:7946: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/mirrormagic-3.0.0+dfsg2/src/editor.c:10100: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/mirrormagic-3.0.0+dfsg2/src/editor.c:11504: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/mirrormagic-3.0.0+dfsg2/src/editor.c:13534: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/mirrormagic-3.0.0+dfsg2/src/editor.c:13537: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/mirrormagic-3.0.0+dfsg2/src/editor.c:13541: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/mirrormagic-3.0.0+dfsg2/src/editor.c:13852: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/mirrormagic-3.0.0+dfsg2/src/editor.c:13870: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/mirrormagic-3.0.0+dfsg2/src/editor.c:13871: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/mirrormagic-3.0.0+dfsg2/src/editor.c:13887: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/mirrormagic-3.0.0+dfsg2/src/editor.c:13889: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/mirrormagic-3.0.0+dfsg2/src/editor.c:13891: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/mirrormagic-3.0.0+dfsg2/src/editor.c:13893: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/mirrormagic-3.0.0+dfsg2/src/editor.c:13895: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/mirrormagic-3.0.0+dfsg2/src/editor.c:13941: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/mirrormagic-3.0.0+dfsg2/src/editor.c:14036: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/mirrormagic-3.0.0+dfsg2/src/editor.c:14058: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/mirrormagic-3.0.0+dfsg2/src/editor.c:14060: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/mirrormagic-3.0.0+dfsg2/src/editor.c:14063: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/mirrormagic-3.0.0+dfsg2/src/editor.c:14067: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/mirrormagic-3.0.0+dfsg2/src/editor.c:14070: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/mirrormagic-3.0.0+dfsg2/src/events.c:1609: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/mirrormagic-3.0.0+dfsg2/src/files.c:129: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/mirrormagic-3.0.0+dfsg2/src/files.c:132: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/mirrormagic-3.0.0+dfsg2/src/files.c:1461: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/mirrormagic-3.0.0+dfsg2/src/files.c:1507: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/mirrormagic-3.0.0+dfsg2/src/files.c:1556: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/mirrormagic-3.0.0+dfsg2/src/files.c:1557: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/mirrormagic-3.0.0+dfsg2/src/files.c:1936: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 *filename[2] = { NULL, NULL };
data/mirrormagic-3.0.0+dfsg2/src/files.c:1990: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/mirrormagic-3.0.0+dfsg2/src/files.c:2014: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/mirrormagic-3.0.0+dfsg2/src/files.c:2031: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/mirrormagic-3.0.0+dfsg2/src/files.c:2098: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/mirrormagic-3.0.0+dfsg2/src/files.c:3025: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/mirrormagic-3.0.0+dfsg2/src/files.c:3295: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/mirrormagic-3.0.0+dfsg2/src/files.c:3296: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/mirrormagic-3.0.0+dfsg2/src/files.c:3615: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/mirrormagic-3.0.0+dfsg2/src/files.c:5703: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/mirrormagic-3.0.0+dfsg2/src/files.c:5828: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/mirrormagic-3.0.0+dfsg2/src/files.c:5829: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/mirrormagic-3.0.0+dfsg2/src/files.c:5830: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/mirrormagic-3.0.0+dfsg2/src/files.c:6042: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/mirrormagic-3.0.0+dfsg2/src/files.c:7356: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/mirrormagic-3.0.0+dfsg2/src/files.c:7799: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/mirrormagic-3.0.0+dfsg2/src/files.c:7800: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/mirrormagic-3.0.0+dfsg2/src/files.c:8043: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/mirrormagic-3.0.0+dfsg2/src/files.c:8178: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/mirrormagic-3.0.0+dfsg2/src/files.c:8179: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/mirrormagic-3.0.0+dfsg2/src/files.c:8190: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/mirrormagic-3.0.0+dfsg2/src/files.c:8239: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/mirrormagic-3.0.0+dfsg2/src/files.c:8891: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/mirrormagic-3.0.0+dfsg2/src/files.c:8972: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/mirrormagic-3.0.0+dfsg2/src/files.c:8979: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/mirrormagic-3.0.0+dfsg2/src/files.c:9146: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/mirrormagic-3.0.0+dfsg2/src/files.c:9172: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/mirrormagic-3.0.0+dfsg2/src/files.c:9181: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/mirrormagic-3.0.0+dfsg2/src/files.c:9200: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/mirrormagic-3.0.0+dfsg2/src/files.c:9237: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/mirrormagic-3.0.0+dfsg2/src/files.c:9281: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/mirrormagic-3.0.0+dfsg2/src/files.c:9309: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/mirrormagic-3.0.0+dfsg2/src/files.c:9334: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/mirrormagic-3.0.0+dfsg2/src/files.c:9407: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/mirrormagic-3.0.0+dfsg2/src/files.c:10080: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/mirrormagic-3.0.0+dfsg2/src/files.c:10437: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/mirrormagic-3.0.0+dfsg2/src/files.c:10454: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/mirrormagic-3.0.0+dfsg2/src/files.c:10479: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/mirrormagic-3.0.0+dfsg2/src/files.c:10493: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/mirrormagic-3.0.0+dfsg2/src/files.c:10493: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/mirrormagic-3.0.0+dfsg2/src/files.c:10505: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/mirrormagic-3.0.0+dfsg2/src/files.c:10505: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/mirrormagic-3.0.0+dfsg2/src/files.c:10519: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/mirrormagic-3.0.0+dfsg2/src/files.c:10542: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/mirrormagic-3.0.0+dfsg2/src/files.c:10557: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/mirrormagic-3.0.0+dfsg2/src/files.c:10557: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/mirrormagic-3.0.0+dfsg2/src/files.c:10558: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/mirrormagic-3.0.0+dfsg2/src/files.c:10570: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/mirrormagic-3.0.0+dfsg2/src/files.c:10772: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/mirrormagic-3.0.0+dfsg2/src/files.c:10773: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/mirrormagic-3.0.0+dfsg2/src/files.c:10777: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, "%03d.bmp", i);
data/mirrormagic-3.0.0+dfsg2/src/files.c:10778: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, "%03ds.bmp", i);
data/mirrormagic-3.0.0+dfsg2/src/game_em/cave.c:68: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/mirrormagic-3.0.0+dfsg2/src/game_em/convert.c:16:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 unsigned char remap_v6[256] =
data/mirrormagic-3.0.0+dfsg2/src/game_em/convert.c:45:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 unsigned char remap_v5[256] =
data/mirrormagic-3.0.0+dfsg2/src/game_em/convert.c:70:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 unsigned char remap_v4[256] =
data/mirrormagic-3.0.0+dfsg2/src/game_em/convert.c:95:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 unsigned char remap_v4eater[28] =
data/mirrormagic-3.0.0+dfsg2/src/game_em/global.h:20:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern unsigned char linear_to_ulaw[65536];
data/mirrormagic-3.0.0+dfsg2/src/game_em/init.c:16:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 play[SAMPLE_MAX];
data/mirrormagic-3.0.0+dfsg2/src/game_em/main_em.h:110:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern unsigned char tab_blank[TILE_MAX];
data/mirrormagic-3.0.0+dfsg2/src/game_em/main_em.h:111:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern unsigned char tab_acid[TILE_MAX];
data/mirrormagic-3.0.0+dfsg2/src/game_em/main_em.h:112:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern unsigned char tab_amoeba[TILE_MAX];
data/mirrormagic-3.0.0+dfsg2/src/game_em/main_em.h:113:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern unsigned char tab_android_move[TILE_MAX];
data/mirrormagic-3.0.0+dfsg2/src/game_em/sample.h:10: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.
extern char play[SAMPLE_MAX];
data/mirrormagic-3.0.0+dfsg2/src/game_em/tab_generate.c:4409: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.
unsigned char tab_blank[TILE_MAX];
data/mirrormagic-3.0.0+dfsg2/src/game_em/tab_generate.c:4412: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.
unsigned char tab_acid[TILE_MAX];
data/mirrormagic-3.0.0+dfsg2/src/game_em/tab_generate.c:4415: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.
unsigned char tab_amoeba[TILE_MAX];
data/mirrormagic-3.0.0+dfsg2/src/game_em/tab_generate.c:4418: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.
unsigned char tab_android_move[TILE_MAX];
data/mirrormagic-3.0.0+dfsg2/src/game_em/tile.h:443:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern unsigned char tab_blank[TILE_MAX];
data/mirrormagic-3.0.0+dfsg2/src/game_em/tile.h:444:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern unsigned char tab_acid[TILE_MAX];
data/mirrormagic-3.0.0+dfsg2/src/game_em/tile.h:445:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern unsigned char tab_amoeba[TILE_MAX];
data/mirrormagic-3.0.0+dfsg2/src/game_em/tile.h:446:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern unsigned char tab_android_move[TILE_MAX];
data/mirrormagic-3.0.0+dfsg2/src/game_mm/export.h:169: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/mirrormagic-3.0.0+dfsg2/src/game_mm/export.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 author[MM_MAX_LEVEL_AUTHOR_LEN + 1];
data/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/src/game_sp/file.c:304: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/mirrormagic-3.0.0+dfsg2/src/game_sp/file.c:527: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/mirrormagic-3.0.0+dfsg2/src/init.c:330: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/mirrormagic-3.0.0+dfsg2/src/init.c:1218: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/mirrormagic-3.0.0+dfsg2/src/init.c:1236: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/mirrormagic-3.0.0+dfsg2/src/init.c:4998: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/mirrormagic-3.0.0+dfsg2/src/init.c:5025: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/mirrormagic-3.0.0+dfsg2/src/init.c:5104: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/mirrormagic-3.0.0+dfsg2/src/init.c:5111: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/mirrormagic-3.0.0+dfsg2/src/init.c:5114: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/mirrormagic-3.0.0+dfsg2/src/init.c:5116: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/mirrormagic-3.0.0+dfsg2/src/init.c:5118: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/mirrormagic-3.0.0+dfsg2/src/init.c:5119: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/mirrormagic-3.0.0+dfsg2/src/init.c:5120: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/mirrormagic-3.0.0+dfsg2/src/init.c:5121: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/mirrormagic-3.0.0+dfsg2/src/init.c:5122: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/mirrormagic-3.0.0+dfsg2/src/init.c:5290: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/mirrormagic-3.0.0+dfsg2/src/init.c:5302: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/mirrormagic-3.0.0+dfsg2/src/init.c:5304: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/mirrormagic-3.0.0+dfsg2/src/init.c:5306: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/mirrormagic-3.0.0+dfsg2/src/init.c:5308: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/mirrormagic-3.0.0+dfsg2/src/init.c:5730: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:126: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:298: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:299: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:348: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:437: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:486: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:601: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:615: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:849: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:859: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:869: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:1193: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:1338: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:1345: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:1571: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:1736: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:2074: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:2144: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:2191: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.h:161: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.h:167: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.h:168: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.h:178: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.h: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 last_value[MAX_GADGET_TEXTSIZE + 1];/* last text string in input field */
data/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.h:202: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.h:235: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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:267: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:278: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:283: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:304: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:598: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:775: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:777: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:960: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1114: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1133: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 internal_error[MAX_INTERNAL_ERROR_SIZE];
data/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1665: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1669: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1671: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1673: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1676: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, "keypad %c", '0' + (char)(key - KSYM_KP_0));
data/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1679: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1681: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1697: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1704: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1708: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1710: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1712: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1715: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_KP_%c", '0' + (char)(key - KSYM_KP_0));
data/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1718: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1720: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1736: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1811: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2000: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2144: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2399: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:3821: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:3846: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/mirrormagic-3.0.0+dfsg2/src/libgame/sdl.c:2577: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 buffer[buffer_len + 1];
data/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:37: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:209: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:215: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:501:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char basename[MAX_FILENAME_LEN];
data/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:514: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:527: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:540: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:635: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1570: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1649: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1877: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:2010: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:2172: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:2819: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3678: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3702: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3703: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3749: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3823: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3865: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3881: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3890: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3916: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3980: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:4072: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:4086: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:4111: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:4114: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:4119: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:4151: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:4171: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:4172: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:4174: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:4175: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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/src/libgame/system.h:779: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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:162: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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:177:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[MAX_OUTPUT_LINESIZE + 1];
data/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:341: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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:487: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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:509: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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:636: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/mirrormagic-3.0.0+dfsg2/src/main.h:2935: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/mirrormagic-3.0.0+dfsg2/src/main.h:2952: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/mirrormagic-3.0.0+dfsg2/src/main.h:3008: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/mirrormagic-3.0.0+dfsg2/src/main.h:3009: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/mirrormagic-3.0.0+dfsg2/src/main.h:3238: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/mirrormagic-3.0.0+dfsg2/src/netserv.c:33: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[16];
data/mirrormagic-3.0.0+dfsg2/src/netserv.c:38: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 readbuffer[MAX_BUFFER_SIZE];
data/mirrormagic-3.0.0+dfsg2/src/netserv.c:39: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 writbuffer[MAX_BUFFER_SIZE];
data/mirrormagic-3.0.0+dfsg2/src/netserv.c:53:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 unsigned char realbuffer[512], *buffer = realbuffer + 4;
data/mirrormagic-3.0.0+dfsg2/src/netserv.c:66: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(player->writbuffer + player->nwrite, b, len);
data/mirrormagic-3.0.0+dfsg2/src/netserv.c:286: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(player->player_name, &buffer[2], len-2);
data/mirrormagic-3.0.0+dfsg2/src/netserv.c:322:2:  [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(&buffer[2], v->player_name, 14);
data/mirrormagic-3.0.0+dfsg2/src/netserv.c:555:4:  [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(buffer, &player->readbuffer[4], len);
data/mirrormagic-3.0.0+dfsg2/src/network.c:34: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/mirrormagic-3.0.0+dfsg2/src/network.c:68: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(writbuffer + nwrite, realbuffer, 4 + size);
data/mirrormagic-3.0.0+dfsg2/src/network.c:182: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(&buffer[2], player_name, len_player_name);
data/mirrormagic-3.0.0+dfsg2/src/network.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 request[100];
data/mirrormagic-3.0.0+dfsg2/src/network.c:332: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/mirrormagic-3.0.0+dfsg2/src/network.c:515:5:  [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(buffer, &readbuffer[4], message_length);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:566: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/mirrormagic-3.0.0+dfsg2/src/screens.c:567: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/mirrormagic-3.0.0+dfsg2/src/screens.c:568: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/mirrormagic-3.0.0+dfsg2/src/screens.c:569: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/mirrormagic-3.0.0+dfsg2/src/screens.c:2743: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/mirrormagic-3.0.0+dfsg2/src/screens.c:3487: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 driver_name[driver_name_len];
data/mirrormagic-3.0.0+dfsg2/src/screens.c:3797: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/mirrormagic-3.0.0+dfsg2/src/screens.c:3947: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/mirrormagic-3.0.0+dfsg2/src/screens.c:4087: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/mirrormagic-3.0.0+dfsg2/src/screens.c:4305: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/mirrormagic-3.0.0+dfsg2/src/screens.c:4349: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[32];
data/mirrormagic-3.0.0+dfsg2/src/screens.c:4580: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/mirrormagic-3.0.0+dfsg2/src/screens.c:4587: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/mirrormagic-3.0.0+dfsg2/src/screens.c:4615: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/mirrormagic-3.0.0+dfsg2/src/screens.c:4630: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/mirrormagic-3.0.0+dfsg2/src/screens.c:4637: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/mirrormagic-3.0.0+dfsg2/src/screens.c:4665: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/mirrormagic-3.0.0+dfsg2/src/screens.c:4680: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/mirrormagic-3.0.0+dfsg2/src/screens.c:4777: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/mirrormagic-3.0.0+dfsg2/src/screens.c:4784: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/mirrormagic-3.0.0+dfsg2/src/screens.c:4803: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/mirrormagic-3.0.0+dfsg2/src/screens.c:4809: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/mirrormagic-3.0.0+dfsg2/src/screens.c:4810: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/mirrormagic-3.0.0+dfsg2/src/screens.c:4839: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/mirrormagic-3.0.0+dfsg2/src/screens.c:4854: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/mirrormagic-3.0.0+dfsg2/src/screens.c:4904: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5031: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5038: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5057: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5063: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5064: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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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(identifier, "%d", value);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:5125: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5131: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5132: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5167: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5174: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5193: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5199: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5200: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5227: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5228: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5229: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5271: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5313: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5320: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5356: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5363: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5393: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5394: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/mirrormagic-3.0.0+dfsg2/src/screens.c:6251: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/mirrormagic-3.0.0+dfsg2/src/screens.c:6593: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/mirrormagic-3.0.0+dfsg2/src/screens.c:6610: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/mirrormagic-3.0.0+dfsg2/src/tape.c:307: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/mirrormagic-3.0.0+dfsg2/src/tape.c:324: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/mirrormagic-3.0.0+dfsg2/src/tools.c:190: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/mirrormagic-3.0.0+dfsg2/src/tools.c:716: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/mirrormagic-3.0.0+dfsg2/src/tools.c:723: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/mirrormagic-3.0.0+dfsg2/src/tools.c:748: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/mirrormagic-3.0.0+dfsg2/src/tools.c:3289: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/mirrormagic-3.0.0+dfsg2/src/tools.c:3388: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/mirrormagic-3.0.0+dfsg2/src/tools.c:4343: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/mirrormagic-3.0.0+dfsg2/src/config.c:50: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/mirrormagic-3.0.0+dfsg2/src/config.c:51: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/mirrormagic-3.0.0+dfsg2/src/config.c:105: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/mirrormagic-3.0.0+dfsg2/src/config.c:106: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/mirrormagic-3.0.0+dfsg2/src/config.c:117: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/mirrormagic-3.0.0+dfsg2/src/config.c:130: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()) + 1 +
data/mirrormagic-3.0.0+dfsg2/src/config.c:131: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/mirrormagic-3.0.0+dfsg2/src/config.c:136: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()) + 1);
data/mirrormagic-3.0.0+dfsg2/src/editor.c:5411: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/mirrormagic-3.0.0+dfsg2/src/editor.c:6637: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/mirrormagic-3.0.0+dfsg2/src/editor.c:6638: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/mirrormagic-3.0.0+dfsg2/src/editor.c:6720: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/mirrormagic-3.0.0+dfsg2/src/editor.c:7716: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/mirrormagic-3.0.0+dfsg2/src/editor.c:7720: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/mirrormagic-3.0.0+dfsg2/src/editor.c:7723: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/mirrormagic-3.0.0+dfsg2/src/editor.c:7727: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/mirrormagic-3.0.0+dfsg2/src/editor.c:9415: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/mirrormagic-3.0.0+dfsg2/src/editor.c:9416: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/mirrormagic-3.0.0+dfsg2/src/editor.c:10102: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/mirrormagic-3.0.0+dfsg2/src/editor.c:10108: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/mirrormagic-3.0.0+dfsg2/src/editor.c:10121: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/mirrormagic-3.0.0+dfsg2/src/editor.c:10130: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/mirrormagic-3.0.0+dfsg2/src/editor.c:11506: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/mirrormagic-3.0.0+dfsg2/src/editor.c:12763: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/mirrormagic-3.0.0+dfsg2/src/editor.c:13874: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/mirrormagic-3.0.0+dfsg2/src/editor.c:13877: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/mirrormagic-3.0.0+dfsg2/src/editor.c:13900: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/mirrormagic-3.0.0+dfsg2/src/editor.c:13900: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/mirrormagic-3.0.0+dfsg2/src/editor.c:14034:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(infotext, getElementInfoText(Feld[lx][ly]), max_infotext_len);
data/mirrormagic-3.0.0+dfsg2/src/editor.c:14053: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/mirrormagic-3.0.0+dfsg2/src/editor.c:14077: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/mirrormagic-3.0.0+dfsg2/src/events.c:1361: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/mirrormagic-3.0.0+dfsg2/src/events.c:1596: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 string_len = strlen(string);
data/mirrormagic-3.0.0+dfsg2/src/events.c:1597: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 suffix_len = strlen(suffix);
data/mirrormagic-3.0.0+dfsg2/src/events.c:1611: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/mirrormagic-3.0.0+dfsg2/src/files.c:1472: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/mirrormagic-3.0.0+dfsg2/src/files.c:1509: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/mirrormagic-3.0.0+dfsg2/src/files.c:1559: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/mirrormagic-3.0.0+dfsg2/src/files.c:1711: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/mirrormagic-3.0.0+dfsg2/src/files.c:1723: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/mirrormagic-3.0.0+dfsg2/src/files.c:1728: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/mirrormagic-3.0.0+dfsg2/src/files.c:1956: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/mirrormagic-3.0.0+dfsg2/src/files.c:3347: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/mirrormagic-3.0.0+dfsg2/src/files.c:3347: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/mirrormagic-3.0.0+dfsg2/src/files.c:3348: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/mirrormagic-3.0.0+dfsg2/src/files.c:5883: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/mirrormagic-3.0.0+dfsg2/src/files.c:5883: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/mirrormagic-3.0.0+dfsg2/src/files.c:5887: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/mirrormagic-3.0.0+dfsg2/src/files.c:5897: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/mirrormagic-3.0.0+dfsg2/src/files.c:5897: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/mirrormagic-3.0.0+dfsg2/src/files.c:5906: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/mirrormagic-3.0.0+dfsg2/src/files.c:5906: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/mirrormagic-3.0.0+dfsg2/src/files.c:5908: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/mirrormagic-3.0.0+dfsg2/src/files.c:5937: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/mirrormagic-3.0.0+dfsg2/src/files.c:5937: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/mirrormagic-3.0.0+dfsg2/src/files.c:5938: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/mirrormagic-3.0.0+dfsg2/src/files.c:6032: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/mirrormagic-3.0.0+dfsg2/src/files.c:6037: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/mirrormagic-3.0.0+dfsg2/src/files.c:6822: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/mirrormagic-3.0.0+dfsg2/src/files.c:7171: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/mirrormagic-3.0.0+dfsg2/src/files.c:7843: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/mirrormagic-3.0.0+dfsg2/src/files.c:7843: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/mirrormagic-3.0.0+dfsg2/src/files.c:7844: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/mirrormagic-3.0.0+dfsg2/src/files.c:7997: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/mirrormagic-3.0.0+dfsg2/src/files.c:8059: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/mirrormagic-3.0.0+dfsg2/src/files.c:8196: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/mirrormagic-3.0.0+dfsg2/src/files.c:8196: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/mirrormagic-3.0.0+dfsg2/src/files.c:8197: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/mirrormagic-3.0.0+dfsg2/src/files.c:8213: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/mirrormagic-3.0.0+dfsg2/src/files.c:8213: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/mirrormagic-3.0.0+dfsg2/src/files.c:8214: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/mirrormagic-3.0.0+dfsg2/src/files.c:8220: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/mirrormagic-3.0.0+dfsg2/src/files.c:8659: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/mirrormagic-3.0.0+dfsg2/src/files.c:8662: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/mirrormagic-3.0.0+dfsg2/src/files.c:9150: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/mirrormagic-3.0.0+dfsg2/src/game.c:2583: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/mirrormagic-3.0.0+dfsg2/src/game.c:2738: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/mirrormagic-3.0.0+dfsg2/src/game.c:4807: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/mirrormagic-3.0.0+dfsg2/src/game_em/convert.c:108: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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/src/game_mm/mm_game.c:4042: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/mirrormagic-3.0.0+dfsg2/src/init.c:2030: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/mirrormagic-3.0.0+dfsg2/src/init.c:2039: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/mirrormagic-3.0.0+dfsg2/src/init.c:2058: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/mirrormagic-3.0.0+dfsg2/src/init.c:2173: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/mirrormagic-3.0.0+dfsg2/src/init.c:2181: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/mirrormagic-3.0.0+dfsg2/src/init.c:5090: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/mirrormagic-3.0.0+dfsg2/src/init.c:5294: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/mirrormagic-3.0.0+dfsg2/src/init.c:5298: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/mirrormagic-3.0.0+dfsg2/src/init.c:5350: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/mirrormagic-3.0.0+dfsg2/src/init.c:5394: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:266: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:323: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:472: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:585: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:799: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:851: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:881: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:885: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:1349: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:1350: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:1710: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:1711: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:2077: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:2145: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/mirrormagic-3.0.0+dfsg2/src/libgame/gadgets.c:2192: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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:279: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:611: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:709: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:709: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:710: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:722: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:722: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:723: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:723: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:724: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:775: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:777: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:799: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:814: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:833: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:871: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:879: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:879: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:880: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).
	  strncmp(&s[strlen(s) - strlen(suffix)], suffix, strlen(suffix)) == 0);
data/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:880: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).
	  strncmp(&s[strlen(s) - strlen(suffix)], suffix, strlen(suffix)) == 0);
data/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:880:52:  [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[strlen(s) - strlen(suffix)], suffix, strlen(suffix)) == 0);
data/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:964: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:988: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1429: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1746: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1783: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1795: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).
    else if (strPrefix(name_ptr, "XK_KP_") && strlen(name_ptr) == 7)
data/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1803: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:1922: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2261:10:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return fgetc(file->file);
data/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2282: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2413: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2419: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2423: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2529: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2530: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2551: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2552: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2614: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2627: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2700: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2702: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2715: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2715: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2718: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2720: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2754: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_ptr = matching_char + strlen(pattern_1);
data/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2779: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2990: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:2995: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:3049: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:3050: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:3295: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:3303: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:3318: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:3358: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:3395: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:3432: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:3852: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/mirrormagic-3.0.0+dfsg2/src/libgame/misc.c:3948: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).
	   debug_print_timestamp_get_padding(padding_size - strlen(message)),
data/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:446: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:447: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:451: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:473: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).
    command_filename_1[strlen(command_filename_1) - 4] = '\0';
data/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1406: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1493:10:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
  return umask(mask);
data/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1572: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1573: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1573: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1599: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1600: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1601: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1628: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1629: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1630: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1657: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1658: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1883: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1902: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:1982: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:2050: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:2050: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:2054: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:2064: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:2064: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:2073: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:2073: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:2075: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3912: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3913: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:3914: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/mirrormagic-3.0.0+dfsg2/src/libgame/setup.c:4106: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/mirrormagic-3.0.0+dfsg2/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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:169: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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:184: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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:280: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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:347: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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:347: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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:407: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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:422: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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:465: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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:572: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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:573: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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:588: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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:590: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/mirrormagic-3.0.0+dfsg2/src/libgame/text.c:596: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/mirrormagic-3.0.0+dfsg2/src/main.c:7697: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/mirrormagic-3.0.0+dfsg2/src/main.c:7708: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/mirrormagic-3.0.0+dfsg2/src/main.c:7713: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/mirrormagic-3.0.0+dfsg2/src/main.c:7718: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/mirrormagic-3.0.0+dfsg2/src/netserv.c:323: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).
	sendtoone(player, 2+strlen(v->player_name));
data/mirrormagic-3.0.0+dfsg2/src/netserv.c:359: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).
  broadcast(NULL, 10 + strlen((char *)&buffer[10])+1, 0);
data/mirrormagic-3.0.0+dfsg2/src/network.c:101: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/mirrormagic-3.0.0+dfsg2/src/network.c:179: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 len_player_name = strlen(player_name);
data/mirrormagic-3.0.0+dfsg2/src/network.c:225: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).
  SendBufferToServer(10 + strlen(leveldir_current->identifier) + 1);
data/mirrormagic-3.0.0+dfsg2/src/network.c:352:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(player->name, (char *)&buffer[2], MAX_PLAYER_NAME_LEN);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:1046: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/mirrormagic-3.0.0+dfsg2/src/screens.c:1047: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/mirrormagic-3.0.0+dfsg2/src/screens.c:1960: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).
	HandleTypeName(strlen(setup.player_name), 0);
data/mirrormagic-3.0.0+dfsg2/src/screens.c:2786: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/mirrormagic-3.0.0+dfsg2/src/screens.c:3852: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/mirrormagic-3.0.0+dfsg2/src/screens.c:3860: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/mirrormagic-3.0.0+dfsg2/src/screens.c:3952: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/mirrormagic-3.0.0+dfsg2/src/screens.c:5902: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/mirrormagic-3.0.0+dfsg2/src/screens.c:6221: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/mirrormagic-3.0.0+dfsg2/src/screens.c:6223: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/mirrormagic-3.0.0+dfsg2/src/screens.c:6224: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/mirrormagic-3.0.0+dfsg2/src/screens.c:6227: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/mirrormagic-3.0.0+dfsg2/src/screens.c:6230: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/mirrormagic-3.0.0+dfsg2/src/screens.c:6231: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/mirrormagic-3.0.0+dfsg2/src/tools.c:185: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/mirrormagic-3.0.0+dfsg2/src/tools.c:729: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/mirrormagic-3.0.0+dfsg2/src/tools.c:2947: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/mirrormagic-3.0.0+dfsg2/src/tools.c:3311: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/mirrormagic-3.0.0+dfsg2/src/tools.c:3314: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/mirrormagic-3.0.0+dfsg2/src/tools.c:3325: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/mirrormagic-3.0.0+dfsg2/src/tools.c:3395: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/mirrormagic-3.0.0+dfsg2/src/tools.c:3471: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/mirrormagic-3.0.0+dfsg2/src/tools.c:3474: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/mirrormagic-3.0.0+dfsg2/src/tools.c:4367: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 = 769
Lines analyzed = 174258 in approximately 3.53 seconds (49312 lines/second)
Physical Source Lines of Code (SLOC) = 143653
Hits@level = [0] 315 [1] 250 [2] 330 [3]  10 [4] 177 [5]   2
Hits@level+ = [0+] 1084 [1+] 769 [2+] 519 [3+] 189 [4+] 179 [5+]   2
Hits/KSLOC@level+ = [0+] 7.54596 [1+] 5.35318 [2+] 3.61287 [3+] 1.31567 [4+] 1.24606 [5+] 0.0139224
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.