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/aewm-1.3.12/menu.h
Examining data/aewm-1.3.12/aewm_init.c
Examining data/aewm-1.3.12/common.h
Examining data/aewm-1.3.12/aemenu.c
Examining data/aewm-1.3.12/parser.c
Examining data/aewm-1.3.12/atom.h
Examining data/aewm-1.3.12/parser.h
Examining data/aewm-1.3.12/common.c
Examining data/aewm-1.3.12/aewm_client.c
Examining data/aewm-1.3.12/atom.c
Examining data/aewm-1.3.12/aesession.c
Examining data/aewm-1.3.12/aewm_event.c
Examining data/aewm-1.3.12/aewm_manip.c
Examining data/aewm-1.3.12/menu.c
Examining data/aewm-1.3.12/aewm.h
Examining data/aewm-1.3.12/aedesk.c
Examining data/aewm-1.3.12/aepanel.c

FINAL RESULTS:

data/aewm-1.3.12/aewm_init.c:109:13:  [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(USAGE);
data/aewm-1.3.12/aewm_init.c:112:13:  [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, "aewm: unknown option: '%s'\n" USAGE, argv[i]);
data/aewm-1.3.12/common.c:20:13:  [4] (shell) execlp:
  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.
            execlp("/bin/sh", "sh", "-c", cmd, NULL);
data/aewm-1.3.12/aedesk.c:32:60:  [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.
        fprintf(stderr, "aedesk: can't open display %s\n", getenv("DISPLAY"));
data/aewm-1.3.12/aewm_init.c:210:61:  [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.
        fprintf(stderr, "aewm: can't open $DISPLAY '%s'\n", getenv("DISPLAY"));
data/aewm-1.3.12/parser.c:21:50:  [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(buf, sizeof buf, "%s/.aewm/%s", getenv("HOME"), def);
data/aewm-1.3.12/aedesk.c:38: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).
            desk = atol(argv[++i]);
data/aewm-1.3.12/aedesk.c:58:36:  [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).
            return UMOD(cur_desk + atol(spec), ndesks);
data/aewm-1.3.12/aedesk.c:63:16:  [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).
        return atol(spec);
data/aewm-1.3.12/aemenu.c:93: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[BUF_SIZE];
data/aewm-1.3.12/aepanel.c:178: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[NAME_SIZE];
data/aewm-1.3.12/aepanel.c:236: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[NAME_SIZE];
data/aewm-1.3.12/aewm_init.c:88:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            opt_bw = atoi(argv[++i]);
data/aewm-1.3.12/aewm_init.c:90:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            opt_pad = atoi(argv[++i]);
data/aewm-1.3.12/aewm_init.c:132: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[BUF_SIZE], token[BUF_SIZE], *p;
data/aewm-1.3.12/aewm_init.c:161:30:  [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).
                    opt_bw = atoi(token);
data/aewm-1.3.12/aewm_init.c:164:31:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                    opt_pad = atoi(token);
data/aewm-1.3.12/aewm_init.c:167: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).
                    opt_imap = atoi(token);
data/aewm-1.3.12/aewm_init.c:360:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char msg[255];
data/aewm-1.3.12/aewm_manip.c:380: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[256];
data/aewm-1.3.12/menu.c:41:17:  [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(buf+len-4, "...");
data/aewm-1.3.12/menu.c:44:17:  [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(buf+len-5, "...]");
data/aewm-1.3.12/menu.c:103: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[BUF_SIZE], token[BUF_SIZE], *p;
data/aewm-1.3.12/menu.c:125:31:  [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 *f = fopen(token, "r");
data/aewm-1.3.12/parser.c:16: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[BUF_SIZE];
data/aewm-1.3.12/parser.c:19: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).
        return fopen(rcfile, "r");
data/aewm-1.3.12/parser.c:22:19:  [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 ((rc = fopen(buf, "r"))) {
data/aewm-1.3.12/parser.c:26: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).
            return fopen(buf, "r");
data/aewm-1.3.12/aemenu.c:25:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    unsigned long read, left;
data/aewm-1.3.12/aemenu.c:53:42:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        for (i = 0, left = 1; left; i += read) {
data/aewm-1.3.12/aemenu.c:56:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (read)
data/aewm-1.3.12/aepanel.c:57:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    unsigned long read, left;
data/aewm-1.3.12/aepanel.c:112:38:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    for (i = 0, left = 1; left; i += read) {
data/aewm-1.3.12/aepanel.c:114:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read)
data/aewm-1.3.12/aepanel.c:265:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    unsigned long read, left;
data/aewm-1.3.12/aepanel.c:269:38:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    for (i = 0, left = 1; left; i += read) {
data/aewm-1.3.12/aepanel.c:271:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read)
data/aewm-1.3.12/aewm_client.c:320:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    unsigned long read, left;
data/aewm-1.3.12/aewm_client.c:323:38:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    for (i = 0, left = 1; left; i += read) {
data/aewm-1.3.12/aewm_client.c:325:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read) {
data/aewm-1.3.12/aewm_client.c:387: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).
                (unsigned char *)c->name, strlen(c->name));
data/aewm-1.3.12/aewm_client.c:390: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).
                (unsigned char *)c->name, strlen(c->name));
data/aewm-1.3.12/aewm_client.c:395: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).
                c->name, strlen(c->name));
data/aewm-1.3.12/aewm_client.c:398: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).
                c->name, strlen(c->name));
data/aewm-1.3.12/aewm_manip.c:393:64:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        re - opt_pad - font->descent/2 - XTextWidth(font, buf, strlen(buf)),
data/aewm-1.3.12/aewm_manip.c:394:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        be - opt_pad - font->descent, buf, strlen(buf));
data/aewm-1.3.12/atom.c:87:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    unsigned long tmp, read, left, *new;
data/aewm-1.3.12/atom.c:91:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (!read) return;
data/aewm-1.3.12/atom.c:94:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read && tmp != remove)
data/aewm-1.3.12/atom.c:97:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    for (i = 1, read = left = 1; read && left; i += read) {
data/aewm-1.3.12/atom.c:97:53:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    for (i = 1, read = left = 1; read && left; i += read) {
data/aewm-1.3.12/atom.c:99:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (!read)

ANALYSIS SUMMARY:

Hits = 52
Lines analyzed = 3275 in approximately 0.10 seconds (33222 lines/second)
Physical Source Lines of Code (SLOC) = 2551
Hits@level = [0]  26 [1]  24 [2]  22 [3]   3 [4]   3 [5]   0
Hits@level+ = [0+]  78 [1+]  52 [2+]  28 [3+]   6 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 30.5762 [1+] 20.3842 [2+] 10.9761 [3+] 2.35202 [4+] 1.17601 [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.