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/libpar-packer-perl-1.050/myldr/sha1.h
Examining data/libpar-packer-perl-1.050/myldr/boot.c
Examining data/libpar-packer-perl-1.050/myldr/main.c
Examining data/libpar-packer-perl-1.050/myldr/internals.c
Examining data/libpar-packer-perl-1.050/myldr/env.c
Examining data/libpar-packer-perl-1.050/myldr/usernamefrompwuid.c
Examining data/libpar-packer-perl-1.050/myldr/sha1.c
Examining data/libpar-packer-perl-1.050/myldr/utils.c
Examining data/libpar-packer-perl-1.050/myldr/mktmpdir.h
Examining data/libpar-packer-perl-1.050/myldr/mktmpdir.c
Examining data/libpar-packer-perl-1.050/contrib/pp_osx_codesign_fix/pp_osx_codesign_fix.c

FINAL RESULTS:

data/libpar-packer-perl-1.050/myldr/boot.c:66:5:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    chmod(tmp_path, 0750);
data/libpar-packer-perl-1.050/myldr/main.c:28:15:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
    int len = readlink(PROCSELFEXE_PATH, buf, sizeof(buf) - 1);
data/libpar-packer-perl-1.050/myldr/utils.c:58:9:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
    n = readlink( proc_path, link, MAXPATHLEN);
data/libpar-packer-perl-1.050/myldr/boot.c:45:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(*ext_path, "%s/%s", stmpdir, ext_name);
data/libpar-packer-perl-1.050/myldr/boot.c:51:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(tmp_path, "%s.%lu", *ext_path, (unsigned long)getpid());
data/libpar-packer-perl-1.050/myldr/boot.c:211:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(chatr_cmd, "/usr/bin/chatr +s enable %s > /dev/null", my_perl);
data/libpar-packer-perl-1.050/myldr/boot.c:212:13:  [4] (shell) system:
  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.
            system(chatr_cmd);
data/libpar-packer-perl-1.050/myldr/boot.c:280:5:  [4] (shell) execvp:
  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.
    execvp(my_perl, argv);
data/libpar-packer-perl-1.050/myldr/env.c:101:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(p, "%s=%s", name, value);
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:32:12:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
           access(val, W_OK) == 0;
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:65:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:145:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buf, "%s\\temp", val);
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:173:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(top_tmpdir, "%s%s%s%s", tmpdir, dir_sep, subdirbuf_prefix, username);
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:232:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:253:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:266:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:279:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:313:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(subsubdir, "%s\\*.*", stmpdir);
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:320:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(subsubdir, "%s\\%s", stmpdir, cur_file.name);
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:323:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(subsubdir, "%s", cur_file.name);
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:364:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(subsubdir, "%s/%s", stmpdir, dp->d_name);
data/libpar-packer-perl-1.050/myldr/mktmpdir.h:3:13:  [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.
#    define snprintf _snprintf
data/libpar-packer-perl-1.050/myldr/mktmpdir.h:3:22:  [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.
#    define snprintf _snprintf
data/libpar-packer-perl-1.050/myldr/mktmpdir.h:6:13:  [4] (format) vsnprintf:
  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.
#    define vsnprintf _vsnprintf
data/libpar-packer-perl-1.050/myldr/utils.c:48:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    n = sprintf( proc_path, "/proc/%i/%s", (int)getpid(), 
data/libpar-packer-perl-1.050/myldr/utils.c:160:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(filename, "%s%s%s", p, dir_sep, prog);
data/libpar-packer-perl-1.050/myldr/utils.c:162:13:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
            access(filename, X_OK) == 0) {
data/libpar-packer-perl-1.050/myldr/boot.c:252:16:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
    hinstLib = LoadLibrary("user32");
data/libpar-packer-perl-1.050/contrib/pp_osx_codesign_fix/pp_osx_codesign_fix.c:56: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).
  FILE *obj_file = fopen(filename, "r+b");
data/libpar-packer-perl-1.050/myldr/boot.c:53:10:  [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(tmp_path, O_CREAT | O_WRONLY | OPEN_O_BINARY, 0755);
data/libpar-packer-perl-1.050/myldr/boot.c:135:13:  [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(q, p, n);            /* copy the span */
data/libpar-packer-perl-1.050/myldr/boot.c:140:17:  [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(q, p, n);        /* copy the span once more */
data/libpar-packer-perl-1.050/myldr/boot.c:223:18:  [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(my_prog, O_RDONLY | OPEN_O_BINARY, 0755);
data/libpar-packer-perl-1.050/myldr/boot.c:229:18:  [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(my_perl, O_RDWR | OPEN_O_BINARY, 0755);
data/libpar-packer-perl-1.050/myldr/main.c:27: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[MAXPATHLEN];
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:94: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 sha1[41];
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:96: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 buf[32768];
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:97: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 sha_data[20];
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:129:13:  [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(h, "%02x", *(unsigned char*)u);
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:224:35:  [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).
    if ( !par_env_clean() && (f = open( progname, O_RDONLY | OPEN_O_BINARY ))) {
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:250:17:  [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( sha1+k*2, "%02x", sha_data[k] );
data/libpar-packer-perl-1.050/myldr/sha1.c:247: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(((U8 *) sha_info->data) + sha_info->local, buffer, i);
data/libpar-packer-perl-1.050/myldr/sha1.c:258: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(sha_info->data, buffer, SHA_BLOCKSIZE);
data/libpar-packer-perl-1.050/myldr/sha1.c:263: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(sha_info->data, buffer, count);
data/libpar-packer-perl-1.050/myldr/sha1.c:268:45:  [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 void sha_transform_and_copy(unsigned char digest[20], SHA_INFO *sha_info)
data/libpar-packer-perl-1.050/myldr/sha1.c:294:25:  [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 sha_final(unsigned char digest[20], SHA_INFO *sha_info)
data/libpar-packer-perl-1.050/myldr/sha1.h:5:32:  [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 void sha_final(unsigned char digest[20], SHA_INFO *sha_info);
data/libpar-packer-perl-1.050/myldr/utils.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 proc_path[MAXPATHLEN + 1], link[MAXPATHLEN + 1];
data/libpar-packer-perl-1.050/myldr/utils.c:66: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( ret, link, n );
data/libpar-packer-perl-1.050/myldr/utils.c:86: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 *p, filename[MAXPATHLEN];
data/libpar-packer-perl-1.050/myldr/utils.c:189:12:  [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 bname[MAXPATHLEN];
data/libpar-packer-perl-1.050/myldr/boot.c:41: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).
    int len = strlen(stmpdir) + 1 + strlen(ext_name);
data/libpar-packer-perl-1.050/myldr/boot.c:41:37:  [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(stmpdir) + 1 + strlen(ext_name);
data/libpar-packer-perl-1.050/myldr/boot.c:101:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read(fd, buf, 64);                  // CHECK == 64
data/libpar-packer-perl-1.050/myldr/boot.c:106:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read(fd, buf, 4 + 20 + 2);         // CHECK == 4 + 20 + 2
data/libpar-packer-perl-1.050/myldr/boot.c:121: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 *dst = malloc(2 * strlen(src) + 3);
data/libpar-packer-perl-1.050/myldr/boot.c:210:38:  [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 *chatr_cmd = malloc(strlen(my_perl) + 200);
data/libpar-packer-perl-1.050/myldr/boot.c:226:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            read(fd, &subsystem, 2);    // CHECK == 2
data/libpar-packer-perl-1.050/myldr/boot.c:266: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).
        int len = strlen(*argp);
data/libpar-packer-perl-1.050/myldr/env.c:98: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).
	char* p = (char*)malloc((size_t)(strlen(name) + strlen(value) + 2));
data/libpar-packer-perl-1.050/myldr/env.c:98:50:  [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* p = (char*)malloc((size_t)(strlen(name) + strlen(value) + 2));
data/libpar-packer-perl-1.050/myldr/env.c:113: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).
	l_value = strlen(value);
data/libpar-packer-perl-1.050/myldr/env.c:115:7:  [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(c) >= l_value) {	/* old larger; copy over */
data/libpar-packer-perl-1.050/myldr/internals.c:70: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).
            STRLEN len = strlen( fakeargv[0] );
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:58:49:  [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 ( (val = par_getenv(ld_path)) == NULL || strlen(val) == 0 ) {
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:64: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).
            strlen(stmpdir) + strlen(path_sep) + strlen(val) + 1);
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:64:31:  [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).
            strlen(stmpdir) + strlen(path_sep) + strlen(val) + 1);
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:64:50:  [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).
            strlen(stmpdir) + strlen(path_sep) + strlen(val) + 1);
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:99:42:  [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 ( (val = par_getenv(PAR_TEMP)) && strlen(val) ) {
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:117: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).
            if ( (val = par_getenv(key)) && strlen(val) ) 
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:126:36:  [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 *hexname = malloc(2 * strlen(username) + 1);
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:135:41:  [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 ( (val = par_getenv(key)) && strlen(val) && isWritableDir(val) ) {
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:143: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).
    if ( tmpdir == NULL && (val = par_getenv("WinDir")) && strlen(val) ) {
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:144: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* buf = malloc(strlen(val) + 5 + 1);
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:155:61:  [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 ; tmpdir == NULL && (val = temp_dirs[i]) && strlen(val) ; i++ ) {
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:163: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).
        strlen(tmpdir) +
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:164: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).
        strlen(subdirbuf_prefix) +
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:165: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).
        strlen(username) +
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:166: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).
        strlen(subdirbuf_suffix) + 1024;
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:211: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 prog_len = strlen(progname);
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:212: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 parl_len = strlen(PARL_EXE);
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:218: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).
	    && strlen(argv[1]) >= 4
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:219:25:  [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).
	    && STREQ(argv[1] + strlen(argv[1]) - 4, ".par"))
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:226:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        read(f, buf, 6);
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:231:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            read(f, buf, 41);
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:242:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            while( ( j = read( f, buf, sizeof( buf ) ) ) > 0 )
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:308:31:  [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 ((stmpdir == NULL) || !strlen(stmpdir)) return;
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:310: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).
    subsub_len = strlen(stmpdir) + 258;
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:362: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).
            subsub_len = strlen(stmpdir) + 1 + strlen(dp->d_name) + 1;
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:362:48:  [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).
            subsub_len = strlen(stmpdir) + 1 + strlen(dp->d_name) + 1;
data/libpar-packer-perl-1.050/myldr/mktmpdir.c:384:48:  [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 ( par_env_clean() && stmpdir != NULL && strlen(stmpdir)) {
data/libpar-packer-perl-1.050/myldr/utils.c:138: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).
    proglen = strlen(prog);
data/libpar-packer-perl-1.050/myldr/utils.c:148: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).
        plen = strlen(p);
data/libpar-packer-perl-1.050/myldr/utils.c:198: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).
    endp = path + strlen(path) - 1;
data/libpar-packer-perl-1.050/myldr/utils.c:222:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(bname, path, endp - path + 1);
data/libpar-packer-perl-1.050/myldr/utils.c:259:32:  [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).
        buf = par_clean + 12 + strlen("CLEAN");
data/libpar-packer-perl-1.050/myldr/utils.c:260:40:  [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 (strncmp(buf, "PAR_CLEAN=", strlen("PAR_CLEAN=")) == 0) {
data/libpar-packer-perl-1.050/myldr/utils.c:261: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).
            par_setenv("PAR_CLEAN", buf + strlen("PAR_CLEAN="));

ANALYSIS SUMMARY:

Hits = 98
Lines analyzed = 1949 in approximately 0.14 seconds (13965 lines/second)
Physical Source Lines of Code (SLOC) = 1386
Hits@level = [0]  17 [1]  47 [2]  23 [3]   1 [4]  24 [5]   3
Hits@level+ = [0+] 115 [1+]  98 [2+]  51 [3+]  28 [4+]  27 [5+]   3
Hits/KSLOC@level+ = [0+] 82.9726 [1+] 70.7071 [2+] 36.7965 [3+] 20.202 [4+] 19.4805 [5+] 2.1645
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.