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/olla-1.1/include/domain_expander.h
Examining data/olla-1.1/include/getaddrinfo.h
Examining data/olla-1.1/src/domain_expander.c
Examining data/olla-1.1/src/getaddrinfo.c

FINAL RESULTS:

data/olla-1.1/src/domain_expander.c:105:9:  [4] (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).
        strcpy( *result, subdomain );
data/olla-1.1/src/domain_expander.c:106:9:  [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( *result, domain );
data/olla-1.1/src/domain_expander.c:128: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 line[256];
data/olla-1.1/src/domain_expander.c:131: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).
    fd = fopen( "/etc/olla.conf", "r" );
data/olla-1.1/src/domain_expander.c:43:10:  [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( host ) < start + len ) {
data/olla-1.1/src/domain_expander.c:74: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 ( substr( host, &res, (strlen(host) - strlen(tld)), strlen(tld) ) ) {
data/olla-1.1/src/domain_expander.c:74:46:  [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 ( substr( host, &res, (strlen(host) - strlen(tld)), strlen(tld) ) ) {
data/olla-1.1/src/domain_expander.c:74: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 ( substr( host, &res, (strlen(host) - strlen(tld)), strlen(tld) ) ) {
data/olla-1.1/src/domain_expander.c:103: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).
        substr( c, &subdomain, 0, (strlen(c) - strlen(tld)) );
data/olla-1.1/src/domain_expander.c:103: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).
        substr( c, &subdomain, 0, (strlen(c) - strlen(tld)) );
data/olla-1.1/src/domain_expander.c:104: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).
        *result = malloc( sizeof(char) * strlen(subdomain) + strlen(domain));
data/olla-1.1/src/domain_expander.c:104:62:  [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 = malloc( sizeof(char) * strlen(subdomain) + strlen(domain));
data/olla-1.1/src/domain_expander.c:144:24:  [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 vlen = strlen(value) - 1;

ANALYSIS SUMMARY:

Hits = 13
Lines analyzed = 289 in approximately 0.02 seconds (12207 lines/second)
Physical Source Lines of Code (SLOC) = 108
Hits@level = [0]   0 [1]   9 [2]   2 [3]   0 [4]   2 [5]   0
Hits@level+ = [0+]  13 [1+]  13 [2+]   4 [3+]   2 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 120.37 [1+] 120.37 [2+] 37.037 [3+] 18.5185 [4+] 18.5185 [5+]   0
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.