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/grafx2-2.7/src/text.c
Examining data/grafx2-2.7/src/init.h
Examining data/grafx2-2.7/src/realpath.c
Examining data/grafx2-2.7/src/mountlist.h
Examining data/grafx2-2.7/src/main.c
Examining data/grafx2-2.7/src/pversion.c
Examining data/grafx2-2.7/src/hotkeys.c
Examining data/grafx2-2.7/src/operatio.c
Examining data/grafx2-2.7/src/pxsimple.c
Examining data/grafx2-2.7/src/palette.c
Examining data/grafx2-2.7/src/filesel.h
Examining data/grafx2-2.7/src/keycodes.h
Examining data/grafx2-2.7/src/readini.h
Examining data/grafx2-2.7/src/gfx2mem.h
Examining data/grafx2-2.7/src/keyboard.c
Examining data/grafx2-2.7/src/op_c.h
Examining data/grafx2-2.7/src/stformats.c
Examining data/grafx2-2.7/src/gfx2mem.c
Examining data/grafx2-2.7/src/misc.c
Examining data/grafx2-2.7/src/loadsavefuncs.c
Examining data/grafx2-2.7/src/fileformats.h
Examining data/grafx2-2.7/src/buttons.c
Examining data/grafx2-2.7/src/win32screen.h
Examining data/grafx2-2.7/src/pngformat.c
Examining data/grafx2-2.7/src/factory.c
Examining data/grafx2-2.7/src/colorred.c
Examining data/grafx2-2.7/src/transform.h
Examining data/grafx2-2.7/src/input.h
Examining data/grafx2-2.7/src/readline.c
Examining data/grafx2-2.7/src/helpfile.h
Examining data/grafx2-2.7/src/recoil.h
Examining data/grafx2-2.7/src/colorred.h
Examining data/grafx2-2.7/src/version.c
Examining data/grafx2-2.7/src/shade.h
Examining data/grafx2-2.7/src/io.c
Examining data/grafx2-2.7/src/saveini.h
Examining data/grafx2-2.7/src/op_c.c
Examining data/grafx2-2.7/src/unicode.h
Examining data/grafx2-2.7/src/generatedoc.c
Examining data/grafx2-2.7/src/gfx2surface.c
Examining data/grafx2-2.7/src/pxtall2.c
Examining data/grafx2-2.7/src/win32screen.c
Examining data/grafx2-2.7/src/setup.c
Examining data/grafx2-2.7/src/palette.h
Examining data/grafx2-2.7/src/SDLMain.h
Examining data/grafx2-2.7/src/input.c
Examining data/grafx2-2.7/src/tiles.h
Examining data/grafx2-2.7/src/engine.h
Examining data/grafx2-2.7/src/transform.c
Examining data/grafx2-2.7/src/unicode.c
Examining data/grafx2-2.7/src/SFont.h
Examining data/grafx2-2.7/src/pxdouble.c
Examining data/grafx2-2.7/src/screen.h
Examining data/grafx2-2.7/src/readini.c
Examining data/grafx2-2.7/src/operatio.h
Examining data/grafx2-2.7/src/c64picview_inc.h
Examining data/grafx2-2.7/src/bitcount.h
Examining data/grafx2-2.7/src/misc.h
Examining data/grafx2-2.7/src/haiku.cpp
Examining data/grafx2-2.7/src/shade.c
Examining data/grafx2-2.7/src/readline.h
Examining data/grafx2-2.7/src/haiku.h
Examining data/grafx2-2.7/src/brush.c
Examining data/grafx2-2.7/src/loadsavefuncs.h
Examining data/grafx2-2.7/src/c64formats.c
Examining data/grafx2-2.7/src/pxquad.c
Examining data/grafx2-2.7/src/filesel.c
Examining data/grafx2-2.7/src/cpcformats.c
Examining data/grafx2-2.7/src/oldies.h
Examining data/grafx2-2.7/src/windows.h
Examining data/grafx2-2.7/src/pxquad.h
Examining data/grafx2-2.7/src/pxtall3.h
Examining data/grafx2-2.7/src/oldies.c
Examining data/grafx2-2.7/src/help.c
Examining data/grafx2-2.7/src/graph.h
Examining data/grafx2-2.7/src/recoil.c
Examining data/grafx2-2.7/src/loadsave.h
Examining data/grafx2-2.7/src/libraw2crtc.h
Examining data/grafx2-2.7/src/brush_ops.c
Examining data/grafx2-2.7/src/miscfileformats.c
Examining data/grafx2-2.7/src/pxwide2.h
Examining data/grafx2-2.7/src/x11screen.c
Examining data/grafx2-2.7/src/setup.h
Examining data/grafx2-2.7/src/packbits.c
Examining data/grafx2-2.7/src/pages.h
Examining data/grafx2-2.7/src/c64load.c
Examining data/grafx2-2.7/src/pxtall3.c
Examining data/grafx2-2.7/src/gfx2log.h
Examining data/grafx2-2.7/src/pxsimple.h
Examining data/grafx2-2.7/src/saveini.c
Examining data/grafx2-2.7/src/gfx2log.c
Examining data/grafx2-2.7/src/io.h
Examining data/grafx2-2.7/src/global.h
Examining data/grafx2-2.7/src/errors.h
Examining data/grafx2-2.7/src/gfx2surface.h
Examining data/grafx2-2.7/src/impdraw_loader.h
Examining data/grafx2-2.7/src/tifformat.c
Examining data/grafx2-2.7/src/pxwide.h
Examining data/grafx2-2.7/src/mountlist.c
Examining data/grafx2-2.7/src/realpath.h
Examining data/grafx2-2.7/src/giformat.c
Examining data/grafx2-2.7/src/hotkeys.h
Examining data/grafx2-2.7/src/const.h
Examining data/grafx2-2.7/src/motoformats.c
Examining data/grafx2-2.7/src/brush.h
Examining data/grafx2-2.7/src/pxdouble.h
Examining data/grafx2-2.7/src/tiles.c
Examining data/grafx2-2.7/src/buttons_effects.c
Examining data/grafx2-2.7/src/layers.h
Examining data/grafx2-2.7/src/packbits.h
Examining data/grafx2-2.7/src/pxtriple.h
Examining data/grafx2-2.7/src/libraw2crtc.c
Examining data/grafx2-2.7/src/factory.h
Examining data/grafx2-2.7/src/keyboard.h
Examining data/grafx2-2.7/src/c64load.h
Examining data/grafx2-2.7/src/pxtriple.c
Examining data/grafx2-2.7/src/layers.c
Examining data/grafx2-2.7/src/pxtall.h
Examining data/grafx2-2.7/src/special.h
Examining data/grafx2-2.7/src/graph.c
Examining data/grafx2-2.7/src/windows.c
Examining data/grafx2-2.7/src/special.c
Examining data/grafx2-2.7/src/pxtall2.h
Examining data/grafx2-2.7/src/loadrecoil.c
Examining data/grafx2-2.7/src/6502.c
Examining data/grafx2-2.7/src/6502.h
Examining data/grafx2-2.7/src/help.h
Examining data/grafx2-2.7/src/struct.h
Examining data/grafx2-2.7/src/fileformats.c
Examining data/grafx2-2.7/src/cpc_scr_simple_loader.h
Examining data/grafx2-2.7/src/init.c
Examining data/grafx2-2.7/src/sdlscreen.h
Examining data/grafx2-2.7/src/msxformats.c
Examining data/grafx2-2.7/src/text.h
Examining data/grafx2-2.7/src/pages.c
Examining data/grafx2-2.7/src/ifformat.c
Examining data/grafx2-2.7/src/init_buttons.h
Examining data/grafx2-2.7/src/loadsave.c
Examining data/grafx2-2.7/src/pxtall.c
Examining data/grafx2-2.7/src/buttons.h
Examining data/grafx2-2.7/src/6502types.h
Examining data/grafx2-2.7/src/pxwide.c
Examining data/grafx2-2.7/src/pxwide2.c
Examining data/grafx2-2.7/src/engine.c
Examining data/grafx2-2.7/src/SFont.c
Examining data/grafx2-2.7/src/sdlscreen.c

FINAL RESULTS:

data/grafx2-2.7/src/realpath.c:72:25:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
                    l = readlink(path, lnk, PATH_MAX);
data/grafx2-2.7/src/setup.c:122:16:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
    path_len = readlink("/proc/self/exe", path, sizeof(path));
data/grafx2-2.7/src/buttons.c:40:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/buttons.c:40:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/buttons.c:1885: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(str+21,ratio);
data/grafx2-2.7/src/engine.c:30:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/engine.c:30:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/factory.c:1716: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(text, valuetext);
data/grafx2-2.7/src/factory.c:1884: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(msg2, msg);
data/grafx2-2.7/src/factory.c:2411: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(path, Data_directory);
data/grafx2-2.7/src/factory.c:2776:9:  [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(displayed_path, Config.Scripts_directory);
data/grafx2-2.7/src/factory.c:2783: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(displayed_path, Config.Scripts_directory+q-DESC_WIDTH);
data/grafx2-2.7/src/fileformats.c:40:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/fileformats.c:40:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/filesel.c:47:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/filesel.c:47:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/filesel.c:1317: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(converted_name, Selector->Directory);
data/grafx2-2.7/src/filesel.c:1702: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(initial_comment,context->Comment);
data/grafx2-2.7/src/filesel.c:2005:15:  [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(Selector->filename + pos_last_dot + 1,
data/grafx2-2.7/src/filesel.c:2160:15:  [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(filename_ansi, ext);
data/grafx2-2.7/src/filesel.c:2282:19:  [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(bookmark_label, Config.Bookmark_label[clicked_button-10]);
data/grafx2-2.7/src/filesel.c:2286:21:  [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(Config.Bookmark_label[clicked_button-10], bookmark_label);
data/grafx2-2.7/src/filesel.c:2670: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(context->Comment, initial_comment);
data/grafx2-2.7/src/generatedoc.c:124: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(shortcuts_name, Key_name(pointer[0]));
data/grafx2-2.7/src/generatedoc.c:126: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(shortcuts_name, Key_name(pointer[1]));
data/grafx2-2.7/src/generatedoc.c:237:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(f, table[index].Text, keytmp);
data/grafx2-2.7/src/gfx2log.c:25:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/gfx2log.c:25:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/gfx2log.c:75: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((unsigned)priority >= GFX2_INFO ? stdout : stderr, fmt, ap);
data/grafx2-2.7/src/gfx2log.c:80:5:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    vsnprintf(message, sizeof(message), fmt, ap);
data/grafx2-2.7/src/help.c:32:10:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	#define snprintf _snprintf
data/grafx2-2.7/src/help.c:32:19:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	#define snprintf _snprintf
data/grafx2-2.7/src/help.c:127: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(shortcuts_name, Key_name(pointer[0]));
data/grafx2-2.7/src/help.c:129: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(shortcuts_name, Key_name(pointer[1]));
data/grafx2-2.7/src/help.c:388:11:  [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.
    ret = system(command);
data/grafx2-2.7/src/help.c:545:7:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      snprintf(buffer, 44, line, hyperlink);
data/grafx2-2.7/src/init.c:66:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/init.c:66:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/init.c:125:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(Gui_loading_error_message, "Error in skin file: Was looking down from %d,%d for a '%s', and reached the end of the image\n",
data/grafx2-2.7/src/init.c:147:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(Gui_loading_error_message, "Error in skin file: Was looking right from %d,%d for a '%s', and reached the edege of the image\n",
data/grafx2-2.7/src/init.c:166:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(Gui_loading_error_message, "Error in skin file: Was looking at %d,%d for a %d*%d object (%s) but it doesn't fit the image.\n",
data/grafx2-2.7/src/init.c:178:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(Gui_loading_error_message, "Error in skin file: Was looking at %d,%d for a %d*%d object (%s) but at %d,%d a pixel was found with color %d which isn't one of the GUI colors (which were detected as %d,%d,%d,%d.\n",
data/grafx2-2.7/src/init.c:184:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(Gui_loading_error_message, "Error in skin file: Was looking at %d,%d for a %d*%d object (%s) but at %d,%d a pixel was found with color %d which isn't one of the mouse colors (which were detected as %d,%d,%d,%d,%d.\n",
data/grafx2-2.7/src/init.c:192:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
          sprintf(Gui_loading_error_message, "Error in skin file: Was looking at %d,%d for a %d*%d object (%s) but at %d,%d a pixel was found with color %d which isn't one of the brush colors (which were detected as %d on %d.\n",
data/grafx2-2.7/src/init.c:691:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(Gui_loading_error_message, "Unable to load the skin image (missing? not an image file?) : %s\n", filename);
data/grafx2-2.7/src/init.c:783:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(Gui_loading_error_message, "Unable to load the font image (missing? not an image file?)\n%s\n", filename);
data/grafx2-2.7/src/io.c:39:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/io.c:39:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/io.c:339: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(dest,position+1);
data/grafx2-2.7/src/io.c:341: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(dest,source);
data/grafx2-2.7/src/io.c:372: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(path + len, PATH_SEPARATOR);
data/grafx2-2.7/src/io.c:379:9:  [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(path + len, PATH_SEPARATOR);
data/grafx2-2.7/src/io.c:421:9:  [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(reverse_path, separator_pos+1);
data/grafx2-2.7/src/io.c:433:9:  [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(reverse_path, path);
data/grafx2-2.7/src/io.c:440: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(path, PATH_SEPARATOR);
data/grafx2-2.7/src/io.c:458: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(path+len, PATH_SEPARATOR);
data/grafx2-2.7/src/io.c:461: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(path, filename);
data/grafx2-2.7/src/io.c:464: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(reverse_path, PARENT_DIR);
data/grafx2-2.7/src/io.c:971: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(buf,PATH_SEPARATOR);
data/grafx2-2.7/src/keyboard.c:598: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, META_KEY_PREFIX);
data/grafx2-2.7/src/keyboard.c:687: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,button_name);
data/grafx2-2.7/src/keyboard.c:697:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(buffer+strlen(buffer), "%s", key_labels[index].Key_name);
data/grafx2-2.7/src/loadrecoil.c:26:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/loadrecoil.c:26:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/loadsave.c:40:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/loadsave.c:40:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/loadsave.c:873:9:  [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.backups->Pages->Comment, context->Comment);
data/grafx2-2.7/src/loadsave.c:1879: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(context->Comment, Main.backups->Pages->Comment);
data/grafx2-2.7/src/loadsave.c:2220:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    snprintf(deleted_file, len, "%s%c%6.6d" BACKUP_FILE_EXTENSION,
data/grafx2-2.7/src/loadsave.c:2232:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(file_name, "%c%6.6d" BACKUP_FILE_EXTENSION,
data/grafx2-2.7/src/loadsavefuncs.c:38:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/loadsavefuncs.c:38:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/loadsavefuncs.c:149: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(filename, ext);
data/grafx2-2.7/src/main.c:74:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/main.c:74:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/main.c:505:11:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
          strcpy(Config.Skin_file,argv[index]);
data/grafx2-2.7/src/main.c:1112: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(Main.selector.Directory, directories[0]);
data/grafx2-2.7/src/main.c:1384:3:  [4] (shell) execl:
  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.
  execl("/usr/gp2x/gp2xmenu", "/usr/gp2x/gp2xmenu", NULL);
data/grafx2-2.7/src/miscfileformats.c:37:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/miscfileformats.c:37:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/mountlist.c:481:17:  [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 + 1, d->d_name);
data/grafx2-2.7/src/mountlist.c:598:9:  [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 (me->me_devname + 5, mnt.mt_dev);
data/grafx2-2.7/src/mountlist.c:775:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy (me->me_devname, host);
data/grafx2-2.7/src/mountlist.c:777:13:  [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 (me->me_devname, dir);
data/grafx2-2.7/src/pages.c:931: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.backups->Pages->Comment ,Main.backups->Pages->Next->Comment);
data/grafx2-2.7/src/readini.c:154: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(group_upper,group);
data/grafx2-2.7/src/readini.c:171: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(upper_buffer,buffer);
data/grafx2-2.7/src/readini.c:206: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(option_upper,option_name);
data/grafx2-2.7/src/readini.c:223: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(upper_buffer,buffer);
data/grafx2-2.7/src/readini.c:235: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(return_code, upper_buffer + buffer_index);
data/grafx2-2.7/src/readini.c:410: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(option_upper,option_name);
data/grafx2-2.7/src/readini.c:427: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(upper_buffer,buffer);
data/grafx2-2.7/src/readini.c:510:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(filename,Config_directory);
data/grafx2-2.7/src/readini.c:511: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(filename,INI_FILENAME);
data/grafx2-2.7/src/readini.c:517: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(filename,Data_directory);
data/grafx2-2.7/src/readini.c:518: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(filename,INIDEF_FILENAME);
data/grafx2-2.7/src/readini.c:856:9:  [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(conf->Bookmark_directory[index],value_label);
data/grafx2-2.7/src/readline.c:64:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/readline.c:64:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/readline.c:798: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(initial_string,str);
data/grafx2-2.7/src/readline.c:1145:9:  [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(str,initial_string);
data/grafx2-2.7/src/realpath.c:108: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(resolved_path, tmp);
data/grafx2-2.7/src/saveini.c:52: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(group_upper,group);
data/grafx2-2.7/src/saveini.c:67: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(upper_buffer,buffer);
data/grafx2-2.7/src/saveini.c:256: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(dest+dest_index,value);
data/grafx2-2.7/src/saveini.c:292: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(option_upper,option_name);
data/grafx2-2.7/src/saveini.c:308: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(upper_buffer,buffer);
data/grafx2-2.7/src/saveini.c:366: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(option_upper,option_name);
data/grafx2-2.7/src/saveini.c:383: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(upper_buffer,buffer);
data/grafx2-2.7/src/setup.c:38:13:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    #define snprintf _snprintf
data/grafx2-2.7/src/setup.c:38:22:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    #define snprintf _snprintf
data/grafx2-2.7/src/setup.c:110:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(program_dir,"%c:\\%s%s", currentDrive, path, PATH_SEPARATOR);
data/grafx2-2.7/src/text.c:53:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/text.c:53:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/tifformat.c:31:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/tifformat.c:31:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/win32screen.c:28:10:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	#define snprintf _snprintf
data/grafx2-2.7/src/win32screen.c:28:19:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	#define snprintf _snprintf
data/grafx2-2.7/src/windows.c:36:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/windows.c:36:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/grafx2-2.7/src/windows.c:1595:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(message, sizeof(message), template, arg_ptr);
data/grafx2-2.7/src/filesel.c:767:23:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    char * home_dir = getenv("HOME");
data/grafx2-2.7/src/main.c:864:3:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  srand(time(NULL)); // On randomize un peu tout ça...
data/grafx2-2.7/src/realpath.c:138:14:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
      return realpath(_path, resolved_path);
data/grafx2-2.7/src/setup.c:262:29:  [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.
        config_parent_dir = getenv("APPDATA");
data/grafx2-2.7/src/setup.c:275:29:  [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.
        config_parent_dir = getenv("HOME");
data/grafx2-2.7/src/setup.c:283:30:  [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.
         config_parent_dir = getenv("XDG_CONFIG_HOME");
data/grafx2-2.7/src/setup.c:288:32:  [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.
           config_parent_dir = getenv("HOME");
data/grafx2-2.7/src/text.c:358:28:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
      char * WindowsPath = getenv("windir");
data/grafx2-2.7/src/text.c:394:11:  [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 (getenv("HOME") != NULL)
data/grafx2-2.7/src/text.c:396:43:  [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.
        home_dir = Filepath_append_to_dir(getenv("HOME"), "Library/Fonts");
data/grafx2-2.7/src/SFont.c:120:13:  [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(Surface->pixels + (y + line) * Surface->w + x,
data/grafx2-2.7/src/brush.c:976: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(Brush_original_palette, Main.palette,sizeof(T_Palette));
data/grafx2-2.7/src/brush.c:1153: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(Brush_original_palette, Main.palette,sizeof(T_Palette));
data/grafx2-2.7/src/brush.c:1154: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(Brush_original_pixels, Brush, (long)Brush_width*Brush_height);
data/grafx2-2.7/src/brush.c:1261: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(Brush_original_palette, Main.palette,sizeof(T_Palette));
data/grafx2-2.7/src/brush.c:1262: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(Brush_original_pixels, Brush, (long)Brush_width*Brush_height);
data/grafx2-2.7/src/brush.c:1378: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(Brush_original_palette, Main.palette,sizeof(T_Palette));
data/grafx2-2.7/src/brush.c:1383: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(Brush_original_pixels, Brush, (long)Brush_width*Brush_height);
data/grafx2-2.7/src/brush_ops.c:155: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 str[4];
data/grafx2-2.7/src/brush_ops.c:197: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 str[4];
data/grafx2-2.7/src/brush_ops.c:298:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char str[4];
data/grafx2-2.7/src/brush_ops.c:400: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  str[5];
data/grafx2-2.7/src/brush_ops.c:677: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  str[5];
data/grafx2-2.7/src/brush_ops.c:767: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  str[5];
data/grafx2-2.7/src/brush_ops.c:950: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  str[8];
data/grafx2-2.7/src/brush_ops.c:1017: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  str[8];
data/grafx2-2.7/src/buttons.c:154: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  str[30];
data/grafx2-2.7/src/buttons.c:493: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 menu_name_tools[9] = " Tools";
data/grafx2-2.7/src/buttons.c:494: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 menu_name_layers[9]= " Layers";
data/grafx2-2.7/src/buttons.c:495: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 menu_name_anim[9]  = " Anim";
data/grafx2-2.7/src/buttons.c:921:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char str[10];
data/grafx2-2.7/src/buttons.c:1029:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  const char * help_section[SETTING_PAGES] = {
data/grafx2-2.7/src/buttons.c:1121:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                  char str[10];
data/grafx2-2.7/src/buttons.c:1127:27:  [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).
                    value=atoi(str);
data/grafx2-2.7/src/buttons.c:1220: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 result[12];
data/grafx2-2.7/src/buttons.c:1573: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(&temp_doc, &Main, sizeof(T_Document));
data/grafx2-2.7/src/buttons.c:1574: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(&Main, &Spare, sizeof(T_Document));
data/grafx2-2.7/src/buttons.c:1575: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(&Spare, &temp_doc, sizeof(T_Document));
data/grafx2-2.7/src/buttons.c:1628:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(Spare.backups->Pages->Image[i].Pixels,Main.backups->Pages->Image[Main.current_layer].Pixels,Main.image_width*Main.image_height);
data/grafx2-2.7/src/buttons.c:1684:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(Spare.palette+index,Main.palette+index,
data/grafx2-2.7/src/buttons.c:1727:7:  [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(Spare.palette,Main.palette,sizeof(T_Palette));
data/grafx2-2.7/src/buttons.c:1750:7:  [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(Spare.palette,Main.palette,sizeof(T_Palette));
data/grafx2-2.7/src/buttons.c:1766:7:  [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(Spare.palette,Main.palette,sizeof(T_Palette));
data/grafx2-2.7/src/buttons.c:1834: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 str[29];
data/grafx2-2.7/src/buttons.c:1861:7:  [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(str+9,"   Window          ",20);
data/grafx2-2.7/src/buttons.c:1864:7:  [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(str+9," Fullscreen ",13);
data/grafx2-2.7/src/buttons.c:1916: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  str[8];
data/grafx2-2.7/src/buttons.c:1919:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 *pixel_ratio_labels[PIXEL_MAX] ={
data/grafx2-2.7/src/buttons.c:2024: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).
        chosen_width=atoi(str);
data/grafx2-2.7/src/buttons.c:2038:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        chosen_height=atoi(str);
data/grafx2-2.7/src/buttons.c:2275:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 text[4][14] =
data/grafx2-2.7/src/buttons.c:2382:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 * text[4] =
data/grafx2-2.7/src/buttons.c:2538: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 str[24];
data/grafx2-2.7/src/buttons.c:2556: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  str[4];
data/grafx2-2.7/src/buttons.c:2580: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(&backup_gradients,Main.backups->Pages->Gradients,sizeof(T_Gradient_array));
data/grafx2-2.7/src/buttons.c:2843: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(Main.backups->Pages->Gradients,&backup_gradients,sizeof(T_Gradient_array));
data/grafx2-2.7/src/buttons.c:3469: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(new_filename, filename, len + 1);
data/grafx2-2.7/src/buttons.c:3477: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(p + i + 1, "BAK", 4);
data/grafx2-2.7/src/buttons.c:3479: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(new_filename + len, ".BAK", 5);
data/grafx2-2.7/src/buttons.c:3529: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(pal_filename, Main.backups->Pages->Filename, len + 1);
data/grafx2-2.7/src/buttons.c:3534: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(dotpos, ".pal");
data/grafx2-2.7/src/buttons.c:3902:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 * text[NB_ZOOM_FACTORS] =
data/grafx2-2.7/src/buttons.c:4198: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  str[4];
data/grafx2-2.7/src/buttons.c:4218: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   str[4];
data/grafx2-2.7/src/buttons.c:4237: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(old_airbrush_multi_flow,Airbrush_multi_flow,256);
data/grafx2-2.7/src/buttons.c:4317:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(Airbrush_multi_flow,old_airbrush_multi_flow,256);
data/grafx2-2.7/src/buttons.c:4423:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        Airbrush_size=atoi(str);
data/grafx2-2.7/src/buttons.c:4443:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        Airbrush_delay=atoi(str);
data/grafx2-2.7/src/buttons.c:4457: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).
        Airbrush_mono_flow=atoi(str);
data/grafx2-2.7/src/buttons.c:4471:20:  [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).
        spray_init=atoi(str);
data/grafx2-2.7/src/buttons.c:5012: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 str[256]="";
data/grafx2-2.7/src/buttons.c:5027: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 size_buffer[4];
data/grafx2-2.7/src/buttons.c:5260: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).
      font_size=atoi(size_buffer);
data/grafx2-2.7/src/buttons.c:5319:7:  [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(Brush_original_palette, text_palette,sizeof(T_Palette));
data/grafx2-2.7/src/buttons.c:5476:7:  [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(Brush_container[index].Brush, Brush_original_pixels,Brush_height*Brush_width);
data/grafx2-2.7/src/buttons.c:5477:7:  [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(Brush_container[index].Palette, Brush_original_palette,sizeof(T_Palette));
data/grafx2-2.7/src/buttons.c:5478:7:  [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(Brush_container[index].Colormap, Brush_colormap,256);
data/grafx2-2.7/src/buttons.c:5621:7:  [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(Brush_original_pixels, Brush_container[index].Brush, (long)Brush_height*Brush_width);
data/grafx2-2.7/src/buttons.c:5623:7:  [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(Brush_original_palette, Brush_container[index].Palette, sizeof(T_Palette));
data/grafx2-2.7/src/buttons.c:5625:7:  [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(Brush_colormap, Brush_container[index].Colormap, 256);
data/grafx2-2.7/src/buttons_effects.c:79: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(backup_table,table,256);
data/grafx2-2.7/src/buttons_effects.c:167: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(table,backup_table,256);
data/grafx2-2.7/src/buttons_effects.c:905:11:  [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(Main.palette + 252 + i, Favorite_GUI_color(i), sizeof(T_Components));
data/grafx2-2.7/src/buttons_effects.c:1076: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 str[4];
data/grafx2-2.7/src/buttons_effects.c:1122: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).
        chosen_X=atoi(str);
data/grafx2-2.7/src/buttons_effects.c:1144: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).
        chosen_Y=atoi(str);
data/grafx2-2.7/src/buttons_effects.c:1166: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).
        dx_selected=atoi(str);
data/grafx2-2.7/src/buttons_effects.c:1179: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).
        dy_selected=atoi(str);
data/grafx2-2.7/src/buttons_effects.c:1269: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  str[4];
data/grafx2-2.7/src/buttons_effects.c:1323: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).
        chosen_matrix[x][y]=atoi(str);
data/grafx2-2.7/src/buttons_effects.c:1449: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  str[4];
data/grafx2-2.7/src/buttons_effects.c:1485:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        chosen_opacity=atoi(str);
data/grafx2-2.7/src/buttons_effects.c:1549: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  str[5];
data/grafx2-2.7/src/buttons_effects.c:1578:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      chosen_offset_x=atoi(str);
data/grafx2-2.7/src/buttons_effects.c:1593:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      chosen_offset_y=atoi(str);
data/grafx2-2.7/src/buttons_effects.c:1753: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  str[3];
data/grafx2-2.7/src/buttons_effects.c:1759: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(old_sieve,Sieve,256);
data/grafx2-2.7/src/buttons_effects.c:1916:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(Brush_original_palette, Main.palette,sizeof(T_Palette));
data/grafx2-2.7/src/buttons_effects.c:2080: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(Sieve,old_sieve,256);
data/grafx2-2.7/src/cpcformats.c:822:7:  [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, impdraw_loader, 0x90);
data/grafx2-2.7/src/cpcformats.c:836:7:  [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(output + 0x7F00 - 0x200, cpc_hw_pal, 16);
data/grafx2-2.7/src/cpcformats.c:845:7:  [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(output + exec_address - load_address, cpc_scr_simple_loader, sizeof(cpc_scr_simple_loader));
data/grafx2-2.7/src/cpcformats.c:876:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buffer + 10 + i, ".SCR\"", 5);
data/grafx2-2.7/src/engine.c:589: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 str[25];
data/grafx2-2.7/src/engine.c:2678: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 str[25];
data/grafx2-2.7/src/factory.c:52: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 * Bound_script[10];
data/grafx2-2.7/src/factory.c:271: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(Brush_original_palette, Main.palette,sizeof(T_Palette));
data/grafx2-2.7/src/factory.c:307: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(Brush_original_palette, Main.palette,sizeof(T_Palette));
data/grafx2-2.7/src/factory.c:308: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(Brush_original_pixels, Brush, Brush_width*Brush_height);
data/grafx2-2.7/src/factory.c:998:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  const char * label[max_settings];
data/grafx2-2.7/src/factory.c:1017: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  str[40];
data/grafx2-2.7/src/factory.c:1278:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  const char * label[max_settings];
data/grafx2-2.7/src/factory.c:1689: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[255+1]="";
data/grafx2-2.7/src/factory.c:1875: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 msg2[25];
data/grafx2-2.7/src/factory.c:2237: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_block[3][DESC_WIDTH+1];
data/grafx2-2.7/src/factory.c:2255:21:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      script_file = fopen(full_name, "r");
data/grafx2-2.7/src/factory.c:2422: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(path, "LUA_PATH=", 9);
data/grafx2-2.7/src/factory.c:2549: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(Brush_backup, Brush, ((long)Brush_height)*Brush_width);
data/grafx2-2.7/src/factory.c:2592: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(Brush_original_pixels, Brush, (long)Brush_width*Brush_height);
data/grafx2-2.7/src/factory.c:2737: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 displayed_path[DESC_WIDTH+1];
data/grafx2-2.7/src/factory.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 * Bound_script[10];
data/grafx2-2.7/src/fileformats.c:128:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(context->Palette,IMG_header.Palette,sizeof(T_Palette));
data/grafx2-2.7/src/fileformats.c:169: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(IMG_header.Filler1,signature,6);
data/grafx2-2.7/src/fileformats.c:178: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(IMG_header.Filler2+23,"GRAFX2 by SunsetDesign (IMG format taken from PV (c)W.Wiedmann)",64);
data/grafx2-2.7/src/fileformats.c:180: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(IMG_header.Palette,context->Palette,sizeof(T_Palette));
data/grafx2-2.7/src/fileformats.c:543:21:  [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(context->Palette, palette, MIN(palette_len,sizeof(T_Palette)));
data/grafx2-2.7/src/fileformats.c:570:27:  [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(context->Palette + palette_color_count, palette + i, sizeof(T_Components));
data/grafx2-2.7/src/fileformats.c:604:21:  [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(context->Palette + palette_color_count, palette, MIN(palette_len,sizeof(T_Palette) - 3*palette_color_count));
data/grafx2-2.7/src/fileformats.c:628:27:  [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(context->Palette + palette_color_count, palette + i, sizeof(T_Components));
data/grafx2-2.7/src/fileformats.c:711:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(context->Palette, amigaOS1x_pal, sizeof(amigaOS1x_pal));
data/grafx2-2.7/src/fileformats.c:713:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(context->Palette, amigaOS2x_pal, sizeof(amigaOS2x_pal));
data/grafx2-2.7/src/fileformats.c:1968:11:  [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(context->Palette,PCX_header.Palette_16c,48);
data/grafx2-2.7/src/fileformats.c:2279: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(PCX_header.Palette_16c,context->Palette,48);
data/grafx2-2.7/src/fileformats.c:2442:11:  [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(context->Palette,SCx_Palette,size);
data/grafx2-2.7/src/fileformats.c:2545: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(palette_64, context->Palette, sizeof(T_Palette));
data/grafx2-2.7/src/fileformats.c:2548: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(SCx_header.Filler1,"RIX3",4);
data/grafx2-2.7/src/filesel.c:95: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 szFileName[MAX_PATH] = "";
data/grafx2-2.7/src/filesel.c:294: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 result[40];
data/grafx2-2.7/src/filesel.c:322: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(result,"\x11 PARENT DIRECTORY");
data/grafx2-2.7/src/filesel.c:406: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(temp_item->Short_name,short_name,short_name_len);
data/grafx2-2.7/src/filesel.c:407: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(temp_item->Full_name,full_name,full_name_len);
data/grafx2-2.7/src/filesel.c:499: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 long_ext[16];
data/grafx2-2.7/src/filesel.c:678:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tmp[256];
data/grafx2-2.7/src/filesel.c:695: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 drive_name[32];
data/grafx2-2.7/src/filesel.c:708:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char volume_name[32];
data/grafx2-2.7/src/filesel.c:709:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char file_system[32];
data/grafx2-2.7/src/filesel.c:1284:7:  [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(temp_name, Selector->Directory_unicode, 3*2);  // first 3 chars "C:\"
data/grafx2-2.7/src/filesel.c:1325: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 temp_name[MAX_DISPLAYABLE_PATH+1]; // truncated name
data/grafx2-2.7/src/filesel.c:1339:11:  [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(temp_name + 4, converted_name + index, length - index + 1);
data/grafx2-2.7/src/filesel.c:1359:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char filename[32];
data/grafx2-2.7/src/filesel.c:1683: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  initial_comment[COMMENT_SIZE+1];
data/grafx2-2.7/src/filesel.c:2059:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char filename_ansi[256];
data/grafx2-2.7/src/filesel.c:2232:13:  [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(&clipboard_context, context, sizeof(T_IO_Context));
data/grafx2-2.7/src/filesel.c:2280:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                  char bookmark_label[24];
data/grafx2-2.7/src/filesel.c:2476: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.
          static char path[1024]={0};
data/grafx2-2.7/src/generatedoc.c:111: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 shortcuts_name[80];
data/grafx2-2.7/src/generatedoc.c:125:5:  [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(shortcuts_name, " or ");
data/grafx2-2.7/src/generatedoc.c:163:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char title[256];
data/grafx2-2.7/src/generatedoc.c:235: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 keytmp[64];
data/grafx2-2.7/src/generatedoc.c:327:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char filename[MAX_PATH_CHARACTERS];
data/grafx2-2.7/src/generatedoc.c:332:12:  [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).
  findex = fopen(filename, "w");
data/grafx2-2.7/src/generatedoc.c:368:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen(filename, "w");
data/grafx2-2.7/src/generatedoc.c:394:7:  [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).
  f = fopen(filename, "w");
data/grafx2-2.7/src/generatedoc.c:439:7:  [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).
  f = fopen(filename, "w");
data/grafx2-2.7/src/gfx2log.c:79:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char message[1024];
data/grafx2-2.7/src/gfx2log.c:88: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[128];
data/grafx2-2.7/src/giformat.c:112: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 signature[6];
data/grafx2-2.7/src/giformat.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 signature[6];
data/grafx2-2.7/src/giformat.c:411: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 aeb[0x0B];
data/grafx2-2.7/src/giformat.c:551:19:  [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(
data/grafx2-2.7/src/global.h:103:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
GFX2_GLOBAL char Key_Text[32];
data/grafx2-2.7/src/help.c:114: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 shortcuts_name[80];
data/grafx2-2.7/src/help.c:128:5:  [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(shortcuts_name, " or ");
data/grafx2-2.7/src/help.c:342: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[48];
data/grafx2-2.7/src/help.c:356: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, "http://", 7);
data/grafx2-2.7/src/help.c:386: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 command[80]; // use the xdg-open command to open the url in the default browser
data/grafx2-2.7/src/help.c:499: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[45];          // buffer texte utilisé pour formater les noms de 
data/grafx2-2.7/src/help.c:786: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[37];
data/grafx2-2.7/src/help.c:794: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 helpBuf[3][16];
data/grafx2-2.7/src/help.c:908: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(helpBuf[0], "ST:%u Mb", (unsigned int)(STRAM/(1024*1024)));
data/grafx2-2.7/src/help.c:910: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(helpBuf[0], "ST:%u Kb", (unsigned int)(STRAM/1024));
data/grafx2-2.7/src/help.c:912: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(helpBuf[0], "ST:%u b", (unsigned int)STRAM);
data/grafx2-2.7/src/help.c:915: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(helpBuf[1], "TT:%u Mb", (unsigned int)(TTRAM/(1024*1024)));
data/grafx2-2.7/src/help.c:917: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(helpBuf[1], "TT:%u Kb", (unsigned int)(TTRAM/1024));
data/grafx2-2.7/src/help.c:919: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(helpBuf[1], "TT:%u b", (unsigned int)TTRAM);
data/grafx2-2.7/src/help.c:922: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(helpBuf[2], "(%u Gb)", (unsigned int)(freeRam/(1024*1024*1024)));
data/grafx2-2.7/src/help.c:924: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(helpBuf[2], "(%u Mb)", (unsigned int)(freeRam/(1024*1024)));
data/grafx2-2.7/src/help.c:926: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(helpBuf[2], "(%u Kb)", (unsigned int)(freeRam/1024));
data/grafx2-2.7/src/help.c:928: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(helpBuf[2], "(%u b)", (unsigned int)freeRam);
data/grafx2-2.7/src/help.c:939:9:  [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(buffer,"%u Gigabytes",(unsigned int)(freeRam/(1024*1024*1024)));
data/grafx2-2.7/src/help.c:941:9:  [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(buffer,"%u Megabytes",(unsigned int)(freeRam/(1024*1024)));
data/grafx2-2.7/src/help.c:943:9:  [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(buffer,"%u Kilobytes",(unsigned int)(freeRam/1024));
data/grafx2-2.7/src/help.c:945:9:  [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(buffer,"%u bytes",(unsigned int)freeRam);
data/grafx2-2.7/src/help.c:955:9:  [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(buffer,"%ld (%ld Gb)",Stats_pages_number, (long)(Stats_pages_memory/(1024*1024*1024)));
data/grafx2-2.7/src/help.c:957:9:  [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(buffer,"%ld (%ld Mb)",Stats_pages_number, (long)(Stats_pages_memory/(1024*1024)));
data/grafx2-2.7/src/help.c:959:9:  [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(buffer,"%ld (%ld Kb)",Stats_pages_number, (long)(Stats_pages_memory/1024));
data/grafx2-2.7/src/help.c:1013: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(buffer,"Free space on %.*s:",len,Main.selector.Directory);
data/grafx2-2.7/src/help.c:1015: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(buffer,"Free space on %c:",Main.selector.Directory[0]);
data/grafx2-2.7/src/help.c:1020:9:  [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(buffer,"%u Gigabytes",(unsigned int)(mem_size/(1024*1024*1024)));
data/grafx2-2.7/src/help.c:1022:9:  [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(buffer,"%u Megabytes",(unsigned int)(mem_size/(1024*1024)));
data/grafx2-2.7/src/help.c:1024:9:  [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(buffer,"%u Kilobytes",(unsigned int)(mem_size/1024));
data/grafx2-2.7/src/help.c:1026:9:  [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(buffer,"%u bytes",(unsigned int)mem_size);
data/grafx2-2.7/src/help.c:1046: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(buffer,"%dx%d",Main.image_width,Main.image_height);
data/grafx2-2.7/src/help.c:1053: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(buffer,"%d",Count_used_colors(color_usage));
data/grafx2-2.7/src/help.c:1059: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(buffer,"%dx%d",Screen_width,Screen_height);
data/grafx2-2.7/src/hotkeys.h:42: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 Label[36];        ///< Text to show in the screen where you can edit the shortcut.
data/grafx2-2.7/src/hotkeys.h:43: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 Explanation1[37]; ///< Explanation text (1/3) to show in the screen where you can edit the shortcut.
data/grafx2-2.7/src/hotkeys.h:44: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 Explanation2[37]; ///< Explanation text (2/3) to show in the screen where you can edit the shortcut.
data/grafx2-2.7/src/hotkeys.h:45: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 Explanation3[37]; ///< Explanation text (3/3) to show in the screen where you can edit the shortcut.
data/grafx2-2.7/src/ifformat.c:99:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char  format[4];
data/grafx2-2.7/src/ifformat.c:100:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char  section[4];
data/grafx2-2.7/src/ifformat.c:630:15:  [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+x_pos+y_pos*line_size+plane*plane_line_size,data,2);
data/grafx2-2.7/src/ifformat.c:691:7:  [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(new_pal->Palette, palette, sizeof(T_Components) * 16);
data/grafx2-2.7/src/ifformat.c:713:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(prev_pal->Palette, context->Palette, sizeof(T_Components) * 16);
data/grafx2-2.7/src/ifformat.c:742: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  format[4];
data/grafx2-2.7/src/ifformat.c:743: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  section[4];
data/grafx2-2.7/src/ifformat.c:1002:13:  [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(anteprevious_frame, previous_frame, line_size * context->Height);
data/grafx2-2.7/src/ifformat.c:1637:17:  [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(prev_pal->Palette, palette, nb_colors*sizeof(T_Components));
data/grafx2-2.7/src/ifformat.c:1650:17:  [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(new_pal->Palette, palette, nb_colors*sizeof(T_Components));
data/grafx2-2.7/src/ifformat.c:1763:13:  [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(prev_pal->Palette, context->Palette, nb_colors*sizeof(T_Components));
data/grafx2-2.7/src/ifformat.c:1793:19:  [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(curr_pal->Palette, prev_pal->Palette, nb_colors*sizeof(T_Components));
data/grafx2-2.7/src/init.c:99: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 Gui_loading_error_message[256];
data/grafx2-2.7/src/init.c:283: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(gfx->Default_palette, gui->palette, sizeof(T_Palette));
data/grafx2-2.7/src/init.c:291: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(Gui_loading_error_message, "Error in GUI skin file: should start with 5 consecutive squares for black, dark, light, white, transparent, then a neutral color\n");
data/grafx2-2.7/src/init.c:302: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(Gui_loading_error_message, "Error in GUI skin file: should start with 5 consecutive squares for black, dark, light, white, transparent, then a neutral color\n");
data/grafx2-2.7/src/init.c:313: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(Gui_loading_error_message, "Error in GUI skin file: should start with 5 consecutive squares for black, dark, light, white, transparent, then a neutral color\n");
data/grafx2-2.7/src/init.c:324: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(Gui_loading_error_message, "Error in GUI skin file: should start with 5 consecutive squares for black, dark, light, white, transparent, then a neutral color\n");
data/grafx2-2.7/src/init.c:335: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(Gui_loading_error_message, "Error in GUI skin file: should start with 5 consecutive squares for black, dark, light, white, transparent, then a neutral color\n");
data/grafx2-2.7/src/init.c:351: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(Gui_loading_error_message, "Error in GUI skin file: should start with 5 consecutive squares for black, dark, light, white, transparent, then a neutral color\n");
data/grafx2-2.7/src/init.c:645: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(gfx->Menu_block[2], gfx->Menu_block[0], 
data/grafx2-2.7/src/init.c:647: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(gfx->Layerbar_block[2], gfx->Layerbar_block[0],
data/grafx2-2.7/src/init.c:649: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(gfx->Animbar_block[2], gfx->Animbar_block[0],
data/grafx2-2.7/src/init.c:651: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(gfx->Statusbar_block[2], gfx->Statusbar_block[0],
data/grafx2-2.7/src/init.c:667: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(Gui_loading_error_message, "Wrong skin file name \"\"\n");
data/grafx2-2.7/src/init.c:674: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(Gui_loading_error_message, "Not enough memory to read skin file\n");
data/grafx2-2.7/src/init.c:721: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(Gui_loading_error_message, "Error in font file: Image width is not a multiple of 8.\n");
data/grafx2-2.7/src/init.c:727: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(Gui_loading_error_message, "Error in font file: Image is too small to be a 256-character 8x8 font.\n");
data/grafx2-2.7/src/init.c:733: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(Gui_loading_error_message, "Not enough memory to read font file\n");
data/grafx2-2.7/src/init.c:748:11:  [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(Gui_loading_error_message, "Error in font file: Only colors 0 and 1 can be used for the font.\n");
data/grafx2-2.7/src/init.c:769: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(Gui_loading_error_message, "Wrong font name \"\"\n");
data/grafx2-2.7/src/init.c:1621:12:  [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).
  Handle = fopen(filename, "rb");
data/grafx2-2.7/src/init.c:2011:12:  [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).
  Handle = fopen(filename, "wb");
data/grafx2-2.7/src/init.c:2021: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(cfg_header.Signature,"CFG",3);
data/grafx2-2.7/src/init.h:42: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 Gui_loading_error_message[256];
data/grafx2-2.7/src/input.c:678:13:  [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(X11_clipboard, value, count);
data/grafx2-2.7/src/input.c:1739:23:  [2] (buffer) TCHAR:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                      TCHAR LongDropFileName[MAX_PATH];
data/grafx2-2.7/src/input.c:1740:23:  [2] (buffer) TCHAR:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                      TCHAR ShortDropFileName[MAX_PATH];
data/grafx2-2.7/src/input.c:2003:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[16];
data/grafx2-2.7/src/input.c:2230: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(palette, Main.palette, sizeof(T_Palette));
data/grafx2-2.7/src/io.c:685: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 short_filename[16];
data/grafx2-2.7/src/io.c:817: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(filename_unicode, longPath, sizeof(word) * len);
data/grafx2-2.7/src/io.c:826:7:  [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(filename_unicode, sep, sizeof(word) * len);
data/grafx2-2.7/src/io.c:913:22:  [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).
  Lock_file_handle = open(lock_filename,O_WRONLY|O_CREAT,S_IRUSR|S_IWUSR);
data/grafx2-2.7/src/keyboard.c:576: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 buffer[41];
data/grafx2-2.7/src/keyboard.c:584:5:  [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(buffer, "A+");
data/grafx2-2.7/src/keyboard.c:586:5:  [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(buffer, "B+");
data/grafx2-2.7/src/keyboard.c:588:5:  [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(buffer, "X+");
data/grafx2-2.7/src/keyboard.c:591:5:  [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(buffer, "Ctl+");
data/grafx2-2.7/src/keyboard.c:593:5:  [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(buffer, "Alt+");
data/grafx2-2.7/src/keyboard.c:595:5:  [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(buffer, "Shift+");
data/grafx2-2.7/src/keyboard.c:685:16:  [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.
      default: sprintf(buffer+strlen(buffer), "[B%d]", key-KEY_JOYBUTTON);return buffer;
data/grafx2-2.7/src/keyboard.c:705: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(buffer+strlen(buffer), "'%c'", toupper(key));
data/grafx2-2.7/src/keyboard.c:713: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(buffer+strlen(buffer), "w%d", key - SDLK_WORLD_0);
data/grafx2-2.7/src/keyboard.c:722: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(buffer+strlen(buffer), "[%d]", key & 0x7FF);
data/grafx2-2.7/src/keyboard.c:728: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(buffer+strlen(buffer), "0x%X", key);
data/grafx2-2.7/src/layers.c:159:7:  [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(
data/grafx2-2.7/src/layers.c:245: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 buf[4];
data/grafx2-2.7/src/layers.c:480: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[6+1];
data/grafx2-2.7/src/layers.c:518:11:  [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(buffer,"-99999");
data/grafx2-2.7/src/layers.c:520:11:  [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(buffer,"999999");
data/grafx2-2.7/src/layers.c:522:11:  [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(buffer,"%d", duration);
data/grafx2-2.7/src/layers.c:530:20:  [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).
          duration=atoi(buffer);
data/grafx2-2.7/src/libraw2crtc.c:187: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(outBuffer, tmpBuffer + minAddr, *outSize);
data/grafx2-2.7/src/loadsave.c:379: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  str[10];
data/grafx2-2.7/src/loadsave.c:411:7:  [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(str, "VERY BIG!", 10); // default string
data/grafx2-2.7/src/loadsave.c:435:9:  [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(str+5,"KB");
data/grafx2-2.7/src/loadsave.c:440:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(str,"LARGE!!",8);
data/grafx2-2.7/src/loadsave.c:805:7:  [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(Main.palette, context->Palette, sizeof(T_Palette));
data/grafx2-2.7/src/loadsave.c:806:7:  [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(Main.backups->Pages->Palette, context->Palette, sizeof(T_Palette));
data/grafx2-2.7/src/loadsave.c:899:7:  [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(Main.palette, context->Palette, sizeof(T_Palette));
data/grafx2-2.7/src/loadsave.c:900:7:  [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(Main.backups->Pages->Palette, context->Palette, sizeof(T_Palette));
data/grafx2-2.7/src/loadsave.c:914: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(Brush_original_palette, context->Palette, sizeof(T_Palette));
data/grafx2-2.7/src/loadsave.c:924:7:  [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(context->Surface->palette, context->Palette, sizeof(T_Palette));
data/grafx2-2.7/src/loadsave.c:1245: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 format_name_buffer[256];
data/grafx2-2.7/src/loadsave.c:1507: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 video_driver_name[32];
data/grafx2-2.7/src/loadsave.c:1573:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char tmp_path[MAX_PATH_CHARACTERS];
data/grafx2-2.7/src/loadsave.c:1718: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 video_driver_name[32];
data/grafx2-2.7/src/loadsave.c:1768:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  file = fopen(filename,"wb");
data/grafx2-2.7/src/loadsave.c:1773: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(IMG_header.Filler1,"\x01\x00\x47\x12\x6D\xB0",6);
data/grafx2-2.7/src/loadsave.c:1778: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(IMG_header.Filler2+23,"GRAFX2 by SunsetDesign (IMG format taken from PV (c)W.Wiedmann)",64);
data/grafx2-2.7/src/loadsave.c:1875: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(context->Palette, Main.palette, sizeof(T_Palette));
data/grafx2-2.7/src/loadsave.c:1916: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(context->Palette, Main.palette, sizeof(T_Palette));
data/grafx2-2.7/src/loadsave.c:2197:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char file_name[12+1];
data/grafx2-2.7/src/loadsave.h:71: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 Comment[COMMENT_SIZE+1];
data/grafx2-2.7/src/loadsavefuncs.c:107:7:  [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).
  f = fopen(filename, "wb");
data/grafx2-2.7/src/loadsavefuncs.c:151:7:  [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).
  f = fopen(filename, "wb");
data/grafx2-2.7/src/loadsavefuncs.c:163:7:  [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).
  f = fopen(filename, "rb");
data/grafx2-2.7/src/loadsavefuncs.c:202:7:  [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(temp_string, filename_unicode, base_len * sizeof(word));
data/grafx2-2.7/src/loadsavefuncs.c:264:7:  [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(params.basename_unicode, context->File_name_unicode, (i + 1) * sizeof(word));
data/grafx2-2.7/src/loadsavefuncs.c:280:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen(filename, "rb");
data/grafx2-2.7/src/main.c:166:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char modes[1024*2];
data/grafx2-2.7/src/main.c:220: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 msg_buffer[512];
data/grafx2-2.7/src/main.c:232: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(backup_palette, Get_current_palette(), sizeof(T_Palette));
data/grafx2-2.7/src/main.c:233: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(temp_palette, backup_palette, sizeof(T_Palette));
data/grafx2-2.7/src/main.c:466:19:  [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).
          scale = atoi(argv[index]);
data/grafx2-2.7/src/main.c:486:19:  [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).
          scale = atoi(argv[index]);
data/grafx2-2.7/src/main.c:517:27:  [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).
          setsize_width = atoi(argv[index]);
data/grafx2-2.7/src/main.c:526: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).
          setsize_height = atoi(++tmpcp);
data/grafx2-2.7/src/main.c:583:29:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
#define CT_ASSERT(e) extern char (*ct_assert(void)) [sizeof(char[1 - 2*!(e)])]
data/grafx2-2.7/src/main.c:618: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 * filenames[2] = {NULL, NULL};
data/grafx2-2.7/src/main.c:619:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char * directories[2] = {NULL, NULL};
data/grafx2-2.7/src/main.c:962: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(Main.palette, Gfx->Default_palette, sizeof(T_Palette));
data/grafx2-2.7/src/main.c:1063: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(Main.backups->Pages->Gradients->Range, initial_gradients.Range, sizeof(initial_gradients.Range));
data/grafx2-2.7/src/main.c:1064: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(Spare.backups->Pages->Gradients->Range, initial_gradients.Range, sizeof(initial_gradients.Range));
data/grafx2-2.7/src/main.c:1172:17:  [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(Spare.palette, Main.palette, sizeof(T_Palette));
data/grafx2-2.7/src/main.c:1410: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 arg_buffer[4096];
data/grafx2-2.7/src/main.c:1411: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 * argv[64] = {NULL};
data/grafx2-2.7/src/misc.c:184: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(Current_palette, palette, sizeof(T_Palette));
data/grafx2-2.7/src/misc.c:270: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(edi,esi,width);
data/grafx2-2.7/src/misc.c:356: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(dest,src,Brush_width);
data/grafx2-2.7/src/misc.c:653: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(dest,src,length);
data/grafx2-2.7/src/misc.c:654: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(dest - x_offset,src+length,x_offset);
data/grafx2-2.7/src/misc.c:666: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(dest,src,length);
data/grafx2-2.7/src/misc.c:667: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(dest - x_offset,src+length,x_offset);
data/grafx2-2.7/src/misc.c:849: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 str[24];
data/grafx2-2.7/src/misc.c:852: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(str, "%dx%d", Video_mode[mode].Width, Video_mode[mode].Height);
data/grafx2-2.7/src/misc.h:137:24:  [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.
#define Dec2str(a,b,c) sprintf(b,"%.*f",c,(double)(a))
data/grafx2-2.7/src/miscfileformats.c:60:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[32];
data/grafx2-2.7/src/miscfileformats.c:103: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[16];
data/grafx2-2.7/src/miscfileformats.c:142: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[256];
data/grafx2-2.7/src/miscfileformats.c:292:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(context->Palette, palette_64, sizeof(T_Palette));
data/grafx2-2.7/src/miscfileformats.c:297: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[16];
data/grafx2-2.7/src/miscfileformats.c:408: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 Ident[3];    // String "PKM" }
data/grafx2-2.7/src/miscfileformats.c:579:11:  [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(context->Palette,header.Palette,sizeof(T_Palette));
data/grafx2-2.7/src/miscfileformats.c:711: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(header.Ident,"PKM",3);
data/grafx2-2.7/src/miscfileformats.c:716: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(header.Palette,context->Palette,sizeof(T_Palette));
data/grafx2-2.7/src/miscfileformats.c:1128:7:  [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(header2.Signature,"KiSS",4); // Initialisation de la signature
data/grafx2-2.7/src/miscfileformats.c:1398:7:  [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(header2.Signature,"KiSS",4); // Initialisation de la signature
data/grafx2-2.7/src/miscfileformats.c:1615:13:  [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(
data/grafx2-2.7/src/motoformats.c:390:15:  [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(context->Comment, vram_couleur + 8032, 32);
data/grafx2-2.7/src/motoformats.c:489:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    file = fopen(path, "rb");
data/grafx2-2.7/src/motoformats.c:644: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(packed+dst, unpacked+src, 255);
data/grafx2-2.7/src/motoformats.c:651: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(packed+dst, unpacked+src, count);
data/grafx2-2.7/src/motoformats.c:775:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(packed+dst, unpacked+src, 255);
data/grafx2-2.7/src/motoformats.c:782:7:  [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(packed+dst, unpacked+src, count);
data/grafx2-2.7/src/motoformats.c:808: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_info[24];
data/grafx2-2.7/src/motoformats.c:1237:7:  [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(vram_couleur + 8000, vram_forme + 8000, 64);
data/grafx2-2.7/src/mountlist.c:176:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
#undef open
data/grafx2-2.7/src/mountlist.c:586:10:  [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).
    fp = fopen (table, "r");
data/grafx2-2.7/src/mountlist.c:597:9:  [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 (me->me_devname, "/dev/");
data/grafx2-2.7/src/mountlist.c:608:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char typebuf[FSTYPSZ];
data/grafx2-2.7/src/mountlist.c:678:14:  [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).
    lockfd = open (MNTTAB_LOCK, O_RDONLY);
data/grafx2-2.7/src/mountlist.c:700:10:  [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).
    fp = fopen (table, "r");
data/grafx2-2.7/src/oldies.c:635: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(palette, pal, 48);
data/grafx2-2.7/src/oldies.c:714: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(palette, CPC_Hw_Palette, sizeof(CPC_Hw_Palette));
data/grafx2-2.7/src/oldies.c:761: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(palette + i,
data/grafx2-2.7/src/oldies.c:995:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static const unsigned char mo5palette[48] = {
data/grafx2-2.7/src/oldies.c:1003: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(palette, mo5palette, 48);
data/grafx2-2.7/src/oldies.c:1040: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(palette, hgr_palette, sizeof(hgr_palette));
data/grafx2-2.7/src/oldies.c:1064: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(palette, dhgr_palette, sizeof(dhgr_palette));
data/grafx2-2.7/src/oldies.c:1092: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(palette + 1, MSX_palette, sizeof(MSX_palette));
data/grafx2-2.7/src/operatio.c:156: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 str[6];
data/grafx2-2.7/src/operatio.c:173:9:  [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(str,"\xb1   0");
data/grafx2-2.7/src/operatio.c:187:9:  [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(str,"\xb1   0");
data/grafx2-2.7/src/operatio.c:830: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  str[5];
data/grafx2-2.7/src/operatio.c:1010: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  str[5];
data/grafx2-2.7/src/operatio.c:2820:7:  [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(Main_visible_image_backup.Image,
data/grafx2-2.7/src/operatio.c:3015: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  str[5];
data/grafx2-2.7/src/operatio.c:3528: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  str[5];
data/grafx2-2.7/src/pages.c:187: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(Main.palette,page->Palette,sizeof(T_Palette));
data/grafx2-2.7/src/pages.c:229:7:  [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(Main_visible_image_depth_buffer.Image,
data/grafx2-2.7/src/pages.c:243:12:  [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(Main.visible_image.Image,
data/grafx2-2.7/src/pages.c:344:10:  [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(Spare.visible_image.Image,
data/grafx2-2.7/src/pages.c:410: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(doc->backups->Pages->Palette, doc->palette, sizeof(T_Palette));
data/grafx2-2.7/src/pages.c:421: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(Spare.palette,page->Palette,sizeof(T_Palette));
data/grafx2-2.7/src/pages.c:836: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(Spare.backups->Pages->Palette,Main.palette,sizeof(T_Palette));
data/grafx2-2.7/src/pages.c:930: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(Main.backups->Pages->Palette, Main.backups->Pages->Next->Palette, sizeof(T_Palette));
data/grafx2-2.7/src/pages.c:955: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(Main_visible_image_backup.Image,
data/grafx2-2.7/src/pages.c:1136:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(Main.backups->Pages->Image[i].Pixels,
data/grafx2-2.7/src/pages.c:1160: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(
data/grafx2-2.7/src/pages.c:1192:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(Spare.backups->Pages->Image[i].Pixels,
data/grafx2-2.7/src/pages.c:1308: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(Main_visible_image_backup.Image,
data/grafx2-2.7/src/palette.c:259: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(backup_palette,working_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:281: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(backup_palette,working_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:282: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(temp_palette,working_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:293: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(temp_palette,backup_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:294: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(backup_palette,working_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:295: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(working_palette,temp_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:300: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(temp_palette,backup_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:301: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(backup_palette,working_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:302: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(working_palette,temp_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:310: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   str[4];
data/grafx2-2.7/src/palette.c:426: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(temp_palette, palette, sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:429: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(temp_usage, color_usage, sizeof(dword) * 256);
data/grafx2-2.7/src/palette.c:511: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(color_usage, temp_usage, sizeof(dword) * 256);
data/grafx2-2.7/src/palette.c:597: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  str[5];                // buffer d'affichage du compteur
data/grafx2-2.7/src/palette.c:820: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 str[5];
data/grafx2-2.7/src/palette.c:853: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 str[5];
data/grafx2-2.7/src/palette.c:1014: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 str[20];
data/grafx2-2.7/src/palette.c:1118: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  str[10];
data/grafx2-2.7/src/palette.c:1161: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(working_palette, Main.palette, sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:1340:17:  [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(temp_palette,working_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:1538:13:  [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(str,"\xb1  0");
data/grafx2-2.7/src/palette.c:1619:13:  [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(str,"\xb1  0");
data/grafx2-2.7/src/palette.c:1700:13:  [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(str,"\xb1  0");
data/grafx2-2.7/src/palette.c:1785:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(temp_palette,working_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:1804:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(temp_palette,working_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:1832:11:  [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(temp_palette,working_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:1883:11:  [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(working_palette+temp_color,backup_palette+block_start,
data/grafx2-2.7/src/palette.c:1885:11:  [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(temp_palette,working_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:1943:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(temp_palette,working_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:1979:17:  [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(temp_palette, Main.palette, sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:1980:17:  [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(Main.palette, working_palette, sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:1982:17:  [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(working_palette, Main.palette, sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:1983:17:  [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(Main.palette, temp_palette, sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:1989:13:  [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(temp_palette, working_palette, sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2026:11:  [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(temp_palette,Main.palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2027:11:  [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(Main.palette,working_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2029:11:  [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(working_palette,Main.palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2030:11:  [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(Main.palette,temp_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2112:13:  [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(str,"\xb1  0");
data/grafx2-2.7/src/palette.c:2133:13:  [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(str,"\xb1  0");
data/grafx2-2.7/src/palette.c:2154:13:  [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(str,"\xb1  0");
data/grafx2-2.7/src/palette.c:2238:13:  [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(str,"\xb1  0");
data/grafx2-2.7/src/palette.c:2259:13:  [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(str,"\xb1  0");
data/grafx2-2.7/src/palette.c:2280:13:  [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(str,"\xb1  0");
data/grafx2-2.7/src/palette.c:2304:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(temp_palette,working_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2355:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(temp_palette,working_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2527:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char str[7];
data/grafx2-2.7/src/palette.c:2568:13:  [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(temp_palette,working_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2615:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(backup_palette, Main.palette, sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2616:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(Main.palette, working_palette, sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2618:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(working_palette, Main.palette, sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2620:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(temp_palette,working_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2621:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(Main.palette, backup_palette, sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2627:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(backup_palette, Main.palette, sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2628:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(Main.palette, working_palette, sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2630:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(Main.palette, backup_palette, sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2731:11:  [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(temp_palette,Main.palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2732:11:  [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(Main.palette,working_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2734:11:  [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(working_palette,Main.palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2735:11:  [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(Main.palette,temp_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2737:11:  [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(temp_palette,working_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2815:13:  [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(temp_palette,working_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2854: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(Main.palette,working_palette,sizeof(T_Palette));
data/grafx2-2.7/src/palette.c:2901: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 str[8];
data/grafx2-2.7/src/palette.c:3093: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(Palette_clipboard, colors, nb_colors*sizeof(T_Components));
data/grafx2-2.7/src/palette.c:3112: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(palette+start_color, Palette_clipboard, nb_colors*sizeof(T_Components));
data/grafx2-2.7/src/pngformat.c:183: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(p, buffer->buffer + buffer->offset, count);
data/grafx2-2.7/src/pngformat.c:192:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(p, buffer->buffer + buffer->offset, available_count);
data/grafx2-2.7/src/pngformat.c:590: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->buffer + buffer->offset, p, count);
data/grafx2-2.7/src/pngformat.c:728:11:  [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(crng_chunk.name, "crNg",5);
data/grafx2-2.7/src/pxdouble.c:78: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(Get_Screen_pixel_ptr(0, y * ZOOMY + 1), Get_Screen_pixel_ptr(0, y * ZOOMY), width * ZOOMX);
data/grafx2-2.7/src/pxdouble.c:311: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(Get_Screen_pixel_ptr(x_pos * ZOOMX, y_pos * ZOOMY), line, width*ZOOMX);
data/grafx2-2.7/src/pxdouble.c:312: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(Get_Screen_pixel_ptr(x_pos * ZOOMX, y_pos * ZOOMY + 1), line, width*ZOOMX);
data/grafx2-2.7/src/pxdouble.c:350: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(line, Get_Screen_pixel_ptr(x_pos * ZOOMX, y_pos * ZOOMY), width*ZOOMX);
data/grafx2-2.7/src/pxdouble.c:415:7:  [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(Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY + 1), Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY), width*ZOOMX*Main.magnifier_factor);
data/grafx2-2.7/src/pxquad.c:89: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(Get_Screen_pixel_ptr(0, y * ZOOMY + 1), Get_Screen_pixel_ptr(0, y * ZOOMY), width * ZOOMX);
data/grafx2-2.7/src/pxquad.c:91: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(Get_Screen_pixel_ptr(0, y * ZOOMY + 2), Get_Screen_pixel_ptr(0, y * ZOOMY), width * ZOOMX);
data/grafx2-2.7/src/pxquad.c:93: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(Get_Screen_pixel_ptr(0, y * ZOOMY + 3), Get_Screen_pixel_ptr(0, y * ZOOMY), width * ZOOMX);
data/grafx2-2.7/src/pxquad.c:370: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(Get_Screen_pixel_ptr(+x_pos*ZOOMX, y_pos*ZOOMY), line, width*ZOOMX);
data/grafx2-2.7/src/pxquad.c:371: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(Get_Screen_pixel_ptr(+x_pos*ZOOMX, y_pos*ZOOMY+1), line, width*ZOOMX);
data/grafx2-2.7/src/pxquad.c:372: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(Get_Screen_pixel_ptr(+x_pos*ZOOMX, y_pos*ZOOMY+2), line, width*ZOOMX);
data/grafx2-2.7/src/pxquad.c:373: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(Get_Screen_pixel_ptr(+x_pos*ZOOMX, y_pos*ZOOMY+3), line, width*ZOOMX);
data/grafx2-2.7/src/pxquad.c:417: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(line, Get_Screen_pixel_ptr(x_pos * ZOOMX, y_pos * ZOOMY), width*ZOOMX);
data/grafx2-2.7/src/pxquad.c:496:7:  [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(Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY + 1), Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY), width*ZOOMX*Main.magnifier_factor);
data/grafx2-2.7/src/pxquad.c:498:7:  [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(Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY + 2), Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY), width*ZOOMX*Main.magnifier_factor);
data/grafx2-2.7/src/pxquad.c:500:7:  [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(Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY + 3), Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY), width*ZOOMX*Main.magnifier_factor);
data/grafx2-2.7/src/pxsimple.c:62: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(dest,src,width);
data/grafx2-2.7/src/pxsimple.c:205: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(dest,src,width);
data/grafx2-2.7/src/pxsimple.c:269: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(dest, line, width);
data/grafx2-2.7/src/pxsimple.c:293: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(line, Get_Screen_pixel_ptr(x_pos, y_pos), width);
data/grafx2-2.7/src/pxtall.c:66: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(Get_Screen_pixel_ptr(0, y * ZOOMY), src, width);
data/grafx2-2.7/src/pxtall.c:67: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(Get_Screen_pixel_ptr(0, y * ZOOMY + 1), src, width);
data/grafx2-2.7/src/pxtall.c:221: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(dest,src,width);
data/grafx2-2.7/src/pxtall.c:223: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(dest,src,width);
data/grafx2-2.7/src/pxtall.c:287: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(Get_Screen_pixel_ptr(x_pos * ZOOMX, y_pos * ZOOMY), line, width);
data/grafx2-2.7/src/pxtall.c:288: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(Get_Screen_pixel_ptr(x_pos * ZOOMX, y_pos * ZOOMY + 1), line, width);
data/grafx2-2.7/src/pxtall.c:293: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(line, Get_Screen_pixel_ptr(x_pos * ZOOMX, y_pos * ZOOMY), width);
data/grafx2-2.7/src/pxtall.c:358:7:  [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(Get_Screen_pixel_ptr(x_pos, y * ZOOMY + 1), Get_Screen_pixel_ptr(x_pos, y * ZOOMY), width*Main.magnifier_factor);
data/grafx2-2.7/src/pxtall2.c:80: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(Get_Screen_pixel_ptr(0, y * ZOOMY + 1), Get_Screen_pixel_ptr(0, y * ZOOMY), width * ZOOMX);
data/grafx2-2.7/src/pxtall2.c:82: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(Get_Screen_pixel_ptr(0, y * ZOOMY + 2), Get_Screen_pixel_ptr(0, y * ZOOMY), width * ZOOMX);
data/grafx2-2.7/src/pxtall2.c:84: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(Get_Screen_pixel_ptr(0, y * ZOOMY + 3), Get_Screen_pixel_ptr(0, y * ZOOMY), width * ZOOMX);
data/grafx2-2.7/src/pxtall2.c:346: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(Get_Screen_pixel_ptr(+x_pos*ZOOMX, y_pos*ZOOMY), line, width*ZOOMX);
data/grafx2-2.7/src/pxtall2.c:347: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(Get_Screen_pixel_ptr(+x_pos*ZOOMX, y_pos*ZOOMY+1), line, width*ZOOMX);
data/grafx2-2.7/src/pxtall2.c:348: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(Get_Screen_pixel_ptr(+x_pos*ZOOMX, y_pos*ZOOMY+2), line, width*ZOOMX);
data/grafx2-2.7/src/pxtall2.c:349: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(Get_Screen_pixel_ptr(+x_pos*ZOOMX, y_pos*ZOOMY+3), line, width*ZOOMX);
data/grafx2-2.7/src/pxtall2.c:393: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(line, Get_Screen_pixel_ptr(x_pos * ZOOMX, y_pos * ZOOMY), width*ZOOMX);
data/grafx2-2.7/src/pxtall2.c:471:7:  [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(Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY + 1), Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY), width*ZOOMX*Main.magnifier_factor);
data/grafx2-2.7/src/pxtall2.c:473:7:  [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(Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY + 2), Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY), width*ZOOMX*Main.magnifier_factor);
data/grafx2-2.7/src/pxtall2.c:475:7:  [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(Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY + 3), Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY), width*ZOOMX*Main.magnifier_factor);
data/grafx2-2.7/src/pxtall3.c:84: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(Get_Screen_pixel_ptr(0, y * ZOOMY + 1), Get_Screen_pixel_ptr(0, y * ZOOMY), width * ZOOMX);
data/grafx2-2.7/src/pxtall3.c:86: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(Get_Screen_pixel_ptr(0, y * ZOOMY + 2), Get_Screen_pixel_ptr(0, y * ZOOMY), width * ZOOMX);
data/grafx2-2.7/src/pxtall3.c:88: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(Get_Screen_pixel_ptr(0, y * ZOOMY + 3), Get_Screen_pixel_ptr(0, y * ZOOMY), width * ZOOMX);
data/grafx2-2.7/src/pxtall3.c:354: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(Get_Screen_pixel_ptr(+x_pos*ZOOMX, y_pos*ZOOMY), line, width*ZOOMX);
data/grafx2-2.7/src/pxtall3.c:355: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(Get_Screen_pixel_ptr(+x_pos*ZOOMX, y_pos*ZOOMY+1), line, width*ZOOMX);
data/grafx2-2.7/src/pxtall3.c:356: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(Get_Screen_pixel_ptr(+x_pos*ZOOMX, y_pos*ZOOMY+2), line, width*ZOOMX);
data/grafx2-2.7/src/pxtall3.c:357: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(Get_Screen_pixel_ptr(+x_pos*ZOOMX, y_pos*ZOOMY+3), line, width*ZOOMX);
data/grafx2-2.7/src/pxtall3.c:397: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(line, Get_Screen_pixel_ptr(x_pos * ZOOMX, y_pos * ZOOMY), width*ZOOMX);
data/grafx2-2.7/src/pxtall3.c:476:7:  [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(Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY + 1), Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY), width*ZOOMX*Main.magnifier_factor);
data/grafx2-2.7/src/pxtall3.c:478:7:  [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(Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY + 2), Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY), width*ZOOMX*Main.magnifier_factor);
data/grafx2-2.7/src/pxtall3.c:480:7:  [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(Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY + 3), Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY), width*ZOOMX*Main.magnifier_factor);
data/grafx2-2.7/src/pxtriple.c:81: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(Get_Screen_pixel_ptr(0, y * ZOOMY + 1), Get_Screen_pixel_ptr(0, y * ZOOMY), width * ZOOMX);
data/grafx2-2.7/src/pxtriple.c:83: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(Get_Screen_pixel_ptr(0, y * ZOOMY + 2), Get_Screen_pixel_ptr(0, y * ZOOMY), width * ZOOMX);
data/grafx2-2.7/src/pxtriple.c:333: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(Get_Screen_pixel_ptr(+x_pos*ZOOMX, y_pos*ZOOMY), line, width*ZOOMX);
data/grafx2-2.7/src/pxtriple.c:334: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(Get_Screen_pixel_ptr(+x_pos*ZOOMX, y_pos*ZOOMY+1), line, width*ZOOMX);
data/grafx2-2.7/src/pxtriple.c:335: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(Get_Screen_pixel_ptr(+x_pos*ZOOMX, y_pos*ZOOMY+2), line, width*ZOOMX);
data/grafx2-2.7/src/pxtriple.c:376: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(line, Get_Screen_pixel_ptr(x_pos * ZOOMX, y_pos * ZOOMY), width*ZOOMX);
data/grafx2-2.7/src/pxtriple.c:454:7:  [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(Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY + 1), Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY), width*ZOOMX*Main.magnifier_factor);
data/grafx2-2.7/src/pxtriple.c:456:7:  [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(Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY + 2), Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY), width*ZOOMX*Main.magnifier_factor);
data/grafx2-2.7/src/pxwide.c:287: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(Get_Screen_pixel_ptr(+x_pos*ZOOMX, y_pos*ZOOMY), line, width*ZOOMX);
data/grafx2-2.7/src/pxwide.c:325: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(line, Get_Screen_pixel_ptr(x_pos * ZOOMX, ZOOMY * y_pos), width*ZOOMX);
data/grafx2-2.7/src/pxwide2.c:80: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(Get_Screen_pixel_ptr(0, y * ZOOMY + 1), Get_Screen_pixel_ptr(0, y * ZOOMY), width * ZOOMX);
data/grafx2-2.7/src/pxwide2.c:326: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(Get_Screen_pixel_ptr(x_pos*ZOOMX, y_pos*ZOOMY), line, width*ZOOMX);
data/grafx2-2.7/src/pxwide2.c:327: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(Get_Screen_pixel_ptr(x_pos*ZOOMX, y_pos*ZOOMY+1), line, width*ZOOMX);
data/grafx2-2.7/src/pxwide2.c:366: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(line, Get_Screen_pixel_ptr(x_pos * ZOOMX, ZOOMY * y_pos), width*ZOOMX);
data/grafx2-2.7/src/pxwide2.c:444:7:  [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(Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY + 1), Get_Screen_pixel_ptr(x_pos * ZOOMX, y * ZOOMY), width*ZOOMX*Main.magnifier_factor);
data/grafx2-2.7/src/readini.c:494: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_label[1024];
data/grafx2-2.7/src/readini.c:513:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  file=fopen(filename,"r");
data/grafx2-2.7/src/readini.c:519:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    file=fopen(filename,"r");
data/grafx2-2.7/src/readini.c:841:11:  [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(conf->Bookmark_label[index], value_label, sizeof(conf->Bookmark_label[0]) - 1);
data/grafx2-2.7/src/readini.c:845:11:  [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(conf->Bookmark_label[index], value_label, size + 1);
data/grafx2-2.7/src/readline.c:148: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(dest, src, sizes);
data/grafx2-2.7/src/readline.c:166: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(dest, src, sizes*2);
data/grafx2-2.7/src/readline.c:269: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 cursor[2];
data/grafx2-2.7/src/readline.c:455: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 video_driver_name[32];
data/grafx2-2.7/src/readline.c:626: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 initial_string[256];
data/grafx2-2.7/src/readline.c:627: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 display_string[256];
data/grafx2-2.7/src/readline.c:667: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).
      snprintf(str,10,"%d",atoi(str)); // align left
data/grafx2-2.7/src/readline.c:751:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          char label[2]=" ";
data/grafx2-2.7/src/readline.c:804: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(initial_string_unicode, str_unicode, 2*(size+1));
data/grafx2-2.7/src/readline.c:992:11:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
      i = MultiByteToWideChar(CP_UTF8, 0, Key_Text, -1, (LPWSTR)unicode_text, sizeof(unicode_text)/sizeof(word));
data/grafx2-2.7/src/readline.c:1283: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(str,"%.*f",decimal_places, value);
data/grafx2-2.7/src/realpath.c:52:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        int fd = open("", O_RDONLY); // GrafX2 is compiled without Unix support
data/grafx2-2.7/src/realpath.c:54:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        int fd = open(".", O_RDONLY);
data/grafx2-2.7/src/realpath.c:57:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char current_dir_path[PATH_MAX];
data/grafx2-2.7/src/realpath.c:58:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char path[PATH_MAX], lnk[PATH_MAX], *tmp = (char *)"";
data/grafx2-2.7/src/recoil.c:15: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(p, str, len);
data/grafx2-2.7/src/recoil.c:27: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(*str + prefixLen, suffix, suffixLen + 1);
data/grafx2-2.7/src/recoil.c:2547: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(dest + destOffset, self->content + self->contentOffset, count);
data/grafx2-2.7/src/recoil.c:2614: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(unpacked + unpackedOffset, self->base.content + valueOffset, 4);
data/grafx2-2.7/src/recoil.c:3753: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(unpacked, content + contentOffset, unpackedLength);
data/grafx2-2.7/src/recoil.c:4686: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(unpacked + unpackedOffset, self->content + self->contentOffset, length);
data/grafx2-2.7/src/recoil.c:4733: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(unpacked + unpackedOffset, unpacked + unpackedOffset + offset, length);
data/grafx2-2.7/src/recoil.c:7440: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(screen + y * 32, content + y * 33, 32);
data/grafx2-2.7/src/recoil.c:10605: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(unpacked + unpackedOffset, unpacked + unpackedOffset - 80, 80);
data/grafx2-2.7/src/recoil.c:10618: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(unpacked, content + 15, 32000);
data/grafx2-2.7/src/recoil.c:10645:6:  [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(unpacked + unpackedOffset + i, content + contentOffset, 2);
data/grafx2-2.7/src/recoil.c:10652: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(unpacked + unpackedOffset, content + contentOffset, 80);
data/grafx2-2.7/src/recoil.c:10684: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(unpacked + unpackedOffset, content + valueOffset, count);
data/grafx2-2.7/src/recoil.c:10691: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(unpacked + unpackedOffset + offset, content + valueOffset, 8);
data/grafx2-2.7/src/recoil.c:10698: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(unpacked + unpackedOffset, content + valueOffset, count);
data/grafx2-2.7/src/recoil.c:11183: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(unpacked + unpackedOffset, content + contentOffset - bitplanes, bitplanes);
data/grafx2-2.7/src/recoil.c:11385: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(unpacked + (offset << 1), content + contentOffset + 4, bitplanes << 1);
data/grafx2-2.7/src/recoil.c:11397: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(unpacked + (offset << 1), content + contentOffset, bitplanes << 1);
data/grafx2-2.7/src/recoil.c:11860: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(unpacked, content + stream->base.contentStart + 160, bitmapLength);
data/grafx2-2.7/src/recoil.c:11880: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(unpacked + bitmapLength, content + paletteOffset, paletteLength);
data/grafx2-2.7/src/recoil.c:15297: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(unpacked, content + headerLength, unpackedLength);
data/grafx2-2.7/src/recoil.c:15395: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(unpacked, content, 7680);
data/grafx2-2.7/src/recoil.c:15557: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(bitmap, content + 6, 3839);
data/grafx2-2.7/src/recoil.c:15827: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(font, CiResource_atari8_fnt, 1024);
data/grafx2-2.7/src/saveini.c:162:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(dest+dest_index,"yes",3);
data/grafx2-2.7/src/saveini.c:169:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(dest+dest_index,"no",2);
data/grafx2-2.7/src/saveini.c:185:9:  [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(dest+dest_index+1,"%x",values[value_index]);
data/grafx2-2.7/src/saveini.c:192:9:  [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(dest+dest_index,"%d",values[value_index]);
data/grafx2-2.7/src/saveini.c:452:14:  [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).
  old_file = fopen(ref_ini_file, "r");
data/grafx2-2.7/src/saveini.c:477:14:  [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).
  new_file = fopen(filename, "w");
data/grafx2-2.7/src/sdlscreen.c:227:6:  [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(pixels + line * pitch, (const byte *)RGBcopy->pixels + source_rect.x * 4 + (source_rect.y+line)* RGBcopy->pitch, source_rect.w * 4 );
data/grafx2-2.7/src/sdlscreen.c:394: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(dest_ptr, src,source->w);
data/grafx2-2.7/src/setup.c:103: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 path[1024]={0};
data/grafx2-2.7/src/setup.c:121: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 path[PATH_MAX];
data/grafx2-2.7/src/setup.c:267: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.
          static char parent[MAX_PATH_CHARACTERS];
data/grafx2-2.7/src/shade.c:190: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 str[4];
data/grafx2-2.7/src/shade.c:194: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(str,"   ");
data/grafx2-2.7/src/shade.c:204: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 str[4];
data/grafx2-2.7/src/shade.c:207: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(str,"   ");
data/grafx2-2.7/src/shade.c:217: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 str[7];
data/grafx2-2.7/src/shade.c:222: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(str,"Normal");
data/grafx2-2.7/src/shade.c:225: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(str," Loop ");
data/grafx2-2.7/src/shade.c:228: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(str,"No sat");
data/grafx2-2.7/src/shade.c:385: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(temp_shade,Shade_list[Shade_current].List,512*sizeof(word));
data/grafx2-2.7/src/shade.c:439: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 str[4]; // str d'affichage du n° de shade actif et du Pas
data/grafx2-2.7/src/shade.c:525: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     ,Shade_list[Shade_current].List,512*sizeof(word));
data/grafx2-2.7/src/shade.c:526: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(undo_buffer,Shade_list[Shade_current].List,512*sizeof(word));
data/grafx2-2.7/src/shade.c:601:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(undo_buffer,Shade_list[Shade_current].List,512*sizeof(word));
data/grafx2-2.7/src/shade.c:627:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buffer,Shade_list[Shade_current].List,512*sizeof(word));
data/grafx2-2.7/src/shade.c:632:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(undo_buffer,Shade_list[Shade_current].List,512*sizeof(word));
data/grafx2-2.7/src/shade.c:634:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(Shade_list[Shade_current].List,buffer,512*sizeof(word));
data/grafx2-2.7/src/shade.c:642:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(undo_buffer,Shade_list[Shade_current].List,512*sizeof(word));
data/grafx2-2.7/src/shade.c:694:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(undo_buffer,Shade_list[Shade_current].List,512*sizeof(word));
data/grafx2-2.7/src/shade.c:708:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(undo_buffer,Shade_list[Shade_current].List,512*sizeof(word));
data/grafx2-2.7/src/shade.c:754:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(undo_buffer,Shade_list[Shade_current].List,512*sizeof(word));
data/grafx2-2.7/src/shade.c:784:11:  [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(undo_buffer,Shade_list[Shade_current].List,512*sizeof(word));
data/grafx2-2.7/src/shade.c:811:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(undo_buffer,Shade_list[Shade_current].List,512*sizeof(word));
data/grafx2-2.7/src/shade.c:840:14:  [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).
        temp=atoi(str);
data/grafx2-2.7/src/shade.c:859:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(temp_ptr,undo_buffer,512*sizeof(word));
data/grafx2-2.7/src/shade.c:860:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(undo_buffer,Shade_list[Shade_current].List,512*sizeof(word));
data/grafx2-2.7/src/shade.c:861:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(Shade_list[Shade_current].List,temp_ptr,512*sizeof(word));
data/grafx2-2.7/src/shade.c:869:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(undo_buffer,Shade_list[Shade_current].List,512*sizeof(word));
data/grafx2-2.7/src/shade.c:1014: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(initial_shade_list,Shade_list,sizeof(Shade_list));
data/grafx2-2.7/src/shade.c:1054: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 str[4];
data/grafx2-2.7/src/shade.c:1092:14:  [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).
        temp=atoi(str);
data/grafx2-2.7/src/stformats.c:1275:13:  [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+dst, data+src, count * 2);
data/grafx2-2.7/src/stformats.c:1441:7:  [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(data + dc * 2, buffer + src, count * 2);
data/grafx2-2.7/src/stformats.c:1450:7:  [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(data + dc * 2, buffer + src, count * 2);
data/grafx2-2.7/src/struct.h:193: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 Short_name[36];  ///< Name to display. limited to 35 characters (used in factory.c)
data/grafx2-2.7/src/struct.h:194: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 Full_name[1];    ///< Filesystem value.
data/grafx2-2.7/src/struct.h:302:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char Signature[3]; ///< Signature for the file format. "CFG".
data/grafx2-2.7/src/struct.h:368: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 *Bookmark_directory[NB_BOOKMARKS];///< Bookmarked directories in fileselectors: This is the full directory name.
data/grafx2-2.7/src/struct.h:369: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 Bookmark_label[NB_BOOKMARKS][24]; ///< Bookmarked directories in fileselectors: This is the displayed name.
data/grafx2-2.7/src/struct.h:414: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      Comment[COMMENT_SIZE+1]; ///< Comment to store in the image file.
data/grafx2-2.7/src/text.c:84: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[22];
data/grafx2-2.7/src/text.c:166:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char strFontName[512];
data/grafx2-2.7/src/text.c:312: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 type[3] = { ' ', ' ', '\0' };
data/grafx2-2.7/src/text.c:386:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      const char *font_path_list[3] = {
data/grafx2-2.7/src/text.c:609: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(palette, Main.palette, sizeof(T_Palette));
data/grafx2-2.7/src/text.c:709: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(palette, Main.palette, sizeof(T_Palette));
data/grafx2-2.7/src/text.c:761: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(palette, font_surface->palette, sizeof(T_Palette));
data/grafx2-2.7/src/tifformat.c:70: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 format[256];
data/grafx2-2.7/src/tifformat.c:77: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 format[256];
data/grafx2-2.7/src/tifformat.c:120: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[4];
data/grafx2-2.7/src/tifformat.c:362:7:  [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(context->Comment, desc, len + 1);
data/grafx2-2.7/src/tifformat.c:365:7:  [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(context->Comment, desc, COMMENT_SIZE);
data/grafx2-2.7/src/tifformat.c:487: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(data, mbuffer->buffer + mbuffer->offset, size);
data/grafx2-2.7/src/tifformat.c:507: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(mbuffer->buffer + mbuffer->offset, data, size);
data/grafx2-2.7/src/tifformat.c:645: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 version[64];
data/grafx2-2.7/src/tiles.c:343:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char   str[8];
data/grafx2-2.7/src/transform.c:83:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[5];
data/grafx2-2.7/src/transform.c:284:45:  [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).
          *(input_value[clicked_button-10])=atoi(buffer);
data/grafx2-2.7/src/transform.c:393:13:  [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(Main.backups->Pages->Image[i].Pixels,Main.backups->Pages->Next->Image[i].Pixels,Main.image_width*Main.image_height);
data/grafx2-2.7/src/transform.c:400:13:  [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(Main.backups->Pages->Image[i].Pixels,Main.backups->Pages->Next->Image[i].Pixels,Main.image_width*Main.image_height);
data/grafx2-2.7/src/transform.c:419:13:  [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(Main.backups->Pages->Image[i].Pixels,Main.backups->Pages->Next->Image[i].Pixels,Main.image_width*Main.image_height);
data/grafx2-2.7/src/unicode.c:49: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(new_str, str, byte_size);
data/grafx2-2.7/src/win32screen.c:338:9:  [2] (buffer) TCHAR:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        TCHAR LongDropFileName[MAX_PATH];
data/grafx2-2.7/src/win32screen.c:339:9:  [2] (buffer) TCHAR:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        TCHAR ShortDropFileName[MAX_PATH];
data/grafx2-2.7/src/windows.c:611: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 str[24];
data/grafx2-2.7/src/windows.c:634: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 str[4];
data/grafx2-2.7/src/windows.c:1040: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 temp[5];
data/grafx2-2.7/src/windows.c:1386: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 display_string[36+1];
data/grafx2-2.7/src/windows.c:1436: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 str[10];
data/grafx2-2.7/src/windows.c:1447: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(str, "%d", initial_value);
data/grafx2-2.7/src/windows.c:1470: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).
  return clicked_button==2?-1:atoi(str);
data/grafx2-2.7/src/windows.c:1483: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 hint[38];
data/grafx2-2.7/src/windows.c:1541:13:  [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(hint, choices[i].hint, MIN(37, strlen(choices[i].hint)));
data/grafx2-2.7/src/windows.c:1592:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char message[400]; // This is enough for 10 lines of text in 320x200
data/grafx2-2.7/src/windows.c:1609: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[36];
data/grafx2-2.7/src/x11screen.c:81: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.
    static const char blank_data[1] = { 0 };
data/grafx2-2.7/src/x11screen.c:246: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(screen->palette + firstcolor, colors, ncolors * sizeof(T_Components));
data/grafx2-2.7/src/6502.c:60:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	object->read (object->context, (zuint16)(address))
data/grafx2-2.7/src/6502.c:887:55:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		{Z_EMULATOR_FUNCTION_READ_8BIT,  Z_OFFSET_OF(M6502, read )},
data/grafx2-2.7/src/6502.h:59:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	zuint8 (* read)(void *context, zuint16 address);
data/grafx2-2.7/src/buttons.c:1224:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  fname+=strlen(FONT_PREFIX); // Omit file prefix
data/grafx2-2.7/src/buttons.c:1225:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  length=strlen(fname) - 4; // assume .png extension
data/grafx2-2.7/src/buttons.c:1244: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).
  namelength = strlen(fname);
data/grafx2-2.7/src/buttons.c:1245:75:  [1] (buffer) strlen:
  Does not handle 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 (namelength>=10 && fname[0]!='_' && !strncasecmp(fname, SKIN_PREFIX, strlen(SKIN_PREFIX))
data/grafx2-2.7/src/buttons.c:1254:63:  [1] (buffer) strlen:
  Does not handle 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 (namelength>=10 && !strncasecmp(fname, FONT_PREFIX, strlen(FONT_PREFIX))
data/grafx2-2.7/src/buttons.c:1474: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).
            fontName->Short_name,(byte)strlen(fontName->Short_name) ,MC_Black,MC_Light);
data/grafx2-2.7/src/buttons.c:3467: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).
  len = strlen(filename);
data/grafx2-2.7/src/buttons.c:3526: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).
    size_t len = strlen(Main.backups->Pages->Filename);
data/grafx2-2.7/src/c64formats.c:1633:76:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  GFX2_Log(GFX2_DEBUG, "Save_C64() extension : %s\n", context->File_name + strlen(context->File_name) - 4);
data/grafx2-2.7/src/c64formats.c:1634: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 (strcasecmp(context->File_name + strlen(context->File_name) - 4, ".fli") == 0)
data/grafx2-2.7/src/engine.c:1751: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).
  title_length = strlen(title);
data/grafx2-2.7/src/engine.c:1900: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).
  text_x_pos=x_pos+( (width-(strlen(title)<<3)+1) >>1 );
data/grafx2-2.7/src/engine.c:2727: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).
          Print_in_menu(str,strlen(Buttons_Pool[BUTTON_CHOOSE_COL].Tooltip));
data/grafx2-2.7/src/engine.c:2729: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).
          Print_general((26+((d+strlen(Buttons_Pool[BUTTON_CHOOSE_COL].Tooltip))<<3))*Menu_factor_X,
data/grafx2-2.7/src/factory.c:1041: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).
  caption_length = strlen(window_caption);
data/grafx2-2.7/src/factory.c:1050: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).
    label_length=strlen(label[setting]);
data/grafx2-2.7/src/factory.c:1310: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).
  caption_length = strlen(window_caption);
data/grafx2-2.7/src/factory.c:1317: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(label[button]) > max_label_length)
data/grafx2-2.7/src/factory.c:1318: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).
      max_label_length = strlen(label[button]);
data/grafx2-2.7/src/factory.c:1714: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(valuetext)>255)
data/grafx2-2.7/src/factory.c:1881: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).
  len=strlen(msg);
data/grafx2-2.7/src/factory.c:1891:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(msg2, msg, 24);
data/grafx2-2.7/src/factory.c:2259:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        c = fgetc(script_file);
data/grafx2-2.7/src/factory.c:2286:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          c = fgetc(script_file);
data/grafx2-2.7/src/factory.c:2304:64:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        Print_help(8+4*6, FILESEL_Y + 89+24, shortcut, 'K', 0, strlen(shortcut));
data/grafx2-2.7/src/factory.c:2327: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).
    len=strlen(file_name);
data/grafx2-2.7/src/factory.c:2408: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).
  path = GFX2_malloc(strlen(Data_directory) + strlen(SCRIPTS_SUBDIRECTORY) + strlen(LUALIB_SUBDIRECTORY) + 5 + 3 * strlen(PATH_SEPARATOR) + 9 + 1);
data/grafx2-2.7/src/factory.c:2408: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).
  path = GFX2_malloc(strlen(Data_directory) + strlen(SCRIPTS_SUBDIRECTORY) + strlen(LUALIB_SUBDIRECTORY) + 5 + 3 * strlen(PATH_SEPARATOR) + 9 + 1);
data/grafx2-2.7/src/factory.c:2408:78:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  path = GFX2_malloc(strlen(Data_directory) + strlen(SCRIPTS_SUBDIRECTORY) + strlen(LUALIB_SUBDIRECTORY) + 5 + 3 * strlen(PATH_SEPARATOR) + 9 + 1);
data/grafx2-2.7/src/factory.c:2408:116:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  path = GFX2_malloc(strlen(Data_directory) + strlen(SCRIPTS_SUBDIRECTORY) + strlen(LUALIB_SUBDIRECTORY) + 5 + 3 * strlen(PATH_SEPARATOR) + 9 + 1);
data/grafx2-2.7/src/factory.c:2421: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).
  memmove(path + 9, path, strlen(path) + 1);
data/grafx2-2.7/src/factory.c:2772: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).
    q = Config.Scripts_directory == NULL ? 0 : strlen(Config.Scripts_directory);
data/grafx2-2.7/src/fileformats.c:510: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).
            if (strlen(ToolType) > 4 && ToolType[0] == 'I' && ToolType[1] == 'M' && ToolType[3] == '=')
data/grafx2-2.7/src/fileformats.c:667: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).
              if (strlen(ToolType) > 1)
data/grafx2-2.7/src/fileformats.c:676:19:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                  strncpy(context->Comment, ToolType, COMMENT_SIZE);
data/grafx2-2.7/src/fileformats.c:2503: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).
  last_char = strlen(context->File_name) - 1;
data/grafx2-2.7/src/filesel.c:303: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).
    size_t inbytesleft = strlen(fname);
data/grafx2-2.7/src/filesel.c:395: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).
  full_name_len = strlen(full_name) + 1;
data/grafx2-2.7/src/filesel.c:396: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).
  short_name_len = strlen(short_name) + 1;
data/grafx2-2.7/src/filesel.c:686:9:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
        strcat( tmp, ":" );
data/grafx2-2.7/src/filesel.c:1220: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).
    size_t inbytesleft = strlen(Config.Bookmark_label[bookmark_number]);
data/grafx2-2.7/src/filesel.c:1238: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).
      label_size = strlen(Config.Bookmark_label[bookmark_number]);
data/grafx2-2.7/src/filesel.c:1309: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).
    size_t inbytesleft = strlen(input);
data/grafx2-2.7/src/filesel.c:1322: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).
    length = strlen(converted_name);
data/grafx2-2.7/src/filesel.c:1361:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(filename, Selector->filename, sizeof(filename));
data/grafx2-2.7/src/filesel.c:1368: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).
    size_t inbytesleft = strlen(Selector->filename);
data/grafx2-2.7/src/filesel.c:2081:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy(filename_ansi, Selector->filename, sizeof(filename_ansi));
data/grafx2-2.7/src/filesel.c:2087: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 (Selector->filename != NULL && strlen(Selector->filename) > 0)
data/grafx2-2.7/src/filesel.c:2092: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).
          filename_length = strlen(Selector->filename);
data/grafx2-2.7/src/filesel.c:2159:15:  [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(filename_ansi, ".");
data/grafx2-2.7/src/filesel.c:2272:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(Config.Bookmark_label[clicked_button-10], directory_name, sizeof(Config.Bookmark_label[0]) - 1);
data/grafx2-2.7/src/filesel.c:2313:19:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                  strncpy(Config.Bookmark_label[clicked_button-10], directory_name, sizeof(Config.Bookmark_label[0]) - 1);
data/grafx2-2.7/src/generatedoc.c:181:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(title, p, sizeof(title));
data/grafx2-2.7/src/generatedoc.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).
        size_t len = strlen(title);
data/grafx2-2.7/src/generatedoc.c:191:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(title + len, table[index].Text, sizeof(title)-len-1);
data/grafx2-2.7/src/generatedoc.c:259: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).
            link_end = link + strlen(link);
data/grafx2-2.7/src/giformat.c:978: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).
              size_t len = strlen(label);
data/grafx2-2.7/src/giformat.c:994: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).
            Write_byte(GIF_file, (byte)strlen(context->Comment));
data/grafx2-2.7/src/giformat.c:995:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            Write_bytes(GIF_file,context->Comment,strlen(context->Comment)+1);
data/grafx2-2.7/src/giformat.c:1331: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).
              long name_size = 1+strlen(context->Original_file_name);
data/grafx2-2.7/src/giformat.c:1332: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).
              long dir_size = 1+strlen(context->Original_file_directory);
data/grafx2-2.7/src/help.c:419: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).
  width=strlen(line);
data/grafx2-2.7/src/help.c:544: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).
      link_size=strlen(hyperlink);
data/grafx2-2.7/src/help.c:546: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(line)+link_size-2>44)
data/grafx2-2.7/src/help.c:1007:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len = strlen(Main.selector.Directory);
data/grafx2-2.7/src/ifformat.c:2153: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).
      comment_size = strlen(context->Comment);  // NULL termination is not needed
data/grafx2-2.7/src/init.c:679: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).
  len = strlen(Data_directory) + strlen(SKINS_SUBDIRECTORY) + strlen(PATH_SEPARATOR) + strlen(skin_file) + 1;
data/grafx2-2.7/src/init.c:679: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).
  len = strlen(Data_directory) + strlen(SKINS_SUBDIRECTORY) + strlen(PATH_SEPARATOR) + strlen(skin_file) + 1;
data/grafx2-2.7/src/init.c:679:63:  [1] (buffer) strlen:
  Does not handle 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 = strlen(Data_directory) + strlen(SKINS_SUBDIRECTORY) + strlen(PATH_SEPARATOR) + strlen(skin_file) + 1;
data/grafx2-2.7/src/init.c:679:88:  [1] (buffer) strlen:
  Does not handle 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 = strlen(Data_directory) + strlen(SKINS_SUBDIRECTORY) + strlen(PATH_SEPARATOR) + strlen(skin_file) + 1;
data/grafx2-2.7/src/init.c:774: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).
  len = strlen(Data_directory) + strlen(SKINS_SUBDIRECTORY) + strlen(PATH_SEPARATOR) + strlen(font_name) + 1;
data/grafx2-2.7/src/init.c:774: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).
  len = strlen(Data_directory) + strlen(SKINS_SUBDIRECTORY) + strlen(PATH_SEPARATOR) + strlen(font_name) + 1;
data/grafx2-2.7/src/init.c:774:63:  [1] (buffer) strlen:
  Does not handle 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 = strlen(Data_directory) + strlen(SKINS_SUBDIRECTORY) + strlen(PATH_SEPARATOR) + strlen(font_name) + 1;
data/grafx2-2.7/src/init.c:774:88:  [1] (buffer) strlen:
  Does not handle 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 = strlen(Data_directory) + strlen(SKINS_SUBDIRECTORY) + strlen(PATH_SEPARATOR) + strlen(font_name) + 1;
data/grafx2-2.7/src/init.c:2281: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).
        size_t len = strlen(Bound_script[i]);
data/grafx2-2.7/src/init.c:2297: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).
        size_t len = strlen(Bound_script[i]);
data/grafx2-2.7/src/input.c:2173:7:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
      usleep(1000 * sleep_time);
data/grafx2-2.7/src/io.c:302: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).
  size_t len = dir == NULL ? 0 : strlen(dir);
data/grafx2-2.7/src/io.c:313: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).
    len += strlen(filename) + 1;
data/grafx2-2.7/src/io.c:322: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).
    len += strlen(PATH_SEPARATOR) + strlen(filename) + 1;
data/grafx2-2.7/src/io.c:322: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).
    len += strlen(PATH_SEPARATOR) + strlen(filename) + 1;
data/grafx2-2.7/src/io.c:370: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).
    size_t len = strlen(path);
data/grafx2-2.7/src/io.c:375: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).
      char * tmp = realloc(path, len + strlen(PATH_SEPARATOR) + 1);
data/grafx2-2.7/src/io.c:384: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).
                 (unsigned long)(len + strlen(PATH_SEPARATOR) + 1));
data/grafx2-2.7/src/io.c:409: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).
    len=strlen(path);
data/grafx2-2.7/src/io.c:449: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).
    len=strlen(path);
data/grafx2-2.7/src/io.c:459: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).
      len+=strlen(PATH_SEPARATOR);
data/grafx2-2.7/src/io.c:672: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).
  len = strlen(directory_name) + 3;
data/grafx2-2.7/src/io.c:723: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).
      size_t inbytesleft = strlen(entry->d_name);
data/grafx2-2.7/src/io.c:788:53:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  shortPath = (WCHAR *)GFX2_malloc(sizeof(WCHAR) * (strlen(filename) + strlen(directory) + 2));
data/grafx2-2.7/src/io.c:788:72:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  shortPath = (WCHAR *)GFX2_malloc(sizeof(WCHAR) * (strlen(filename) + strlen(directory) + 2));
data/grafx2-2.7/src/io.c:822:11:  [1] (buffer) wcslen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = wcslen(sep) + 1;
data/grafx2-2.7/src/io.c:833: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).
  size_t inbytesleft = strlen(filename);
data/grafx2-2.7/src/io.c:1072: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).
    size_t inbytesleft = strlen(ret);
data/grafx2-2.7/src/io.c:1186: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).
      len = strlen(path + i) + 1;
data/grafx2-2.7/src/io.c:1195: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).
      len = strlen(path + i - 1) + 1;
data/grafx2-2.7/src/io.c:1216: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).
  len = separator_count * (2 + strlen(PATH_SEPARATOR)) + strlen(path + last_separator + 1) + 1;
data/grafx2-2.7/src/io.c:1216:58:  [1] (buffer) strlen:
  Does not handle 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 = separator_count * (2 + strlen(PATH_SEPARATOR)) + strlen(path + last_separator + 1) + 1;
data/grafx2-2.7/src/io.c:1222:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(rel_path + i, path + last_separator + 1, len + 1 - i);
data/grafx2-2.7/src/keyboard.c:685: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).
      default: sprintf(buffer+strlen(buffer), "[B%d]", key-KEY_JOYBUTTON);return buffer;
data/grafx2-2.7/src/keyboard.c:697: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).
      sprintf(buffer+strlen(buffer), "%s", key_labels[index].Key_name);
data/grafx2-2.7/src/keyboard.c:705: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).
    sprintf(buffer+strlen(buffer), "'%c'", toupper(key));
data/grafx2-2.7/src/keyboard.c:713: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).
    sprintf(buffer+strlen(buffer), "w%d", key - SDLK_WORLD_0);
data/grafx2-2.7/src/keyboard.c:722: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).
    sprintf(buffer+strlen(buffer), "[%d]", key & 0x7FF);
data/grafx2-2.7/src/keyboard.c:728: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).
  sprintf(buffer+strlen(buffer), "0x%X", key);
data/grafx2-2.7/src/loadsave.c:2214: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).
    size_t len = strlen(Config_directory) + strlen(BACKUP_FILE_EXTENSION) + 1 + 6 + 1;
data/grafx2-2.7/src/loadsave.c:2214: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).
    size_t len = strlen(Config_directory) + strlen(BACKUP_FILE_EXTENSION) + 1 + 6 + 1;
data/grafx2-2.7/src/loadsavefuncs.c:62: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).
    len = strlen(context->File_directory) + strlen(PATH_SEPARATOR)
data/grafx2-2.7/src/loadsavefuncs.c:62: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).
    len = strlen(context->File_directory) + strlen(PATH_SEPARATOR)
data/grafx2-2.7/src/loadsavefuncs.c:124: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).
    len = strlen(context->File_directory) + strlen(PATH_SEPARATOR)
data/grafx2-2.7/src/loadsavefuncs.c:124: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).
    len = strlen(context->File_directory) + strlen(PATH_SEPARATOR)
data/grafx2-2.7/src/loadsavefuncs.c:125:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        + Unicode_strlen(context->File_name_unicode) + strlen(ext) + 1 + 1;
data/grafx2-2.7/src/loadsavefuncs.c:148:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
  strcat(filename, ".");
data/grafx2-2.7/src/loadsavefuncs.c:224: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).
    base_len = strlen(params->basename);
data/grafx2-2.7/src/miscfileformats.c:160: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).
    len = strlen(buffer);
data/grafx2-2.7/src/miscfileformats.c:183:17:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int c = getc(file);
data/grafx2-2.7/src/miscfileformats.c:207: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).
      len = strlen(buffer);
data/grafx2-2.7/src/miscfileformats.c:721: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).
  comment_size=strlen(context->Comment);
data/grafx2-2.7/src/motoformats.c:873:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
        strncpy(text_info, "No TO-SNAP extension.  ", sizeof(text_info));
data/grafx2-2.7/src/motoformats.c:875:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
        strncpy(text_info, "No palette to save.    ", sizeof(text_info));
data/grafx2-2.7/src/motoformats.c:1232:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy((char *)vram_forme + 8032, context->Comment, 32);
data/grafx2-2.7/src/mountlist.c:479: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).
                name = malloc (1 + strlen (d->d_name) + 1);
data/grafx2-2.7/src/mountlist.c:596: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).
        me->me_devname = xmalloc (strlen (mnt.mt_dev) + 6);
data/grafx2-2.7/src/mountlist.c:774: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).
            me->me_devname = xmalloc (strlen (host) + strlen (dir) + 2);
data/grafx2-2.7/src/mountlist.c:774: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).
            me->me_devname = xmalloc (strlen (host) + strlen (dir) + 2);
data/grafx2-2.7/src/mountlist.c:776:13:  [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 (me->me_devname, ":");
data/grafx2-2.7/src/pages.c:837:3:  [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(Spare.backups->Pages->Comment,"");
data/grafx2-2.7/src/palette.c:2540: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 length = strlen(str);
data/grafx2-2.7/src/pngformat.c:303:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(context->Comment, text_ptr[num_text].text, size);
data/grafx2-2.7/src/pngformat.c:309:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(context->Comment, text_ptr[num_text].text, size);
data/grafx2-2.7/src/pngformat.c:654: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).
            text_ptr[1].text_length=strlen(context->Comment);
data/grafx2-2.7/src/readini.c:68: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).
        memmove(str+index,str+index+1,strlen(str+index));
data/grafx2-2.7/src/readini.c:73: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).
      memmove(str+index,str+index+1,strlen(str+index));
data/grafx2-2.7/src/readini.c:836: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).
      size_t size = strlen(value_label);
data/grafx2-2.7/src/readini.c:852: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).
      size_t size = strlen(value_label);
data/grafx2-2.7/src/readline.c:139:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int sized = strlen(dest);
data/grafx2-2.7/src/readline.c:140:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int sizes = strlen(src);
data/grafx2-2.7/src/readline.c:504: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).
        size_t inbytesleft = strlen(utf8_str);
data/grafx2-2.7/src/readline.c:529: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).
        size_t inbytesleft = strlen(utf8_str);
data/grafx2-2.7/src/readline.c:820: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).
    size = strlen(str);
data/grafx2-2.7/src/readline.c:828:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(display_string, str + offset, visible_size);
data/grafx2-2.7/src/readline.c:975: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).
      size_t inbytesleft = strlen(Key_Text);
data/grafx2-2.7/src/readline.c:1146: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).
        size=strlen(str);
data/grafx2-2.7/src/readline.c:1213: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).
          size=strlen(str);
data/grafx2-2.7/src/readline.c:1216:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy(display_string, str + offset, visible_size);
data/grafx2-2.7/src/readline.c:1249: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(str,"0");
data/grafx2-2.7/src/readline.c:1261: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).
    size = strlen(str);
data/grafx2-2.7/src/readline.c:1284:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  length=strlen(str);
data/grafx2-2.7/src/readline.c:1294: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).
      for (j=strlen(decimals)-1; j >= 0 && decimals[j]=='0'; j--)
data/grafx2-2.7/src/readline.c:1303: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).
      length=strlen(str);
data/grafx2-2.7/src/realpath.c:64:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(path, _path, PATH_MAX);
data/grafx2-2.7/src/realpath.c:105:13:  [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(resolved_path, "/");
data/grafx2-2.7/src/recoil.c:22: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).
	size_t suffixLen = strlen(suffix);
data/grafx2-2.7/src/recoil.c:25: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).
	size_t prefixLen = strlen(*str);
data/grafx2-2.7/src/recoil.c:5256: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 length = (int) strlen(s);
data/grafx2-2.7/src/recoil.c:6408: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 length = (int) strlen(s);
data/grafx2-2.7/src/recoil.c:6446: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).
	int i = (int) strlen(baseFilename);
data/grafx2-2.7/src/recoil.c:17690: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).
	for (int i = (int) strlen(filename); --i >= 0;) {
data/grafx2-2.7/src/saveini.c:186: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).
        dest_index+=strlen(dest+dest_index);
data/grafx2-2.7/src/saveini.c:193: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).
        dest_index+=strlen(dest+dest_index);
data/grafx2-2.7/src/saveini.c:257: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).
    dest_index+=strlen(value);
data/grafx2-2.7/src/setup.c:95: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(program_dir    ,"/");
data/grafx2-2.7/src/setup.c:109: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).
  program_dir = malloc(4 + strlen(path) + 1);
data/grafx2-2.7/src/setup.c:115:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
  strcat(program_dir, "/");
data/grafx2-2.7/src/setup.c:139: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).
        len = strlen(current_dir) + strlen(argv0) + 2;
data/grafx2-2.7/src/setup.c:139: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).
        len = strlen(current_dir) + strlen(argv0) + 2;
data/grafx2-2.7/src/setup.c:244: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).
      len = strlen(program_dir) + 2 + strlen(PATH_SEPARATOR) + 1;
data/grafx2-2.7/src/setup.c:244: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).
      len = strlen(program_dir) + 2 + strlen(PATH_SEPARATOR) + 1;
data/grafx2-2.7/src/setup.c:295: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).
        size_t size = strlen(config_parent_dir);
data/grafx2-2.7/src/setup.c:297: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).
        len = size + strlen(Config_SubDir) + strlen(PATH_SEPARATOR) + 1;
data/grafx2-2.7/src/setup.c:297:46:  [1] (buffer) strlen:
  Does not handle 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 = size + strlen(Config_SubDir) + strlen(PATH_SEPARATOR) + 1;
data/grafx2-2.7/src/setup.c:300: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).
          len += strlen(PATH_SEPARATOR);
data/grafx2-2.7/src/setup.c:323: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).
              len = strlen(program_dir) + 4;
data/grafx2-2.7/src/text.c:160: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).
  int size=strlen(name)+1;
data/grafx2-2.7/src/text.c:650: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).
  str_len = (int)strlen(str);
data/grafx2-2.7/src/tifformat.c:360: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).
    size_t len = strlen(desc);
data/grafx2-2.7/src/windows.c:960: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(str) > size)
data/grafx2-2.7/src/windows.c:1033: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).
  Update_status_line(position, strlen(str));
data/grafx2-2.7/src/windows.c:1109: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).
    size_t inbytesleft = strlen(input);
data/grafx2-2.7/src/windows.c:1342: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).
  Update_window_area(x,y,strlen(str)*6,8);
data/grafx2-2.7/src/windows.c:1390: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).
      current_length = strlen(c);
data/grafx2-2.7/src/windows.c:1398:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(display_string, c, current_length);
data/grafx2-2.7/src/windows.c:1438: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).
  window_width=(strlen(message)<<3)+20;
data/grafx2-2.7/src/windows.c:1445: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).
  Print_in_window((window_width>>1)-(strlen(message)<<2), 20, message,
data/grafx2-2.7/src/windows.c:1490: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(choices[i].label) > max_len_label)
data/grafx2-2.7/src/windows.c:1491: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).
      max_len_label = strlen(choices[i].label);
data/grafx2-2.7/src/windows.c:1492: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 (choices[i].hint != NULL && strlen(choices[i].hint) > max_len_hint)
data/grafx2-2.7/src/windows.c:1493: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).
      max_len_hint = strlen(choices[i].hint);
data/grafx2-2.7/src/windows.c:1541:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            memcpy(hint, choices[i].hint, MIN(37, strlen(choices[i].hint)));
data/grafx2-2.7/src/windows.c:1567: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).
  window_width=(strlen(message)<<3)+20;
data/grafx2-2.7/src/windows.c:1573: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).
  Print_in_window((window_width>>1)-(strlen(message)<<2),20,message,MC_Black,MC_Light);

ANALYSIS SUMMARY:

Hits = 963
Lines analyzed = 123089 in approximately 3.21 seconds (38405 lines/second)
Physical Source Lines of Code (SLOC) = 94846
Hits@level = [0] 242 [1] 194 [2] 638 [3]  10 [4] 119 [5]   2
Hits@level+ = [0+] 1205 [1+] 963 [2+] 769 [3+] 131 [4+] 121 [5+]   2
Hits/KSLOC@level+ = [0+] 12.7048 [1+] 10.1533 [2+] 8.10788 [3+] 1.38119 [4+] 1.27575 [5+] 0.0210868
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.