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/python-setuptools-44.1.1/launcher.c

FINAL RESULTS:

data/python-setuptools-44.1.1/launcher.c:46:5:  [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, format, data);
data/python-setuptools-44.1.1/launcher.c:239:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(cmdline, "%s", executable);
data/python-setuptools-44.1.1/launcher.c:242:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(cmdline+len, " %s", args[counter]);
data/python-setuptools-44.1.1/launcher.c:267:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(script, (GUI ? "-script.pyw" : "-script.py"));
data/python-setuptools-44.1.1/launcher.c:318:9:  [4] (shell) execv:
  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.
        execv(ptr, (const char * const *)(newargs));
data/python-setuptools-44.1.1/launcher.c:109: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 drive[_MAX_DRIVE], dir[_MAX_DIR], fname[_MAX_FNAME], ext[_MAX_EXT];
data/python-setuptools-44.1.1/launcher.c:110: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 path[_MAX_PATH], c, *result;
data/python-setuptools-44.1.1/launcher.c:250: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 python[256];   /* python executable's filename*/
data/python-setuptools-44.1.1/launcher.c:252: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 script[256];   /* the script's filename */
data/python-setuptools-44.1.1/launcher.c:271:15:  [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).
    scriptf = open(script, O_RDONLY);
data/python-setuptools-44.1.1/launcher.c:285: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(python, "#!python.exe");
data/python-setuptools-44.1.1/launcher.c:51: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 i, ln = strlen(data), nb;
data/python-setuptools-44.1.1/launcher.c:100:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(result, exename, MAX_PATH);
data/python-setuptools-44.1.1/launcher.c:125: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).
    result = dir + strlen(dir) -1;
data/python-setuptools-44.1.1/launcher.c:137:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char **result = calloc(strlen(cmdline), sizeof(char *));
data/python-setuptools-44.1.1/launcher.c:233:9:  [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(executable)+2;
data/python-setuptools-44.1.1/launcher.c:235: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).
        len+=strlen(args[counter])+1;
data/python-setuptools-44.1.1/launcher.c:240:9:  [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(executable);
data/python-setuptools-44.1.1/launcher.c:243: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).
        len+=strlen(args[counter])+1;
data/python-setuptools-44.1.1/launcher.c:263: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).
    end = script + strlen(script);
data/python-setuptools-44.1.1/launcher.c:275:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    end = python + read(scriptf, python, sizeof(python));

ANALYSIS SUMMARY:

Hits = 21
Lines analyzed = 336 in approximately 0.12 seconds (2798 lines/second)
Physical Source Lines of Code (SLOC) = 196
Hits@level = [0]   2 [1]  10 [2]   6 [3]   0 [4]   5 [5]   0
Hits@level+ = [0+]  23 [1+]  21 [2+]  11 [3+]   5 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 117.347 [1+] 107.143 [2+] 56.1224 [3+] 25.5102 [4+] 25.5102 [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.