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/t4kcommon-0.1.1/src/t4k_alphasort.h
Examining data/t4kcommon-0.1.1/src/t4k_throttle.c
Examining data/t4kcommon-0.1.1/src/t4k_linewrap.c
Examining data/t4kcommon-0.1.1/src/gettext.h
Examining data/t4kcommon-0.1.1/src/linebreak/xsize.h
Examining data/t4kcommon-0.1.1/src/linebreak/linebreak.c
Examining data/t4kcommon-0.1.1/src/linebreak/linebreak.h
Examining data/t4kcommon-0.1.1/src/linebreak/uniwidth.h
Examining data/t4kcommon-0.1.1/src/linebreak/streq.h
Examining data/t4kcommon-0.1.1/src/linebreak/unitypes.h
Examining data/t4kcommon-0.1.1/src/linebreak/unistr.h
Examining data/t4kcommon-0.1.1/src/linebreak/localcharset.h
Examining data/t4kcommon-0.1.1/src/linebreak/unistr/u8-mbtouc-unsafe-aux.c
Examining data/t4kcommon-0.1.1/src/linebreak/unistr/u16-mbtouc.c
Examining data/t4kcommon-0.1.1/src/linebreak/unistr/u8-uctomb-aux.c
Examining data/t4kcommon-0.1.1/src/linebreak/unistr/u16-mbtouc-unsafe-aux.c
Examining data/t4kcommon-0.1.1/src/linebreak/unistr/u8-mbtouc-unsafe.c
Examining data/t4kcommon-0.1.1/src/linebreak/unistr/u16-mbtouc-aux.c
Examining data/t4kcommon-0.1.1/src/linebreak/unistr/u8-uctomb.c
Examining data/t4kcommon-0.1.1/src/linebreak/unistr/u8-mbtouc.c
Examining data/t4kcommon-0.1.1/src/linebreak/unistr/u8-mbtouc-aux.c
Examining data/t4kcommon-0.1.1/src/linebreak/unistr/u16-mbtouc-unsafe.c
Examining data/t4kcommon-0.1.1/src/linebreak/uniwidth/width.c
Examining data/t4kcommon-0.1.1/src/linebreak/uniwidth/cjk.h
Examining data/t4kcommon-0.1.1/src/linebreak/lbrkprop.h
Examining data/t4kcommon-0.1.1/src/t4k_replacements.c
Examining data/t4kcommon-0.1.1/src/t4k_main.c
Examining data/t4kcommon-0.1.1/src/t4k_pixels.c
Examining data/t4kcommon-0.1.1/src/t4k_sdl.c
Examining data/t4kcommon-0.1.1/src/t4k_scandir.h
Examining data/t4kcommon-0.1.1/src/t4k_convert_utf.c
Examining data/t4kcommon-0.1.1/src/t4k_menu.c
Examining data/t4kcommon-0.1.1/src/t4k_globals.h
Examining data/t4kcommon-0.1.1/src/t4k_compiler.h
Examining data/t4kcommon-0.1.1/src/t4k_audio.c
Examining data/t4kcommon-0.1.1/src/t4k_loaders.c
Examining data/t4kcommon-0.1.1/src/t4k_common.h

FINAL RESULTS:

data/t4kcommon-0.1.1/src/t4k_loaders.c:400:5:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
    strncat(opt_path, "/", T4K_PATH_MAX);
data/t4kcommon-0.1.1/src/t4k_loaders.c:401:5:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
    strncat(opt_path, suffix, T4K_PATH_MAX);
data/t4kcommon-0.1.1/src/t4k_common.h:81:12:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
           fprintf(stderr, #Expr ": %s\n", (Expr)); fflush(stderr); \
data/t4kcommon-0.1.1/src/t4k_common.h:88:12:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
           fprintf(stderr, #Expr ": %x\n", (Expr)); fflush(stderr); \
data/t4kcommon-0.1.1/src/t4k_common.h:95:12:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
           fprintf(stderr, #Expr ": %f\n", (Expr)); fflush(stderr); \
data/t4kcommon-0.1.1/src/t4k_common.h:105:12:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
           fprintf(stderr, __VA_ARGS__); fflush(stderr); \
data/t4kcommon-0.1.1/src/t4k_common.h:140:12:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
           fprintf(stderr, __VA_ARGS__); fflush(stderr); \
data/t4kcommon-0.1.1/src/t4k_compiler.h:51:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf(stderr, \
data/t4kcommon-0.1.1/src/t4k_loaders.c:451:3:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  snprintf(fn, T4K_PATH_MAX, IMAGE_DIR "/%s", file_name);
data/t4kcommon-0.1.1/src/t4k_loaders.c:674:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(fn, IMAGE_DIR "/%s.svg", name);
data/t4kcommon-0.1.1/src/t4k_loaders.c:693:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(pngfn, "%s/" IMAGE_DIR "/%sd-%d-%d.png", cachepath, name, width, height);
data/t4kcommon-0.1.1/src/t4k_loaders.c:701:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(pngfn, "%s/" IMAGE_DIR "/%s%d-%d-%d.png", cachepath, name, i, width, height);
data/t4kcommon-0.1.1/src/t4k_loaders.c:730:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(pngfn, "%s/" IMAGE_DIR "/%sd-%d-%d.png", cachepath, name, width, height);
data/t4kcommon-0.1.1/src/t4k_loaders.c:735:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
          sprintf(pngfn, "%s/" IMAGE_DIR "/%s%d-%d-%d.png", cachepath, name, i, width, height);
data/t4kcommon-0.1.1/src/t4k_loaders.c:749:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(fn, "%sd.png", name);  // The 'd' means the default image
data/t4kcommon-0.1.1/src/t4k_loaders.c:762:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(fn, "%s%d.png", name, i);
data/t4kcommon-0.1.1/src/t4k_loaders.c:841: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(svg_info[numSVG].fn,fn);
data/t4kcommon-0.1.1/src/t4k_loaders.c:870: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(cached_surface[numSurfaces].fn,fn);
data/t4kcommon-0.1.1/src/t4k_loaders.c:1116:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(fn, SOUNDS_DIR "/%s", datafile);
data/t4kcommon-0.1.1/src/t4k_loaders.c:1132:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(tempfn, SOUNDS_DIR "/%s", datafile);
data/t4kcommon-0.1.1/src/t4k_menu.c:368:3:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  snprintf(temp, T4K_PATH_MAX, MENU_DIR "/%s", file_name);
data/t4kcommon-0.1.1/src/t4k_menu.c:1165:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(filename, "%s/%s", data_prefix, curr_node->icon_name);
data/t4kcommon-0.1.1/src/t4k_replacements.c:72: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(findIn, dirname);
data/t4kcommon-0.1.1/src/t4k_replacements.c:117: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(selectDir->d_name, find.cFileName);
data/t4kcommon-0.1.1/src/t4k_sdl.c:1729:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(fontfile, "%s/fonts/%s", COMMON_DATA_PREFIX, font_name);
data/t4kcommon-0.1.1/src/t4k_loaders.c:390:39:  [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.
    snprintf(udd, T4K_PATH_MAX, "%s", getenv("HOME"));
data/t4kcommon-0.1.1/src/gettext.h:194:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char msg_ctxt_id[msgctxt_len + msgid_len];
data/t4kcommon-0.1.1/src/gettext.h:196:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[1024];
data/t4kcommon-0.1.1/src/gettext.h:204: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 (msg_ctxt_id, msgctxt, msgctxt_len - 1);
data/t4kcommon-0.1.1/src/gettext.h:206: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 (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
data/t4kcommon-0.1.1/src/gettext.h:240:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char msg_ctxt_id[msgctxt_len + msgid_len];
data/t4kcommon-0.1.1/src/gettext.h:242:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[1024];
data/t4kcommon-0.1.1/src/gettext.h:250: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 (msg_ctxt_id, msgctxt, msgctxt_len - 1);
data/t4kcommon-0.1.1/src/gettext.h:252: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 (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
data/t4kcommon-0.1.1/src/linebreak/lbrkprop.h:29: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.
    unsigned char level3[100 << 7];
data/t4kcommon-0.1.1/src/linebreak/linebreak.c:120: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 lbrk_table[19][19] = {
data/t4kcommon-0.1.1/src/linebreak/linebreak.c:836:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      int width = atoi (argv[1]);
data/t4kcommon-0.1.1/src/linebreak/linebreak.c:899:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tmpbuf[TMPBUFSIZE];
data/t4kcommon-0.1.1/src/linebreak/linebreak.c:1312:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      int width = atoi (argv[1]);
data/t4kcommon-0.1.1/src/linebreak/uniwidth/width.c:35: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 nonspacing_table_data[22*64] = {
data/t4kcommon-0.1.1/src/linebreak/uniwidth/width.c:235: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.
static const signed char nonspacing_table_ind[240] = {
data/t4kcommon-0.1.1/src/t4k_common.h:242:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char wrapped_lines[MAX_LINES][MAX_LINEWIDTH]; //!< Global buffer for wrapped lines.
data/t4kcommon-0.1.1/src/t4k_common.h:1826:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                  char        str_list[MAX_LINES][MAX_LINEWIDTH],
data/t4kcommon-0.1.1/src/t4k_common.h:1891:30:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void T4K_LineWrapList( const char input[MAX_LINES][MAX_LINEWIDTH],
data/t4kcommon-0.1.1/src/t4k_common.h:1892:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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_list[MAX_LINES][MAX_LINEWIDTH],
data/t4kcommon-0.1.1/src/t4k_convert_utf.c:44: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 temp_wchar[UTF_BUF_LENGTH];
data/t4kcommon-0.1.1/src/t4k_convert_utf.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 temp_UTF8[UTF_BUF_LENGTH];
data/t4kcommon-0.1.1/src/t4k_linewrap.c:34: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 wrapped_lines0[MAX_LINES][MAX_LINEWIDTH];  // for internal storage
data/t4kcommon-0.1.1/src/t4k_linewrap.c:35: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 wrapped_lines[MAX_LINES][MAX_LINEWIDTH]; // publicly available!
data/t4kcommon-0.1.1/src/t4k_linewrap.c:39:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int T4K_LineWrap(const char *input, char str_list[MAX_LINES][MAX_LINEWIDTH],
data/t4kcommon-0.1.1/src/t4k_linewrap.c:39:37:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int T4K_LineWrap(const char *input, char str_list[MAX_LINES][MAX_LINEWIDTH],
data/t4kcommon-0.1.1/src/t4k_linewrap.c:44:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char breaks[MAX_LINES * MAX_LINEWIDTH];
data/t4kcommon-0.1.1/src/t4k_linewrap.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 breaks[MAX_LINES * MAX_LINEWIDTH];
data/t4kcommon-0.1.1/src/t4k_linewrap.c:154:29:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void T4K_LineWrapList(const char input[MAX_LINES][MAX_LINEWIDTH],
data/t4kcommon-0.1.1/src/t4k_linewrap.c:155:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                   char str_list[MAX_LINES][MAX_LINEWIDTH],
data/t4kcommon-0.1.1/src/t4k_loaders.c:70:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char fn[T4K_PATH_MAX];
data/t4kcommon-0.1.1/src/t4k_loaders.c:86:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char fn[T4K_PATH_MAX];
data/t4kcommon-0.1.1/src/t4k_loaders.c:101: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 app_prefix_path[1][T4K_PATH_MAX];
data/t4kcommon-0.1.1/src/t4k_loaders.c:129: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(file, "r");
data/t4kcommon-0.1.1/src/t4k_loaders.c:150:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char tmp_path[T4K_PATH_MAX];
data/t4kcommon-0.1.1/src/t4k_loaders.c:198:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char lay_name[20];
data/t4kcommon-0.1.1/src/t4k_loaders.c:219:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(lay_name, "#frame%d", new_sprite->num_frames);
data/t4kcommon-0.1.1/src/t4k_loaders.c:370:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char udd[T4K_PATH_MAX];
data/t4kcommon-0.1.1/src/t4k_loaders.c:377: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          path[2*MAX_PATH];
data/t4kcommon-0.1.1/src/t4k_loaders.c:437:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fn[T4K_PATH_MAX];
data/t4kcommon-0.1.1/src/t4k_loaders.c:463: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(strrchr(fn, '.'), ".svg");
data/t4kcommon-0.1.1/src/t4k_loaders.c:498:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(fn + fn_len - 3, "png");
data/t4kcommon-0.1.1/src/t4k_loaders.c:662:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fn[T4K_PATH_MAX]; //the qualified filename relative to the data prefix
data/t4kcommon-0.1.1/src/t4k_loaders.c:666:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char cachepath[T4K_PATH_MAX]; //path to the cache directory
data/t4kcommon-0.1.1/src/t4k_loaders.c:667:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char pngfn[T4K_PATH_MAX]; //absolute filename to a cached PNG
data/t4kcommon-0.1.1/src/t4k_loaders.c:964: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(fn, "wb");
data/t4kcommon-0.1.1/src/t4k_loaders.c:1114:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fn[T4K_PATH_MAX];
data/t4kcommon-0.1.1/src/t4k_loaders.c:1128:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tempfn[T4K_PATH_MAX];
data/t4kcommon-0.1.1/src/t4k_menu.c:236:32:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                tnode->param = atoi(current->children->content);
data/t4kcommon-0.1.1/src/t4k_menu.c:245:39:  [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).
                tnode->submenu_size = atoi(current->children->content);
data/t4kcommon-0.1.1/src/t4k_menu.c:357:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char temp[T4K_PATH_MAX];
data/t4kcommon-0.1.1/src/t4k_menu.c:867: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.
	      char out[256];
data/t4kcommon-0.1.1/src/t4k_menu.c:1104:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[buf_size];
data/t4kcommon-0.1.1/src/t4k_replacements.c:79:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(findIn, ".\\*");
data/t4kcommon-0.1.1/src/t4k_replacements.c:83:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(findIn, ".\\*");
data/t4kcommon-0.1.1/src/t4k_replacements.c:124: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(tempDir, dir, sizeof(struct dirent*)*NDir);
data/t4kcommon-0.1.1/src/t4k_replacements.c:215:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p->d_name, d->d_name, p->d_reclen + 1);
data/t4kcommon-0.1.1/src/t4k_sdl.c:1509:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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/t4kcommon-0.1.1/src/t4k_sdl.c:1616:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char prev_font_name[FONT_NAME_LENGTH];
data/t4kcommon-0.1.1/src/t4k_sdl.c:1624:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[64];
data/t4kcommon-0.1.1/src/t4k_sdl.c:1696:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char prev_font_name[FONT_NAME_LENGTH];
data/t4kcommon-0.1.1/src/t4k_sdl.c:1728:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fontfile[PATH_MAX];
data/t4kcommon-0.1.1/src/t4k_sdl.c:1738:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(fontfile, "/usr/share/fonts/truetype/ttf-sil-andika/AndikaDesRevG.ttf");
data/t4kcommon-0.1.1/src/gettext.h:190: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 msgctxt_len = strlen (msgctxt) + 1;
data/t4kcommon-0.1.1/src/gettext.h:191:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t msgid_len = strlen (msgid) + 1;
data/t4kcommon-0.1.1/src/gettext.h:236: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 msgctxt_len = strlen (msgctxt) + 1;
data/t4kcommon-0.1.1/src/gettext.h:237:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t msgid_len = strlen (msgid) + 1;
data/t4kcommon-0.1.1/src/linebreak/linebreak.c:803:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      int length = strlen (input);
data/t4kcommon-0.1.1/src/linebreak/linebreak.c:838:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      int length = strlen (input);
data/t4kcommon-0.1.1/src/linebreak/linebreak.c:1282:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      int length = strlen (input);
data/t4kcommon-0.1.1/src/linebreak/linebreak.c:1314:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      int length = strlen (input);
data/t4kcommon-0.1.1/src/t4k_convert_utf.c:74:3:  [1] (buffer) wcsncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  wcsncpy(wide_word, temp_wchar, max_length);
data/t4kcommon-0.1.1/src/t4k_convert_utf.c:78:10:  [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 wcslen(wide_word);
data/t4kcommon-0.1.1/src/t4k_convert_utf.c:126:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(UTF8_word, temp_UTF8, max_length);
data/t4kcommon-0.1.1/src/t4k_convert_utf.c:130:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  return strlen(UTF8_word);
data/t4kcommon-0.1.1/src/t4k_linewrap.c:42:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int length = strlen (input);
data/t4kcommon-0.1.1/src/t4k_linewrap.c:95:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int length = strlen (input);
data/t4kcommon-0.1.1/src/t4k_linewrap.c:164: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 (inputIndex = 0; strlen(input[inputIndex]) > 0 && outputIndex < max_lines-1; inputIndex++)
data/t4kcommon-0.1.1/src/t4k_linewrap.c:170:2:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
	strcpy(str_list[outputIndex++]," ");
data/t4kcommon-0.1.1/src/t4k_linewrap.c:185:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(str_list[outputIndex], wrapped_lines0[intermedIndex], max_width);
data/t4kcommon-0.1.1/src/t4k_loaders.c:106: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);
data/t4kcommon-0.1.1/src/t4k_loaders.c:143:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(app_prefix_path[0], path, T4K_PATH_MAX);
data/t4kcommon-0.1.1/src/t4k_loaders.c:396:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(opt_path, udd, T4K_PATH_MAX);
data/t4kcommon-0.1.1/src/t4k_loaders.c:452: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).
  fn_len = strlen(fn);
data/t4kcommon-0.1.1/src/t4k_replacements.c:70:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len    = strlen(dirname);
data/t4kcommon-0.1.1/src/t4k_replacements.c:116:60:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    selectDir=(struct dirent*)malloc(sizeof(struct dirent)+strlen(find.cFileName));
data/t4kcommon-0.1.1/src/t4k_sdl.c:1580: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).
      int len = strlen(t);
data/t4kcommon-0.1.1/src/t4k_sdl.c:1640:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(prev_font_name, T4K_AskFontName(), sizeof(prev_font_name));
data/t4kcommon-0.1.1/src/t4k_sdl.c:1714:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(prev_font_name, T4K_AskFontName(), sizeof(prev_font_name));

ANALYSIS SUMMARY:

Hits = 114
Lines analyzed = 13907 in approximately 0.44 seconds (31676 lines/second)
Physical Source Lines of Code (SLOC) = 8965
Hits@level = [0]  68 [1]  26 [2]  62 [3]   1 [4]  23 [5]   2
Hits@level+ = [0+] 182 [1+] 114 [2+]  88 [3+]  26 [4+]  25 [5+]   2
Hits/KSLOC@level+ = [0+] 20.3012 [1+] 12.7161 [2+] 9.81595 [3+] 2.90017 [4+] 2.78862 [5+] 0.22309
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.