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/xtermset-0.5.2/acconfig.h
Examining data/xtermset-0.5.2/src/arguments.c
Examining data/xtermset-0.5.2/src/term.c
Examining data/xtermset-0.5.2/src/xtermset.h
Examining data/xtermset-0.5.2/src/xtermset.c

FINAL RESULTS:

data/xtermset-0.5.2/src/arguments.c:39: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(r->param,param);
data/xtermset-0.5.2/src/xtermset.c:87:21:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                    strcpy(fn[code],argv[++i]);
data/xtermset-0.5.2/src/xtermset.c:124:21:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                    strcpy(argptr->param,tok);
data/xtermset-0.5.2/src/xtermset.c:155:24:  [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(ESC "]%d;%s" BEL, argptr->command,argptr->param);
data/xtermset-0.5.2/src/xtermset.c:168:6:  [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(ESC "[%dt", argptr->command);
data/xtermset-0.5.2/src/xtermset.c:249:2:  [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(ESC "[3;%s;%st", x, y);
data/xtermset-0.5.2/src/xtermset.c:253:2:  [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(ESC "[8;%s;%st", height, width);
data/xtermset-0.5.2/src/xtermset.c:256:6:  [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(ESC "[3;%s;%st", x, y);
data/xtermset-0.5.2/src/xtermset.c:265: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(fname,fn);
data/xtermset-0.5.2/src/xtermset.c:267: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(fname,strcat(strcat(getenv("HOME"),"/"),RCFILE));
data/xtermset-0.5.2/src/xtermset.c:267:22:  [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).
        strcpy(fname,strcat(strcat(getenv("HOME"),"/"),RCFILE));
data/xtermset-0.5.2/src/xtermset.h:91:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
   strcpy(argptr->param,argv[++i]); \
data/xtermset-0.5.2/src/term.c:157:10:  [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.
   trm = getenv("TERM");
data/xtermset-0.5.2/src/xtermset.c:267:36:  [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.
        strcpy(fname,strcat(strcat(getenv("HOME"),"/"),RCFILE));
data/xtermset-0.5.2/src/term.c:117: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 line[MAXTERMCHARS+3];
data/xtermset-0.5.2/src/term.c:121:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   fp = fopen(TERMSDIR "/" TERMSFILE,"r");
data/xtermset-0.5.2/src/xtermset.c:37: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 fn[3][MAXFNCHARS-1],c,*tok;
data/xtermset-0.5.2/src/xtermset.c:38:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char line[MAXOPTCHARS+10]; /* ? */
data/xtermset-0.5.2/src/xtermset.c:114: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).
              style=atoi(tok);
data/xtermset-0.5.2/src/xtermset.c:117:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
              code=atoi(tok);
data/xtermset-0.5.2/src/xtermset.c:263: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 fname[MAXFNCHARS-1];
data/xtermset-0.5.2/src/xtermset.c:269: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).
    return fopen(fname,mode);
data/xtermset-0.5.2/src/xtermset.h:101: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 param[MAXOPTCHARS-1];
data/xtermset-0.5.2/src/xtermset.h:121:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char name[MAXTERMCHARS];
data/xtermset-0.5.2/src/term.c:36:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
   strncpy(r->name,name,len);
data/xtermset-0.5.2/src/term.c:128:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            c=getc(fp);
data/xtermset-0.5.2/src/term.c:134: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((line[0]=='#')||(strlen(line)==0))
data/xtermset-0.5.2/src/term.c:136:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
         l = strlen(line);
data/xtermset-0.5.2/src/term.c:167: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).
            fnd = (strncmp(trm,cur_term->name,strlen(cur_term->name)) == 0);
data/xtermset-0.5.2/src/term.c:169: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).
            fnd = (strncmp(trm+(strlen(trm)-strlen(cur_term->name)),cur_term->name,strlen(cur_term->name))==0);
data/xtermset-0.5.2/src/term.c:169: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).
            fnd = (strncmp(trm+(strlen(trm)-strlen(cur_term->name)),cur_term->name,strlen(cur_term->name))==0);
data/xtermset-0.5.2/src/term.c:169:84:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            fnd = (strncmp(trm+(strlen(trm)-strlen(cur_term->name)),cur_term->name,strlen(cur_term->name))==0);
data/xtermset-0.5.2/src/xtermset.c:105:20:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                 c=getc(rcfile);
data/xtermset-0.5.2/src/xtermset.c:110:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              if((line[0]=='#')||(strlen(line)==0))
data/xtermset-0.5.2/src/xtermset.c:146: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(argptr->param)>0)
data/xtermset-0.5.2/src/xtermset.c:153: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).
	       if(strlen(argptr->param)>0) {
data/xtermset-0.5.2/src/xtermset.c:160:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
               if(strlen(argptr->param)>0) {
data/xtermset-0.5.2/src/xtermset.c:264:8:  [1] (buffer) strlen:
  Does not handle 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(fn)>0) {
data/xtermset-0.5.2/src/xtermset.c:267:29:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
        strcpy(fname,strcat(strcat(getenv("HOME"),"/"),RCFILE));

ANALYSIS SUMMARY:

Hits = 39
Lines analyzed = 778 in approximately 0.05 seconds (15571 lines/second)
Physical Source Lines of Code (SLOC) = 576
Hits@level = [0]  24 [1]  15 [2]  10 [3]   2 [4]  12 [5]   0
Hits@level+ = [0+]  63 [1+]  39 [2+]  24 [3+]  14 [4+]  12 [5+]   0
Hits/KSLOC@level+ = [0+] 109.375 [1+] 67.7083 [2+] 41.6667 [3+] 24.3056 [4+] 20.8333 [5+]   0
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.