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/tuxpaint-0.9.24~git20190922-f7d30d/osk/keysymdef.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/xor.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/fisheye.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/distortion.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/emboss.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/blind.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/string.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/mirror_flip.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/calligraphy.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/metalpaint.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/waves.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/sharpen.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/tint.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/realrainbow.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/toothpaste.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/rosette.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/flower.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/blocks_chalk_drip.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/fade_darken.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/rain.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/noise.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/glasstile.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/tornado.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/fold.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/cartoon.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/fretwork.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/blur.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/negative.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/halftone.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/confetti.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/rails.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/shift.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/ripples.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/mosaic.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/light.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/kalidescope.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/snow.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/rainbow.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/alien.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/foam.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/mosaic_shaped.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/bricks.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/puzzle.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/perspective.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/smudge.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/grass.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/tv.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/magic/docs/tp_magic_example.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/dummy.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/rgblinear.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/tools.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/postscript_print.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/BeOS_print.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/debug.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/tip_tux.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/compiler.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/pixels.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/great.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/titles.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/playsound.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_print.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/get_fname.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/macos_print.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/progressbar.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/macos.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/dirwalk.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_dirent.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/cursor.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/colors.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/fill.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/BeOS_print.cpp
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/get_fname.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/shapes.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/playsound.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/parse.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_print.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/sounds.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/pixels.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/rgblinear.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/postscript_print.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/fill.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_dirent.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/cursor.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/macos.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/dirwalk.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/progressbar.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.h
Examining data/tuxpaint-0.9.24~git20190922-f7d30d/win32/resource.h

FINAL RESULTS:

data/tuxpaint-0.9.24~git20190922-f7d30d/src/debug.h:14:9:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define printf(args...) do { \
data/tuxpaint-0.9.24~git20190922-f7d30d/src/debug.h:17:5:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    printf(args); \
data/tuxpaint-0.9.24~git20190922-f7d30d/src/debug.h:42:27:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define DEBUG_PRINTF(...) printf(__VA_ARGS__)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1395:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(pathname, "%s/%s", fi->directory, name);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:970:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(str, "%s=%s", name, value);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:422:7:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
      wcscpy(sm->output, unicode);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1033:19:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                  wcscat(im->s, us);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1078:23:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                      wcscat(im->s, im->buf);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1252:19:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                  wcscat(im->s, us);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1297:23:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                      wcscat(im->s, im->buf);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1474:19:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                  wcscat(im->s, us);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1519:23:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                      wcscat(im->s, im->buf);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1731:31:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                              wcscat(im->s, us);        /* Output */
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1744:31:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                              wcscat(im->s, us);        /* Output */
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1757:31:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                              wcscat(im->s, us);        /* Output */
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1770:27:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                          wcscat(im->s, us);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1783:23:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                      wcscat(im->s, us);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1817:23:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                      wcscat(im->s, bp);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/macos.c:28:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        sprintf(p, MACOS_FONTS_PATH, getenv("HOME"));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/macos.c:51:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        sprintf(p, MACOS_PREFERENCES_PATH, getenv("HOME"));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:214:7:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
      sscanf(line, "%s %s", key, value);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:244: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(value, &line[13]);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:353:9:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        sscanf(line, "%s %i", key, &width);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:356:9:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        sscanf(line, "%s %i", key, &height);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:363:11:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
          sscanf(line, "%s %s", key, fontpath);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:372:11:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
          sscanf(line, "%s %i %i %i", key, &r, &g, &b);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:386:11:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
          sscanf(line, "%s %i %i %i", key, &r, &g, &b);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:416:11:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
          sscanf(line,
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:524:16:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
      readed = sscanf(line, "keycode %i = %s %s %s %s", &keycode, ksname1, ksname2, ksname3, ksname4);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:728:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(space, "%s\t", sp);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:807:7:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
      sscanf(line, "#define XK_%s %x /* U+%x",
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:1024:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
          sprintf(fontname, "%s/fonts/FreeSansBold.ttf", DATA_PREFIX);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:332:20:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
#define mkdir(path,access)    _mkdir(path)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10810: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(snd_fname, fname);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10812:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy((char *)strcasestr(snd_fname, ext), tmp_str);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10820: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(snd_fname, fname);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10822: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((char *)strcasestr(snd_fname, ext), tmp_str);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10832: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(snd_fname, fname);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10834: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((char *)strcasestr(snd_fname, ext), tmp_str);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10842: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(snd_fname, fname);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10844: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((char *)strcasestr(snd_fname, ext), tmp_str);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10854: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(snd_fname, fname);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10856: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((char *)strcasestr(snd_fname, ext), tmp_str);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10864:23:  [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(snd_fname, fname);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10866:23:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                      strcpy((char *)strcasestr(snd_fname, ext), tmp_str);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10975:27:  [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(def_buf, buf);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13261:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(line, "%lu%s", uncompressed_size, "\n");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13262: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(headers, line);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13263:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(line, "%lu%s", dataLen, "\n");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13264: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(headers, line);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13270: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(cdata, headers);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13670:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(char_stream, "%s\n", starter_id);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13673: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(char_stream, line);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13676: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(char_stream, line);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13678:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(line, "T%s\n", template_id);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13679: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(char_stream, line);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13682: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(char_stream, line);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13685: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(char_stream, line);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:14075:23:  [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(fname, f->d_name);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:14921:23:  [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(file_id, d_names[which]);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:15109: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(fname, f->d_name);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:15810: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(file_id, d_names[which]);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:15985: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(starter_id, tmp_starter_id);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:15988: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(template_id, tmp_template_id);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:15991: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(file_id, tmp_file_id);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:16392:8:  [4] (shell) popen:
  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.
  pi = popen(pcmd, "w");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:16787: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((char *)dstr, str);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:18088:23:  [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(objname, f->d_name);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:18809: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(fname, f->d_name);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:18854:27:  [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(fname2, f2->d_name);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:19570: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(starter_id, d_names[which]);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:19625: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(template_id, d_names[which]);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:21750:19:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
                  sscanf((char *)unknown.data, "%s\n%s\n%d\n%d\n", control, softwr, &unc_size, &comp);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:21799:3:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
  sscanf((char *)unknown.data, "%s\n%s\n%d\n%d\n", control, softwr, unc_size, &comp);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:22655: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(colorfile, tmpcfg.colorfile);        /* FIXME can overflow */
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:23092:27:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
                          sscanf(str + 1, "%s %n", tmp_str, &count);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24526: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(fname, basename(path));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24539:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(trashpath, "%s/Trash", getenv("XDG_DATA_HOME"));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24543:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(trashpath, "%s/.local/share/Trash", getenv("HOME"));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24552:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(dest, "%s/files", trashpath);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24554:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(dest, "%s/info", trashpath);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24557:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(dest, "%s/files/%s", trashpath, fname);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24559: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(bname, fname);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24563: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(ext, strstr(fname, ".") + 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24571:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(infoname, "%s/info/%s.trashinfo", trashpath, fname);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24576:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(fname, "%s_%d.%s", bname, cnt, ext);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24578:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(dest, "%s/files/%s", trashpath, fname);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24579:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(infoname, "%s/info/%s.trashinfo", trashpath, fname);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24649:9:  [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.
  tmp = system("dbus-send / org.kde.KDirNotify.FilesAdded string:trash:/");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_dirent.c:53: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(pathname, pSpec);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_dirent.c:87: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(pDir->de.d_name, (const char *)pDir->wfd.cFileName);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_print.c:112: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(device, dev);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_print.c:114: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(driver, drv);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_print.c:116: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(output, out);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_print.c:206: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(devname, (const char *)devmode->dmDeviceName);
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/alien.c:109: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(0));
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/confetti.c:175:7:  [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((dx + dy) / 2 + time(0));   //to get a unique seed even if dx and dy aren't defined
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/noise.c:107: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(0));
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/puzzle.c:183:7:  [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(rand());
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/snow.c:112: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(0));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:1003: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("LANGUAGE") == NULL)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:1005:15:  [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("LC_ALL"))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:1006:34:  [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.
            mysetenv("LANGUAGE", getenv("LC_ALL"));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:1007:20:  [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.
          else if (getenv("LC_MESSAGES"))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:1008:34:  [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.
            mysetenv("LANGUAGE", getenv("LC_MESSAGES"));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:1009:20:  [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.
          else if (getenv("LANG"))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:1010:34:  [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.
            mysetenv("LANGUAGE", getenv("LANG"));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:1079: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("LANGUAGE") == NULL)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:1083: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("LANGUAGE") == NULL)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:1086:25:  [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.
  env_language = strdup(getenv("LANGUAGE"));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/macos.c:23:26:  [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.
      const char *home = getenv("HOME");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/macos.c:28:38:  [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.
        sprintf(p, MACOS_FONTS_PATH, getenv("HOME"));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/macos.c:46:26:  [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.
      const char *home = getenv("HOME");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/macos.c:51:44:  [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.
        sprintf(p, MACOS_PREFERENCES_PATH, getenv("HOME"));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:22435:22:  [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.
  const char *home = getenv("HOME");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:23588: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((char *)"SDL_VIDEO_WINDOW_POS") == NULL)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24267: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(SDL_GetTicks());
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24537:7:  [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("XDG_DATA_HOME") != NULL)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24539:38:  [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.
      sprintf(trashpath, "%s/Trash", getenv("XDG_DATA_HOME"));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24541:12:  [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.
  else if (getenv("HOME") != NULL)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24543:51:  [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.
      sprintf(trashpath, "%s/.local/share/Trash", getenv("HOME"));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_print.c:606:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  char *temp = getenv("TEMP");
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/docs/tp_magic_example.c:35: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.
const char *snd_filenames[NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/docs/tp_magic_example.c:40: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.
const char *icon_filenames[NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/docs/tp_magic_example.c:53: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.
const char *names[NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/docs/tp_magic_example.c:61: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.
const char *descs[NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/docs/tp_magic_example.c:127:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/docs/tp_magic_example.c:173:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/alien.c:59: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.
const char *alien_snd_filenames[alien_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/alien.c:63: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.
const char *alien_icon_filenames[alien_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/alien.c:67: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.
const char *alien_names[alien_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/alien.c:71: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.
const char *alien_descs[alien_NUM_TOOLS][2] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/alien.c:107:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/alien.c:127:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/blind.c:92:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/blind.c:107:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/blocks_chalk_drip.c:78:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/blocks_chalk_drip.c:107:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/blur.c:71: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.
const char *blur_snd_filenames[blur_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/blur.c:75: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.
const char *blur_icon_filenames[blur_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/blur.c:79: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.
const char *blur_names[blur_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/blur.c:83: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.
const char *blur_descs[blur_NUM_TOOLS][2] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/blur.c:98:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/blur.c:116:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/bricks.c:79:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/bricks.c:101:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/calligraphy.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 fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/calligraphy.c:115:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/cartoon.c: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 fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/cartoon.c:93:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/confetti.c:59:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/confetti.c:74:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/distortion.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 fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/distortion.c:119:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/emboss.c:74:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/emboss.c:91:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/fade_darken.c: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 fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/fade_darken.c:96:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/fisheye.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 fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/fisheye.c:92:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/flower.c:105:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/flower.c:134:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/foam.c:76:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/foam.c:104:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/foam.c:240: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(foam_mask_tmp, foam_mask, (sizeof(int) * (foam_mask_w * foam_mask_h)));
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/foam.c:398: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(foam_mask, foam_mask_tmp, (sizeof(int) * (foam_mask_w * foam_mask_h)));
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/fold.c:79:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/fold.c:94:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/fretwork.c:129:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/fretwork.c:167:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/glasstile.c:74:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/glasstile.c:94:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/grass.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 fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/grass.c:97:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/halftone.c:26: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.
const char *snd_filenames[NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/halftone.c:30: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.
const char *icon_filenames[NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/halftone.c:34: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.
const char *names[NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/halftone.c:38: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.
const char *descs[NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/halftone.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 fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/halftone.c:106:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/kalidescope.c:53: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 *kal_icon_names[KAL_COUNT] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/kalidescope.c:91:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/kalidescope.c:107:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/light.c:73:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/light.c:93:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/metalpaint.c: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 fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/metalpaint.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 fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/mirror_flip.c:67:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/mirror_flip.c:92:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/mosaic.c:87: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.
const char *mosaic_snd_filenames[mosaic_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/mosaic.c:91: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.
const char *mosaic_icon_filenames[mosaic_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/mosaic.c:95: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.
const char *mosaic_names[mosaic_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/mosaic.c:99: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.
const char *mosaic_descs[mosaic_NUM_TOOLS][2] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/mosaic.c:114:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/mosaic.c:133:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/mosaic_shaped.c:113: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.
const char *mosaic_shaped_snd_filenames[mosaic_shaped_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/mosaic_shaped.c:119: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.
const char *mosaic_shaped_icon_filenames[mosaic_shaped_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/mosaic_shaped.c:125: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.
const char *mosaic_shaped_pattern_filenames[mosaic_shaped_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/mosaic_shaped.c:131: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.
const char *mosaic_shaped_names[mosaic_shaped_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/mosaic_shaped.c:138: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.
const char *mosaic_shaped_descs[mosaic_shaped_NUM_TOOLS][2] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/mosaic_shaped.c:164:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/mosaic_shaped.c:185:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/negative.c:62:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/negative.c:85:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/noise.c:57: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.
const char *noise_snd_filenames[noise_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/noise.c:61: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.
const char *noise_icon_filenames[noise_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/noise.c:65: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.
const char *noise_names[noise_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/noise.c:69: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.
const char *noise_descs[noise_NUM_TOOLS][2] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/noise.c:105:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/noise.c:125:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/perspective.c:135: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.
const char *perspective_snd_filenames[perspective_NUM_TOOLS + 1] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/perspective.c:141: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.
const char *perspective_icon_filenames[perspective_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/perspective.c:146: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.
const char *perspective_names[perspective_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/perspective.c:152: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.
const char *perspective_descs[perspective_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/perspective.c:170:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/perspective.c:188:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/puzzle.c:79:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/puzzle.c:94:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/rails.c:86:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/rails.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 fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/rain.c:59: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.
const char *rain_snd_filenames[rain_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/rain.c:63: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.
const char *rain_icon_filenames[rain_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/rain.c:67: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.
const char *rain_names[rain_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/rain.c:71: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.
const char *rain_descs[rain_NUM_TOOLS][2] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/rain.c:116:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/rain.c:136:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/rainbow.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 fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/rainbow.c:123:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/realrainbow.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 fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/realrainbow.c:85:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/realrainbow.c:164: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(&rect, &realrainbow_rect, sizeof(SDL_Rect));
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/realrainbow.c:165: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(&realrainbow_rect, update_rect, sizeof(SDL_Rect));
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/realrainbow.c:201: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(&rect, &realrainbow_rect, sizeof(SDL_Rect));
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/realrainbow.c:202: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(&realrainbow_rect, update_rect, sizeof(SDL_Rect));
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/ripples.c:75:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/ripples.c:92:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/rosette.c:87:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/rosette.c:102:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/sharpen.c:63: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.
const char *sharpen_snd_filenames[sharpen_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/sharpen.c:69: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.
const char *sharpen_icon_filenames[sharpen_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/sharpen.c:75: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.
const char *sharpen_names[sharpen_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/sharpen.c:81: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.
const char *sharpen_descs[sharpen_NUM_TOOLS][2] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/sharpen.c:126:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/sharpen.c:146:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/shift.c:79:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/shift.c:96:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/smudge.c:66:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/smudge.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 fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/snow.c:60: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.
const char *snow_snd_filenames[snow_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/snow.c:65: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.
const char *snow_icon_filenames[snow_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/snow.c:70: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.
const char *snow_names[snow_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/snow.c:75: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.
const char *snow_descs[snow_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/snow.c:110:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/snow.c:148:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/string.c:104:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/string.c:185:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/tint.c:63: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.
const char *tint_snd_filenames[tint_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/tint.c:68: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.
const char *tint_icon_filenames[tint_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/tint.c:73: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.
const char *tint_names[tint_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/tint.c:78: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.
const char *tint_descs[tint_NUM_TOOLS][2] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/tint.c:117:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/tint.c:135:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/toothpaste.c:59: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.
const char *toothpaste_snd_filenames[toothpaste_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/toothpaste.c:63: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.
const char *toothpaste_icon_filenames[toothpaste_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/toothpaste.c:67: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.
const char *toothpaste_names[toothpaste_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/toothpaste.c:71: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.
const char *toothpaste_descs[toothpaste_NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/toothpaste.c:106:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/toothpaste.c:147:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/tornado.c:114:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/tornado.c:143:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/tv.c:72:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/tv.c:87:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/waves.c:69:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/waves.c:90:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/xor.c:69:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/magic/src/xor.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 fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/BeOS_print.cpp:95: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(dst, src, linesize);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/colors.h:84: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.
const char *const default_color_names[NUM_DEFAULT_COLORS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/src/colors.h:137: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 colorfile[256];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/dirwalk.c:115: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 fname[512];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/dirwalk.c:124: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 fname_check[512];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/dirwalk.c:357: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(dir + dirlen, f->d_name, d_namlen + 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/dirwalk.c:381: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(cp, f->d_name, d_namlen);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/dirwalk.c:383: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(cp + d_namlen, "/rsrc", 6);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/dirwalk.c:400: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(cp, f->d_name, d_namlen + 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/dirwalk.c:431: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(dir + dirlen, dir_names[num_dir_names].str, dir_names[num_dir_names].len + 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:175: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[128];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:274:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char desc[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:720: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(name, si->family, len);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:721:11:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
          strcpy(name + len, " Condensed");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:935:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[TP_FTW_PATHSIZE];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:938: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(buf, dir, dirlen);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:968: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[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1113: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(walk, s, len);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1122: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(walk, s, len);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1131: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(walk, s, len);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1140: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(walk, s, len);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1149: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(walk, s, len);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1158: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(walk, s, len);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1291:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char description[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1518: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 c[8];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1674: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(pango_color, pc, 16);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.h:167:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char *filename[4];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/get_fname.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 f[512];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:59: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.
const char *lang_prefixes[NUM_LANGS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:822:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char straux[255];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.h:186:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char *lang_prefixes[NUM_LANGS];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:70:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *const im_tip_text[NUM_IM_TIPS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:171:3:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  wchar_t output[MAX_UNICODE_SEQ];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:533: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).
  is = fopen(path, "rt");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:543:7:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      wchar_t unicode[MAX_UNICODE_SEQ];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:546: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 buf[256];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:547: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 flag[256];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.h:39:3:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  wchar_t s[16];                /* Characters that should be displayed */
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.h:43:3:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  wchar_t buf[8];               /* Buffered characters */
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:56:3:  [2] (buffer) swprintf:
  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.
  swprintf(wtok, L"%ls", ui16);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:171: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).
      fi = fopen(layout_name, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:177:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
          fi = fopen(filename, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:183:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
              fi = fopen(filename, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:191: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).
      fi = fopen(filename, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:291: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).
  fi = fopen(hlayout_name, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:297: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).
      fi = fopen(filename, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:476: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).
  fi = fopen(keymap_name, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:482: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).
      fi = fopen(filename, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:664: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).
  fi = fopen(composemap_name, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:670: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).
      fi = fopen(filename, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:772: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).
  fi = fopen(keysymdefs_name, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:778: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).
      fi = fopen(filename, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.h:125:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char *layout_name[256];       /* The layout name */
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.h:128:3:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  wchar_t *key[256];            /* The text of the key */
data/tuxpaint-0.9.24~git20190922-f7d30d/src/postscript_print.c:94:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[256];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/rgblinear.h:81:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char linear_to_sRGB_table[4096] =
data/tuxpaint-0.9.24~git20190922-f7d30d/src/shapes.h:232: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.
const char *const shape_names[NUM_SHAPES] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/src/shapes.h:287: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.
const char *const shape_tips[NUM_SHAPES] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/src/shapes.h:331: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.
const char *const shape_img_fnames[NUM_SHAPES] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/src/sounds.h:81:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *sound_fnames[NUM_SOUNDS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tip_tux.h:50: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.
const char *const tux_img_fnames[NUM_TIP_TUX] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/src/titles.h:52: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.
const char *const title_names[NUM_TITLES] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tools.h:60: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.
const char *const tool_names[NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tools.h:113: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.
const char *const tool_tips[NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tools.h:181: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.
const char *const tool_img_fnames[NUM_TOOLS] = {
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:295:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char d_name[FILENAME_MAX];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:356:3:  [2] (buffer) swprintf:
  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.
  swprintf(wtok, L"%ls", ui16);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:596: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).
  fi = fopen(fname, "wb");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:610: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).
  fi = fopen(fname, mode);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:1242:3:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  wchar_t save_texttool_str[256];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:1268:8:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 wchar_t select_texttool_str[256];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:1353:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char *tip[MAX_MODES];         /* Description of magic tool, in each possible mode */
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:1806:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char file_id[FILENAME_MAX];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:1807:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char starter_id[FILENAME_MAX];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:1808:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char template_id[FILENAME_MAX];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:1817:8:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 wchar_t texttool_str[256];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:3935:35:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                                  memcpy(&scrolltimer_event, &event, sizeof(SDL_Event));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:6584:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[64];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:6597: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 fname[512];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:6620:11:  [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(strcasestr(fname, ".png"), ".dat");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:6621:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
          fi = fopen(fname, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:6633:57:  [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).
                          brushes_frames[num_brushes] = atoi(strstr(buf, "frames=") + 7);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:6637:58:  [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).
                          brushes_spacing[num_brushes] = atoi(strstr(buf, "spacing=") + 8);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:6669:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[TP_FTW_PATHSIZE];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:6672: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(buf, dir, dirlen);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:6910: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(buf, sd->stampname, len);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:6932: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(buf + len, "_mirror_flip.svg", 17);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:6938: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(buf + len, "_mirror_flip.png", 17);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:6965: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(buf + len, "_mirror.svg", 12);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:6971: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(buf + len, "_mirror.png", 12);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:6995: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(buf + len, "_flip.svg", 10);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7001:23:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                      memcpy(buf + len, "_flip.png", 10);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7031: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(buf + len, "_flip.svg", 10);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7037: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(buf + len, "_flip.png", 10);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7064: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(buf + len, "_mirror.svg", 12);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7070: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(buf + len, "_mirror.png", 12);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7100: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(buf + len, ".svg", 5);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7106: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(buf + len, ".png", 5);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7159: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(buf, sd->stampname, len);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7163: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(buf + len, ".dat", 5);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7189: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(buf + len, ".png", 5);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7199: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(buf + len, ".png", 5);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7208: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(buf + len, ".png", 5);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7251: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(buf + len, "_mirror_flip.png", 17);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7257: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(buf + len, "_mirror_flip.svg", 17);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7281: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(buf + len, "_mirror.png", 12);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7287: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(buf + len, "_mirror.svg", 12);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7309: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(buf + len, "_flip.png", 10);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7315:23:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                      memcpy(buf + len, "_flip.svg", 10);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7338: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(buf + len, "_mirror.png", 12);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7344: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(buf + len, "_mirror.svg", 12);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7370: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(buf + len, "_flip.png", 10);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7376: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(buf + len, "_flip.svg", 10);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7406: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(buf + len, ".png", 5);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7412: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(buf + len, ".svg", 5);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7545: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 fname[512];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7552:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      dotext = (char *)strcasestr(files[i].str, ext);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7561:21:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          dotext = (char *)strcasestr(files[i].str, ext);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7568: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 svgname[512];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7572:11:  [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(strcasestr(svgname, ".png"), ".svg");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7574:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
          fi = fopen(svgname, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7609: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(stamp_data[stamp_group][num_stamps[stamp_group]]->stampname, fname,
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7634:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[TP_FTW_PATHSIZE];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7637: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(buf, dir, dirlen);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10363:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char substr[512];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10366:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char utf8_char[5];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10369:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char utf8_str[512];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10791:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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_str[MAX_PATH], ext[5];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10797: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(ext, ".png");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10928:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[512], def_buf[512];  /* doubled to 512 per TOYAMA Shin-Ichi's requested; -bjk 2007.05.10 */
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10950:11:  [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((char *)extptr, ".txt");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10952:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
          fi = fopen(txt_fname, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10986:28:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                      if ((char *)strcasestr(buf, wished_langs[i].lang_prefix) == buf)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:11046:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[256];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:11056: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).
  fi = fopen(fname, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:11307:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[FILENAME_MAX];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:11320: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).
      fi = fopen(rname, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:11400:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[256];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:11430:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[256];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:11612:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[256];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:11692:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char ftmp[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:11699: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).
  fi = fopen(fname, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:11821: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).
  fi = fopen(fname, "w");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:12612: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).
      fi = fopen(lock_fname, "w");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13036:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13145: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).
  fi = fopen(fname, "wb");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13175: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).
  fi = fopen(fname, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13193: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).
  fi = fopen(fname, "wb");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13215: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).
      fi = fopen(fname, "w");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13259:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
  strcat(headers, "Tuxpaint\n");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13260:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
  strcat(headers, "Tuxpaint_" VER_VERSION "\n");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13535:13:  [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).
      lfi = fopen(fname, "wb+");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13672: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(line, "%d %d %d\n", starter_mirrored, starter_flipped, starter_personal);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13675: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(line, "c%d %d %d\n", canvas_color_r, canvas_color_g, canvas_color_b);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13681: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(line, "%d\n", template_personal);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13684: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(line, "M%d\n", starter_modified);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13930:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char *dirname[NUM_PLACES_TO_LOOK];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13935:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:14019:23:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                      memcpy(&(fs[num_files_in_dirs].f), f, sizeof(struct dirent));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:14223:40:  [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).
                                  fi = fopen(fname, "wb");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:14879:24:  [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).
                  fi = fopen(fname, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:15012:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:15060: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(&(fs[num_files_in_dir].f), f, sizeof(struct dirent));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:15237:36:  [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).
                              fi = fopen(fname, "wb");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:15769:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:16418:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char f[512];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:16712: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(ustr, str, sizeof(wchar_t) * n);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:17925: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).
  fi = fopen(file, "rb");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:17976: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).
  fi = fopen(file, "rb");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:18007:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[512];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:18008:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char objname[512];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:18009:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char funcname[512];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:18637:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char *dirname[NUM_PLACES_TO_LOOK];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:18641:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:18724: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(&(fs[num_files_in_dirs].f), f, sizeof(struct dirent));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:18851:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                          char fname2[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:19039:44:  [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).
                                      fi = fopen(fname, "wb");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:21067:3:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  wchar_t tmp_str[256];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:21913: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).
  fp = fopen(fname, "rb");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:22284:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[256];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:22286: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).
  FILE *fi = fopen(filename, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:22420: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(&cfgitem, i * sizeof(const char *) + (const char *)winner, sizeof cfgitem);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:22423: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(i * sizeof(const char *) + (char *)loser, &cfgitem, sizeof cfgitem);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:22432:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[128];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:22481: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[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:22507:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
  strcpy(str, "tuxpaint.cfg");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:22646:33:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
          stamp_size_override = atoi(tmpcfg.stamp_size_override);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:22658: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).
      print_delay = atoi(tmpcfg.print_delay);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:23053: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).
      fi = fopen(colorfile, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:23063: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 str[80], tmp_str[80];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:23231: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).
  fi = fopen(lock_fname, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:23268: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).
  fi = fopen(lock_fname, "w");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:23331:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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_str[128];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24419:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char logTime[100];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24505:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fname[MAX_PATH], trashpath[MAX_PATH], dest[MAX_PATH], infoname[MAX_PATH], bname[MAX_PATH], ext[MAX_PATH];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24506:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char deldate[32];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24511:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char buf[1024];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24595: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).
      fi = fopen(path, "r");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24601: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).
      fo = fopen(dest, "w");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24623: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).
  fo = fopen(infoname, "w");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_dirent.c:47:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char pathname[MAX_PATH + 2];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_dirent.c:54:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
  strcat(pathname, "/*");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_dirent.c:135: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(block, entry, size);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_dirent.h:35:3:  [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 cFileName[MAX_PATH];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_dirent.h:36:3:  [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 cAlternateFileName[14];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_dirent.h:60:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char d_name[MAX_PATH];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_print.c:80: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(dst, src, linesize);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_print.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 buff[MAX_PATH];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_print.c:129:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char device[MAX_PATH];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_print.c:139:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((fp = fopen(filepath, "rb")) == NULL)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_print.c:199:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((fp = fopen(filepath, "wb")) != NULL)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_print.c:204: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 devname[dmDeviceNameSize];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_print.c:226:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((fp = fopen(filepath, "rb")) != NULL)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_print.c:283:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char device[MAX_PATH], driver[MAX_PATH], output[MAX_PATH];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_print.c:562:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char prefix[MAX_PATH];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_print.c:563:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[2 * MAX_PATH];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_print.c:587:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[MAX_PATH];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_print.c:623:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char f[512];
data/tuxpaint-0.9.24~git20190922-f7d30d/src/dirwalk.c:97: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).
              if (!strncasecmp(cp + 1, suffixes[j], strlen(suffixes[j])))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/dirwalk.c:349: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).
      d_namlen = strlen(f->d_name);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:413:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      ssize_t rc = read(fd, buf, count);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:690: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 (!strncasecmp(sp, "Bold", strlen("Bold")))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:692: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).
          sp += strlen("Bold");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:696: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 (!strncasecmp(sp, "Regular", strlen("Regular")))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:698: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).
          sp += strlen("Regular");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:701:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (!strncasecmp(sp, "Italic", strlen("Italic")))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:703: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).
          sp += strlen("Italic");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:707: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 (!strncasecmp(sp, "Oblique", strlen("Oblique")))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:709: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).
          sp += strlen("Oblique");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:714:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (!strncasecmp(sp, "Condensed", strlen("Condensed")))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:716: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 len = strlen(si->family);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:717: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).
          char *name = malloc(len + strlen(" Condensed") + 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:719: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).
          sp += strlen("Condensed");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:726: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).
      if (!strncasecmp(sp, "Light", strlen("Light")))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:728: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).
          sp += strlen("Light");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:732:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (!strncasecmp(sp, "Medium", strlen("Medium")))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:734: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).
          sp += strlen("Medium");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:738: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 (!strncasecmp(sp, "Demi", strlen("Demi")))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:740: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).
          sp += strlen("Demi");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:744: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).
      if (!strncasecmp(sp, "Heavy", strlen("Heavy")))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:746: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).
          sp += strlen("Heavy");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:750:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (!strncasecmp(sp, "Normal", strlen("Normal")))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:752: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).
          sp += strlen("Normal");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:755: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).
      if (!strncasecmp(sp, "Black", strlen("Black")))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:757: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).
          sp += strlen("Black");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:761: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).
      if (!strncasecmp(sp, "Roman", strlen("Roman")))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:763: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).
          sp += strlen("Roman");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:766: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 (!strncasecmp(sp, "Book", strlen("Book")))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:768: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).
          sp += strlen("Book");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:771: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).
      if (!strncasecmp(sp, "Chancery", strlen("Chancery")))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:773: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).
          sp += strlen("Chancery");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:777: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 (!strncasecmp(sp, "Thin", strlen("Thin")))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:779: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).
          sp += strlen("Thin");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:783:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (!strncmp(sp, "LR", strlen("LR")))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:785: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).
          sp += strlen("LR");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:936: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).
  unsigned dirlen = strlen(dir);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1077: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).
        size += strlen(s);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1080: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).
        size += strlen(s);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1083: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).
        size += strlen(s);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1086: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).
        size += strlen(s);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1089: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).
        size += strlen(s);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1092: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).
        size += strlen(s);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1112: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).
          len = strlen(s);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1121: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).
          len = strlen(s);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1130: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).
          len = strlen(s);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1139: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).
          len = strlen(s);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1148: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).
          len = strlen(s);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1157: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).
          len = strlen(s);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1190:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      rc = read(font_socket_fd, buf + buf_fill, buf_size - buf_fill);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1249: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(walk);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1253: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(walk);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1257: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(walk);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1261: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(walk);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1265: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(walk);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1269: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(walk);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1394: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).
    pathname = alloca(strlen(fi->directory) + 1 + strlen(name) + 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1394: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).
    pathname = alloca(strlen(fi->directory) + 1 + strlen(name) + 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1397:5:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
    strcpy(description, "");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/fonts.c:1512: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).
  SDL_Surface **surfs = malloc(strlen(s) * sizeof surfs[0]);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:861:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          len_baseloc = strlen(straux);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:865:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              if (len_baseloc == strlen(lang_prefixes[i]) && !strncasecmp(straux, lang_prefixes[i], len_baseloc))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:876: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_baseloc = strlen(straux);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:880:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          if (len_baseloc == strlen(lang_prefixes[i]) && !strncasecmp(straux, lang_prefixes[i], len_baseloc))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:893: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_baseloc = strlen(straux);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:900:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          if (len_baseloc == strlen(lang_prefixes[i]) &&
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:901:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              !strncasecmp(straux, lang_prefixes[i], strlen(lang_prefixes[i])))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:911: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).
  len_baseloc = strlen(baseloc);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:917: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).
      if (len_baseloc == strlen(lang_prefixes[i]) && !strncasecmp(baseloc, lang_prefixes[i], strlen(lang_prefixes[i])))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:917:94:  [1] (buffer) strlen:
  Does not handle 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 (len_baseloc == strlen(lang_prefixes[i]) && !strncasecmp(baseloc, lang_prefixes[i], strlen(lang_prefixes[i])))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:934:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (!strncasecmp(loc, lang_prefixes[i], strlen(lang_prefixes[i])))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:967: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).
  int len = strlen(name) + 1 + strlen(value) + 1;
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:967: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).
  int len = strlen(name) + 1 + strlen(value) + 1;
data/tuxpaint-0.9.24~git20190922-f7d30d/src/i18n.c:995: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(loc) > 0)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:234:16:  [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).
  size_t len = wcslen(src) + 1; /* Copy over all src string + NUL */
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:245:18:  [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).
  int peg = (int)wcslen(s) - (int)count;
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:410: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).
      if (wcslen(sm->output))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:415:27:  [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).
          for (i = 0; i < wcslen(sm->output); i++)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:418:27:  [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).
          for (i = 0; i < wcslen(unicode); i++)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:510: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(flag) > 1)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:552:17:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
      scanned = fscanf(is, "%255s", buf);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:598:17:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
      scanned = fscanf(is, "%255s\t%255s", buf, flag);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:618:31:  [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).
              for (i = 0; i < wcslen(unicode); i++)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:683:30:  [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).
  if (cm->match_count < (int)wcslen(s))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:695:31:  [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).
  if (cm->match_count == (int)wcslen(s))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:783:63:  [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).
  wprintf(L"* [%8ls] [%8ls] %2d %2d (%2d)\n", im->s, im->buf, wcslen(im->s), wcslen(im->buf), im->redraw);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:783:78:  [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).
  wprintf(L"* [%8ls] [%8ls] %2d %2d (%2d)\n", im->s, im->buf, wcslen(im->s), wcslen(im->buf), im->redraw);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:946:12:  [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).
  if ((int)wcslen(im->s) < im->redraw)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:947:18:  [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).
    im->redraw = wcslen(im->s);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:948:22:  [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).
  wcs_lshift(im->s, (wcslen(im->s) - im->redraw));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1014:11:  [1] (buffer) wcsncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or
  automatically resizing strings.
          wcsncat(im->buf, &u, 1);      /* Copy new character */
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1023:69:  [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).
              wprintf(L"  [%8ls] [%8ls] %2d %2d\n", im->s, im->buf, wcslen(im->s), wcslen(im->buf));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1023:84:  [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).
              wprintf(L"  [%8ls] [%8ls] %2d %2d\n", im->s, im->buf, wcslen(im->s), wcslen(im->buf));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1027:25:  [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).
              if (us && wcslen(us))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1045:37:  [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).
                      im->redraw += wcslen(us);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1050:24:  [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).
              else if (wcslen(im->buf) > 0)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1058:23:  [1] (buffer) wcsncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or
  automatically resizing strings.
                      wcsncat(im->s, im->buf, 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1063:55:  [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).
                  else if ((size_t) cm.match_count != wcslen(im->buf))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1068:23:  [1] (buffer) wcsncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or
  automatically resizing strings.
                      wcsncat(im->s, im->buf, 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1080:37:  [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).
                      im->redraw += wcslen(im->buf);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1165:12:  [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).
  if ((int)wcslen(im->s) < im->redraw)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1166:18:  [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).
    im->redraw = wcslen(im->s);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1167:22:  [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).
  wcs_lshift(im->s, (wcslen(im->s) - im->redraw));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1233:11:  [1] (buffer) wcsncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or
  automatically resizing strings.
          wcsncat(im->buf, &u, 1);      /* Copy new character */
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1242:69:  [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).
              wprintf(L"  [%8ls] [%8ls] %2d %2d\n", im->s, im->buf, wcslen(im->s), wcslen(im->buf));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1242:84:  [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).
              wprintf(L"  [%8ls] [%8ls] %2d %2d\n", im->s, im->buf, wcslen(im->s), wcslen(im->buf));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1246:25:  [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).
              if (us && wcslen(us))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1264:37:  [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).
                      im->redraw += wcslen(us);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1269:24:  [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).
              else if (wcslen(im->buf) > 0)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1277:23:  [1] (buffer) wcsncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or
  automatically resizing strings.
                      wcsncat(im->s, im->buf, 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1282:55:  [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).
                  else if ((size_t) cm.match_count != wcslen(im->buf))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1287:23:  [1] (buffer) wcsncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or
  automatically resizing strings.
                      wcsncat(im->s, im->buf, 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1299:37:  [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).
                      im->redraw += wcslen(im->buf);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1384:12:  [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).
  if ((int)wcslen(im->s) < im->redraw)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1385:18:  [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).
    im->redraw = wcslen(im->s);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1386:22:  [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).
  wcs_lshift(im->s, (wcslen(im->s) - im->redraw));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1455:11:  [1] (buffer) wcsncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or
  automatically resizing strings.
          wcsncat(im->buf, &u, 1);      /* Copy new character */
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1464:69:  [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).
              wprintf(L"  [%8ls] [%8ls] %2d %2d\n", im->s, im->buf, wcslen(im->s), wcslen(im->buf));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1464:84:  [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).
              wprintf(L"  [%8ls] [%8ls] %2d %2d\n", im->s, im->buf, wcslen(im->s), wcslen(im->buf));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1468:25:  [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).
              if (us && wcslen(us))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1486:37:  [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).
                      im->redraw += wcslen(us);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1491:24:  [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).
              else if (wcslen(im->buf) > 0)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1499:23:  [1] (buffer) wcsncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or
  automatically resizing strings.
                      wcsncat(im->s, im->buf, 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1504:55:  [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).
                  else if ((size_t) cm.match_count != wcslen(im->buf))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1509:23:  [1] (buffer) wcsncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or
  automatically resizing strings.
                      wcsncat(im->s, im->buf, 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1521:37:  [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).
                      im->redraw += wcslen(im->buf);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1566:22:  [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).
  return (unicode && wcslen(unicode) == 1 && 0x314F <= unicode[0] && unicode[0] <= 0x3163);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1631:12:  [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).
  if ((int)wcslen(im->s) < im->redraw)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1632:18:  [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).
    im->redraw = wcslen(im->s);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1633:22:  [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).
  wcs_lshift(im->s, (wcslen(im->s) - im->redraw));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1676: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).
      if (wcslen(im->buf) > 0)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1701:11:  [1] (buffer) wcsncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or
  automatically resizing strings.
          wcsncat(bp, &u, 1);   /* Copy new character */
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1710:69:  [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).
              wprintf(L"  [%8ls] [%8ls] %2d %2d\n", im->s, im->buf, wcslen(im->s), wcslen(im->buf));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1710:84:  [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).
              wprintf(L"  [%8ls] [%8ls] %2d %2d\n", im->s, im->buf, wcslen(im->s), wcslen(im->buf));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1714:25:  [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).
              if (us && wcslen(us))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1732:45:  [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).
                              im->redraw += wcslen(us); /* May need to re-eval next time */
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1784:37:  [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).
                      im->redraw += wcslen(us);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1789:24:  [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).
              else if (wcslen(bp) > 0)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1797:23:  [1] (buffer) wcsncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or
  automatically resizing strings.
                      wcsncat(im->s, bp, 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1802:55:  [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).
                  else if ((size_t) cm.match_count != wcslen(bp))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1807:23:  [1] (buffer) wcsncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or
  automatically resizing strings.
                      wcsncat(im->s, bp, 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/im.c:1819:37:  [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).
                      im->redraw += wcslen(bp);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/macos.c:25: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).
      p = malloc(strlen(home) + strlen(MACOS_FONTS_PATH) + 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/macos.c:25: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).
      p = malloc(strlen(home) + strlen(MACOS_FONTS_PATH) + 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/macos.c:48: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).
      p = malloc(strlen(home) + strlen(MACOS_PREFERENCES_PATH) + 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/macos.c:48: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).
      p = malloc(strlen(home) + strlen(MACOS_PREFERENCES_PATH) + 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:732:7:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
      sprintf(space, " ");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:951: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(line) == 0)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:1703:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      wkeysym = malloc(sizeof(wchar_t) * (strlen(keysym) + 1));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:1705:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      mbsrtowcs(wkeysym, (const char **)&keysym, strlen(keysym) + 1, NULL);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/onscreen_keyboard.c:1708:50:  [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).
      printf("wkeysym %ls %i\n\n", wkeysym, (int)wcslen(wkeysym));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:213: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).
  for (i = 0; i < strlen(uphaystack); i++)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:216: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).
  for (i = 0; i < strlen(upneedle); i++)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:1520:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  return thumbnail(img_title_large_off, height * strlen(str) / 2, height, 0);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:1537:25:  [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).
  unsigned int i, len = wcslen(str);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:1584:41:  [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).
      utfstr_max = (sizeof(char) * 4 * (wcslen(str) + 1));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:1589:23:  [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).
      for (i = 0; i < wcslen(str); i++)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:1666:50:  [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).
  return thumbnail(img_title_large_off, height * wcslen(str) / 2, height, 0);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:6670: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).
  unsigned dirlen = strlen(dir);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:6902: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).
  unsigned len = strlen(sd->stampname);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:6903: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).
  char *buf = alloca(len + strlen("_mirror_flip.EXT") + 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7148: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).
  unsigned len = strlen(sd->stampname);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7149: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).
  char *buf = alloca(len + strlen("_mirror_flip.EXT") + 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7517:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      for (i = strlen(load_stamp_basedir) + 1; i < strlen(dir); i++)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7517:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      for (i = strlen(load_stamp_basedir) + 1; i < strlen(dir); i++)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:7635: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).
  unsigned dirlen = strlen(dir);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10457: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).
      for (i = 0; i <= strlen((char *)locale_str); i++)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10635: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).
  else if (strlen(str) != 0)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10653: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(tstr) > sizeof(substr) - 1)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10659: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).
      for (i = 0; i < strlen(tstr); i++)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10808: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).
  snd_fname = malloc(strlen(fname) + strlen(lang_prefix) + 16);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10808: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).
  snd_fname = malloc(strlen(fname) + strlen(lang_prefix) + 16);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10909: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).
  unsigned i = strlen(buf);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10961:11:  [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(def_buf, "");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10989: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).
                          debug(buf + strlen(wished_langs[i].lang_prefix));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10990: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).
                          if ((char *)strcasestr(buf + strlen(wished_langs[i].lang_prefix), ".utf8=") ==
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:10991: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).
                              buf + strlen(wished_langs[i].lang_prefix))
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:11024: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).
          return (strdup(buf + (strlen(lang_prefix)) + 6));
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:11332: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).
          starter_id[strlen(starter_id) - 1] = '\0';
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:11340:27:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              color_tag = fgetc(fi);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:11363:27:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              color_tag = fgetc(fi);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:11370: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).
              template_id[strlen(template_id) - 1] = '\0';
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:11377:34:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              starter_modified = fgetc(fi);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:11410: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).
      for (i = 0; i < strlen(ext); i++)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:11713: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).
          if (strlen(file_id) > 0)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:11715: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).
              file_id[strlen(file_id) - 1] = '\0';
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:12148: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(btn_no) != 0)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:12207: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).
                  if (strlen(btn_no) != 0)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:12234: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).
                  else if (strlen(btn_no) != 0 &&
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:12248: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).
                   (strlen(btn_no) != 0 &&
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13266: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).
  headersLen = strlen(headers);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:13687: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).
      dat_size = strlen(char_stream);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:14079:27:  [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((char *)strcasestr(fname, FNAME_EXTENSION), "");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:14085:27:  [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((char *)strcasestr(fname, ".bmp"), "");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:15113:23:  [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((char *)strcasestr(fname, FNAME_EXTENSION), "");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:15119:23:  [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((char *)strcasestr(fname, ".bmp"), "");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:16685: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).
  n = strlen(str) + 1;
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:16709:16:  [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).
  unsigned n = wcslen(str) + 1;
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:16743: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).
  dstr = malloc(strlen(str) + 5);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:16747: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).
      dstr[strlen(str)] = '\0';
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:16749: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).
      for (i = 0; i < strlen(str); i++)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:16751: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).
          j = (strlen(str) - i - 1);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:17950: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(file) > 4 && strcasecmp(file + strlen(file) - 4, ".kpx") == 0)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:17950: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).
  if (strlen(file) > 4 && strcasecmp(file + strlen(file) - 4, ".kpx") == 0)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:17955: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).
  else if (strlen(file) > 4 && strcasecmp(file + strlen(file) - 4, ".svg") == 0)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:17955:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  else if (strlen(file) > 4 && strcasecmp(file + strlen(file) - 4, ".svg") == 0)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:17982:5:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    fgetc(fi);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:18089:23:  [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(strchr(objname, '.'), "");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:18815:23:  [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((char *)strcasestr(fname, FNAME_EXTENSION), "");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:18821:23:  [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((char *)strcasestr(fname, ".bmp"), "");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:18828:23:  [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((char *)strcasestr(fname, ".svg"), "");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:18835:23:  [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((char *)strcasestr(fname, ".kpx"), "");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:18841:23:  [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((char *)strcasestr(fname, ".jpg"), "");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:21388:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            a = fgetc(lfi);
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:21463:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          for (c = 0; c < strlen(ttffont); c++)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:21466:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          for (c = 0; c < strlen(node->save_font_type); c++)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:23085: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).
                      while (str[strlen(str) - 1] == '\n' || str[strlen(str) - 1] == '\r')
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:23085:66:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                      while (str[strlen(str) - 1] == '\n' || str[strlen(str) - 1] == '\r')
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:23086: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).
                        str[strlen(str) - 1] = '\0';
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:23094:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                          if (strlen(tmp_str) == 6)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:23105: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).
                          else if (strlen(tmp_str) == 3)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24118: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(title_names[i]) > 0)
data/tuxpaint-0.9.24~git20190922-f7d30d/src/tuxpaint.c:24562: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(strstr(bname, "."), "\0");
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_dirent.c:130:57:  [1] (buffer) strlen:
  Does not handle 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 = (((char *)&entry->d_name) - ((char *)entry)) + strlen(entry->d_name) + 1;
data/tuxpaint-0.9.24~git20190922-f7d30d/src/win32_print.c:544: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).
  int len = strlen(path);

ANALYSIS SUMMARY:

Hits = 720
Lines analyzed = 56338 in approximately 1.81 seconds (31071 lines/second)
Physical Source Lines of Code (SLOC) = 39329
Hits@level = [0] 886 [1] 226 [2] 372 [3]  27 [4]  95 [5]   0
Hits@level+ = [0+] 1606 [1+] 720 [2+] 494 [3+] 122 [4+]  95 [5+]   0
Hits/KSLOC@level+ = [0+] 40.835 [1+] 18.3071 [2+] 12.5607 [3+] 3.10204 [4+] 2.41552 [5+]   0
Symlinks skipped = 1 (--allowlink overrides but see doc for security issue)
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.