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/httpfs2-0.1.4/httpfs2.c

FINAL RESULTS:

data/httpfs2-0.1.4/httpfs2.c:609:25:  [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.
    if(fork_terminal && access(fork_terminal, O_RDWR)){
data/httpfs2-0.1.4/httpfs2.c:121: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 b64_encode_table[64] = {
data/httpfs2-0.1.4/httpfs2.c:370: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(res, str, n);
data/httpfs2-0.1.4/httpfs2.c:495: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).
        res->port = atoi(strchr(url, ':') + 1);
data/httpfs2-0.1.4/httpfs2.c:636:34:  [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).
                        int fd = open(fork_terminal, O_RDONLY);
data/httpfs2-0.1.4/httpfs2.c:639:30:  [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(fork_terminal, O_WRONLY);
data/httpfs2-0.1.4/httpfs2.c:642:30:  [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(fork_terminal, O_WRONLY|O_SYNC);
data/httpfs2-0.1.4/httpfs2.c:718: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(res, url, sizeof(struct_url));
data/httpfs2-0.1.4/httpfs2.c:797: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 portstr[10];
data/httpfs2-0.1.4/httpfs2.c:1121: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[HEADER_SIZE];
data/httpfs2-0.1.4/httpfs2.c:1140: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[HEADER_SIZE];
data/httpfs2-0.1.4/httpfs2.c:1160: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(destination, b, bytes);
data/httpfs2-0.1.4/httpfs2.c:368: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(n > strlen(str)) n = strlen(str);
data/httpfs2-0.1.4/httpfs2.c:368:29:  [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(n > strlen(str)) n = strlen(str);
data/httpfs2-0.1.4/httpfs2.c:378: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 (size < strlen(pref)) return 0;
data/httpfs2-0.1.4/httpfs2.c:379: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).
   return ! memcmp(mem, pref, strlen(pref));
data/httpfs2-0.1.4/httpfs2.c:457: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).
    if (strncmp(http, url, strlen(http)) == 0) {
data/httpfs2-0.1.4/httpfs2.c:458: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).
        url += strlen(http);
data/httpfs2-0.1.4/httpfs2.c:462: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).
    } else if (strncmp(https, url, strlen(https)) == 0) {
data/httpfs2-0.1.4/httpfs2.c:463: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).
        url += strlen(https);
data/httpfs2-0.1.4/httpfs2.c:511: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).
    const char * end = url + strlen(url);
data/httpfs2-0.1.4/httpfs2.c:749:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        res = read(url->sockfd, buf, len);
data/httpfs2-0.1.4/httpfs2.c:961: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(!mempref(ptr, http, end - ptr) || !isdigit( *(ptr + strlen(http))) ) {
data/httpfs2-0.1.4/httpfs2.c:967: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).
    status = strtol( ptr + strlen(http), (char **)&ptr, 10);
data/httpfs2-0.1.4/httpfs2.c:1006: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).
                && isdigit( *(ptr + strlen(content_length_str))) ){
data/httpfs2-0.1.4/httpfs2.c:1007: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).
            *content_length = atoll(ptr + strlen(content_length_str));
data/httpfs2-0.1.4/httpfs2.c:1017: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).
            if(!strptime(ptr + strlen(date),
data/httpfs2-0.1.4/httpfs2.c:1020:39:  [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).
                        method, ptr + strlen(date),
data/httpfs2-0.1.4/httpfs2.c:1021:39:  [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 - ptr) - strlen(date)) ;

ANALYSIS SUMMARY:

Hits = 29
Lines analyzed = 1178 in approximately 0.05 seconds (24787 lines/second)
Physical Source Lines of Code (SLOC) = 910
Hits@level = [0]  36 [1]  17 [2]  11 [3]   0 [4]   1 [5]   0
Hits@level+ = [0+]  65 [1+]  29 [2+]  12 [3+]   1 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 71.4286 [1+] 31.8681 [2+] 13.1868 [3+] 1.0989 [4+] 1.0989 [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.