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/aalib-1.4p5/acconfig.h
Examining data/aalib-1.4p5/src/aafont.c
Examining data/aalib-1.4p5/src/aafonts.c
Examining data/aalib-1.4p5/src/aavyhen.c
Examining data/aalib-1.4p5/src/aamktabl.c
Examining data/aalib-1.4p5/src/aamem.c
Examining data/aalib-1.4p5/src/aaprintf.c
Examining data/aalib-1.4p5/src/aaslang.c
Examining data/aalib-1.4p5/src/aafastre.c
Examining data/aalib-1.4p5/src/aax.c
Examining data/aalib-1.4p5/src/aaxkbd.c
Examining data/aalib-1.4p5/src/aaxmouse.c
Examining data/aalib-1.4p5/src/fontgl.c
Examining data/aalib-1.4p5/src/font16.c
Examining data/aalib-1.4p5/src/font14.c
Examining data/aalib-1.4p5/src/fontx16.c
Examining data/aalib-1.4p5/src/fontx13.c
Examining data/aalib-1.4p5/src/fontx13b.c
Examining data/aalib-1.4p5/src/fontcour.c
Examining data/aalib-1.4p5/src/aarec.c
Examining data/aalib-1.4p5/src/font9.c
Examining data/aalib-1.4p5/src/font8.c
Examining data/aalib-1.4p5/src/fontline.c
Examining data/aalib-1.4p5/src/aacurmou.c
Examining data/aalib-1.4p5/src/aalib.c
Examining data/aalib-1.4p5/src/aaflush.c
Examining data/aalib-1.4p5/src/aarender.c
Examining data/aalib-1.4p5/src/aaout.c
Examining data/aalib-1.4p5/src/aain.c
Examining data/aalib-1.4p5/src/aaedit.c
Examining data/aalib-1.4p5/src/aaregist.c
Examining data/aalib-1.4p5/src/aakbdreg.c
Examining data/aalib-1.4p5/src/aagpm.c
Examining data/aalib-1.4p5/src/aamoureg.c
Examining data/aalib-1.4p5/src/aastdout.c
Examining data/aalib-1.4p5/src/aaparse.c
Examining data/aalib-1.4p5/src/aaimgwidth.c
Examining data/aalib-1.4p5/src/aaimgheight.c
Examining data/aalib-1.4p5/src/aascrwidth.c
Examining data/aalib-1.4p5/src/aascrheight.c
Examining data/aalib-1.4p5/src/aammwidth.c
Examining data/aalib-1.4p5/src/aammheight.c
Examining data/aalib-1.4p5/src/aaimage.c
Examining data/aalib-1.4p5/src/aatext.c
Examining data/aalib-1.4p5/src/aacurrfnt.c
Examining data/aalib-1.4p5/src/aaattrs.c
Examining data/aalib-1.4p5/src/aaputpixel.c
Examining data/aalib-1.4p5/src/aarecfunc.c
Examining data/aalib-1.4p5/src/aainfo.c
Examining data/aalib-1.4p5/src/aatest.c
Examining data/aalib-1.4p5/src/aafire.c
Examining data/aalib-1.4p5/src/aasavefont.c
Examining data/aalib-1.4p5/src/aalib.h
Examining data/aalib-1.4p5/src/aados.c
Examining data/aalib-1.4p5/src/aadoskbd.c
Examining data/aalib-1.4p5/src/aadosmou.c
Examining data/aalib-1.4p5/src/aaos2.c
Examining data/aalib-1.4p5/src/aaos2kbd.c
Examining data/aalib-1.4p5/src/aaos2mou.c
Examining data/aalib-1.4p5/src/aaint.h
Examining data/aalib-1.4p5/src/aamktabl.h
Examining data/aalib-1.4p5/src/aaxint.h
Examining data/aalib-1.4p5/src/toc.c
Examining data/aalib-1.4p5/src/aasave.c
Examining data/aalib-1.4p5/src/aacurkbd.c
Examining data/aalib-1.4p5/src/aastdin.c
Examining data/aalib-1.4p5/src/aalinux.c
Examining data/aalib-1.4p5/src/aacurses.c
Examining data/aalib-1.4p5/src/aaslnkbd.c
Examining data/aalib-1.4p5/src/aalinuxkbd.c
Examining data/aalib-1.4p5/src/aahelp.c

FINAL RESULTS:

data/aalib-1.4p5/src/aados.c:114:3:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
		gets(c);
data/aalib-1.4p5/src/aaos2.c:100:5:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
    gets(c);
data/aalib-1.4p5/src/aaos2.c:111:5:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
    gets(c);
data/aalib-1.4p5/src/aainfo.c:21:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(str, "\n Current driver:%s\n"
data/aalib-1.4p5/src/aainfo.c:42:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(str1, "\n Current driver:%s\n"
data/aalib-1.4p5/src/aainfo.c:51:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(str2, "\n Current driver:%s\n"
data/aalib-1.4p5/src/aaprintf.c:10:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
  i=vsprintf(buf,fmt,args);
data/aalib-1.4p5/src/aasave.c:410:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(f, FORMAT->prints[attr], chr, chr, chr, chr);
data/aalib-1.4p5/src/aasave.c:412:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(f, FORMAT->prints[attr], conversions[ch], conversions[ch],
data/aalib-1.4p5/src/aalinux.c:67:14:  [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 ((env = getenv ("AAVCS")) != NULL)
data/aalib-1.4p5/src/aaparse.c:298: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.
    env = getenv("AAOPTS");
data/aalib-1.4p5/src/aax.c:163:9:  [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 ("AAFont"))
data/aalib-1.4p5/src/aax.c:164:14:  [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.
      font = getenv ("AAFont");
data/aalib-1.4p5/src/aax.c:250: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.
    X_setinversionmode (getenv ("AAInverted") != NULL, d);
data/aalib-1.4p5/src/aax.c:272: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("AABlink"))
data/aalib-1.4p5/src/aados.c:44:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char modes[60];
data/aalib-1.4p5/src/aados.c:113:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[256];
data/aalib-1.4p5/src/aados.c:187:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(__djgpp_conventional_base + (char *) d, c1, l);
data/aalib-1.4p5/src/aados.c:196:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[aa_scrwidth(c) * aa_scrheight(c) * 2], *pos;
data/aalib-1.4p5/src/aadoskbd.c:154:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static volatile char key[128];                   /* key pressed flags */
data/aalib-1.4p5/src/aaedit.c:8: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 s[1000];
data/aalib-1.4p5/src/aaflush.c:11: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 str[80];
data/aalib-1.4p5/src/aainfo.c:7:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char str[256];
data/aalib-1.4p5/src/aainfo.c:8: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 str1[256];
data/aalib-1.4p5/src/aainfo.c:9: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 str2[256];
data/aalib-1.4p5/src/aainfo.c:49:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(str1, "not available");
data/aalib-1.4p5/src/aainfo.c:58:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(str2, "not available");
data/aalib-1.4p5/src/aaint.h:53: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 charset[AA_NATTRS];
data/aalib-1.4p5/src/aalib.h:263:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    __AA_CONST char * __AA_CONST prints[AA_NATTRS];
data/aalib-1.4p5/src/aalib.h:264:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    __AA_CONST char * __AA_CONST begin[AA_NATTRS];
data/aalib-1.4p5/src/aalib.h:265:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    __AA_CONST char * __AA_CONST ends[AA_NATTRS];
data/aalib-1.4p5/src/aalinux.c:52:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[20];
data/aalib-1.4p5/src/aalinux.c:53:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tmp[256], *env;
data/aalib-1.4p5/src/aalinux.c:81:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	  vc[nvcs] = fopen (tmp, "w+");
data/aalib-1.4p5/src/aalinux.c:83:17:  [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).
	    vc[nvcs] = fopen (tmp, "w"), readonly = 1;
data/aalib-1.4p5/src/aalinux.c:91: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 (fname, "/dev/vcsa%i", vt);
data/aalib-1.4p5/src/aalinux.c:92:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      vc[0] = fopen (fname, "w+");
data/aalib-1.4p5/src/aalinux.c:94:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	vc[0] = fopen (fname, "w"), readonly = 1;
data/aalib-1.4p5/src/aalinux.c:102:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      fd = open ("/dev/console", 0);
data/aalib-1.4p5/src/aalinux.c:105: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 buf[32 * 1024];
data/aalib-1.4p5/src/aalinuxkbd.c:116: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 key_down[128];
data/aalib-1.4p5/src/aaos2.c:95: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 c[255];
data/aalib-1.4p5/src/aaos2.c:106: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 c[256];
data/aalib-1.4p5/src/aaos2.c:139: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((void *) &vio_mode, (const void *) &oldMode, sizeof(VIOMODEINFO));
data/aalib-1.4p5/src/aaout.c:5: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 s1[10000];
data/aalib-1.4p5/src/aaparse.c:140:21:  [2] (integer) atol:
  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).
	    r->randomval = atol(argv[i]);
data/aalib-1.4p5/src/aaparse.c:149:18:  [2] (integer) atol:
  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).
	    r->bright = atol(argv[i]);
data/aalib-1.4p5/src/aaparse.c:158:20:  [2] (integer) atol:
  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).
	    r->contrast = atol(argv[i]);
data/aalib-1.4p5/src/aaparse.c:167:17:  [2] (integer) atol:
  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).
	    p->width = atol(argv[i]);
data/aalib-1.4p5/src/aaparse.c:176:20:  [2] (integer) atol:
  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).
	    p->recwidth = atol(argv[i]);
data/aalib-1.4p5/src/aaparse.c:185:20:  [2] (integer) atol:
  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).
	    p->minwidth = atol(argv[i]);
data/aalib-1.4p5/src/aaparse.c:194:20:  [2] (integer) atol:
  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).
	    p->maxwidth = atol(argv[i]);
data/aalib-1.4p5/src/aaparse.c:203:18:  [2] (integer) atol:
  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).
	    p->height = atol(argv[i]);
data/aalib-1.4p5/src/aaparse.c:212:21:  [2] (integer) atol:
  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).
	    p->recheight = atol(argv[i]);
data/aalib-1.4p5/src/aaparse.c:221:21:  [2] (integer) atol:
  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).
	    p->minheight = atol(argv[i]);
data/aalib-1.4p5/src/aaparse.c:230:21:  [2] (integer) atol:
  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).
	    p->maxheight = atol(argv[i]);
data/aalib-1.4p5/src/aaparse.c:296: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 *argv[256], *argv1[256];
data/aalib-1.4p5/src/aaprintf.c:7:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[1025];
data/aalib-1.4p5/src/aasave.c:361:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(*data, d, sizeof(struct aa_savedata));
data/aalib-1.4p5/src/aasave.c:400: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 chr[2];
data/aalib-1.4p5/src/aasave.c:441: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[4096];
data/aalib-1.4p5/src/aasave.c:442:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    __AA_CONST char *conversions[256];
data/aalib-1.4p5/src/aasave.c:455:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		    f = fopen(fname, "w");
data/aalib-1.4p5/src/aasave.c:471:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	    f = fopen(fname, "w");
data/aalib-1.4p5/src/aasave.c:511: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 text[8];
data/aalib-1.4p5/src/aasave.c:513: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(text, "%i", x);
data/aalib-1.4p5/src/aasave.c:524: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 text[8];
data/aalib-1.4p5/src/aasave.c:526: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(text, "%i", y);
data/aalib-1.4p5/src/aasave.c:537: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 text[8];
data/aalib-1.4p5/src/aasave.c:539: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(text, "_%i_%i", x, y);
data/aalib-1.4p5/src/aasavefont.c:13:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen(argv[1], "w");
data/aalib-1.4p5/src/aaslnkbd.c:45:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen("/dev/null", "r");
data/aalib-1.4p5/src/aatest.c:6: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 s[256];
data/aalib-1.4p5/src/aatest.c:8: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(s, "line editor.");
data/aalib-1.4p5/src/aatest.c:37:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(s, "Mouse test-space to exit");
data/aalib-1.4p5/src/aatest.c:42:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    char s[80];
data/aalib-1.4p5/src/aatest.c:45:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf(s, "Mouse test-space to exit. x:%i y:%i b:%i event #%i  ", x, y, b, co);
data/aalib-1.4p5/src/aatest.c:52:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    char s[80];
data/aalib-1.4p5/src/aatest.c:55:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf(s, "Hidden mouse test-space to exit. x:%i y:%i b:%i event #%i  ", x, y, b, co);
data/aalib-1.4p5/src/aax.c:503:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(d->previousa, c->attrbuffer, d->width * d->height);
data/aalib-1.4p5/src/aax.c:504:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(d->previoust, c->textbuffer, d->width * d->height);
data/aalib-1.4p5/src/aaxkbd.c:33: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 name[256];
data/aalib-1.4p5/src/aaedit.c:10: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 (e->cursor > (int)strlen(e->data))
data/aalib-1.4p5/src/aaedit.c:11: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).
	e->cursor = strlen(e->data);
data/aalib-1.4p5/src/aaedit.c:18:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(s, e->data + e->printpos, e->size);
data/aalib-1.4p5/src/aaedit.c:20:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    for (i = strlen(e->data) - e->printpos; i < e->size; i++)
data/aalib-1.4p5/src/aaedit.c:43: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).
    e->cursor = strlen(s);
data/aalib-1.4p5/src/aaedit.c:55:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int i, s = strlen(e->data);
data/aalib-1.4p5/src/aaedit.c:67:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int i, s = strlen(e->data);
data/aalib-1.4p5/src/aaedit.c:97: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 (e->cursor > (int)strlen(e->data))
data/aalib-1.4p5/src/aaedit.c:98: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).
	    e->cursor = strlen(e->data);
data/aalib-1.4p5/src/aalinuxkbd.c:266:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(tty_fd, &c, 1) <= 0)
data/aalib-1.4p5/src/aalinuxkbd.c:310:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(50000);
data/aalib-1.4p5/src/aaos2.c:183:3:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  getchar();
data/aalib-1.4p5/src/aaparse.c:302: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 < (int)strlen(env); i++) {
data/aalib-1.4p5/src/aaparse.c:314:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(argv[argc], env + s, i - s);
data/aalib-1.4p5/src/aastdin.c:82:6:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c = getc(stdin);
data/aalib-1.4p5/src/aaxkbd.c:57: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(name)!=1) return (AA_UNKNOWN+ksym);
data/aalib-1.4p5/src/toc.c:9:22:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		printf("0x%02x, ", getc(stdin));
data/aalib-1.4p5/src/toc.c:11:3:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		getc(stdin);

ANALYSIS SUMMARY:

Hits = 100
Lines analyzed = 11585 in approximately 0.46 seconds (25042 lines/second)
Physical Source Lines of Code (SLOC) = 10385
Hits@level = [0]  82 [1]  18 [2]  67 [3]   6 [4]   6 [5]   3
Hits@level+ = [0+] 182 [1+] 100 [2+]  82 [3+]  15 [4+]   9 [5+]   3
Hits/KSLOC@level+ = [0+] 17.5253 [1+] 9.62927 [2+] 7.896 [3+] 1.44439 [4+] 0.866635 [5+] 0.288878
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.