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/libasyncns-0.8/libasyncns/asyncns.h
Examining data/libasyncns-0.8/libasyncns/asyncns.c
Examining data/libasyncns-0.8/libasyncns/asyncns-test.c

FINAL RESULTS:

data/libasyncns-0.8/libasyncns/asyncns.c:435: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((char*) p + sizeof(addrinfo_serialization_t) + ai->ai_addrlen, ai->ai_canonname);
data/libasyncns-0.8/libasyncns/asyncns.c:1198: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((char*) req + sizeof(addrinfo_request_t), node);
data/libasyncns-0.8/libasyncns/asyncns.c:1201: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((char*) req + sizeof(addrinfo_request_t) + req->node_len, service);
data/libasyncns-0.8/libasyncns/asyncns.c:1365:5:  [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((char*) req + sizeof(res_request_t), dname);
data/libasyncns-0.8/libasyncns/asyncns-test.c:49: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 host[NI_MAXHOST] = "", serv[NI_MAXSERV] = "";
data/libasyncns-0.8/libasyncns/asyncns-test.c:103:13:  [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 t[256];
data/libasyncns-0.8/libasyncns/asyncns-test.c:135: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 name[256];
data/libasyncns-0.8/libasyncns/asyncns.c:204: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(n, s, a);
data/libasyncns-0.8/libasyncns/asyncns.c:431: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((uint8_t*) p, &s, sizeof(addrinfo_serialization_t));
data/libasyncns-0.8/libasyncns/asyncns.c:432: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((uint8_t*) p + sizeof(addrinfo_serialization_t), ai->ai_addr, ai->ai_addrlen);
data/libasyncns-0.8/libasyncns/asyncns.c:496:9:  [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((uint8_t *)data + sizeof(nameinfo_response_t), host, hl);
data/libasyncns-0.8/libasyncns/asyncns.c:499:9:  [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((uint8_t *)data + sizeof(nameinfo_response_t) + hl, serv, sl);
data/libasyncns-0.8/libasyncns/asyncns.c:521:9:  [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((uint8_t *)data + sizeof(res_response_t), answer, ret);
data/libasyncns-0.8/libasyncns/asyncns.c:566:13:  [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 hostbuf[NI_MAXHOST], servbuf[NI_MAXSERV];
data/libasyncns-0.8/libasyncns/asyncns.c:572: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(&sa, (const uint8_t *) ni_req + sizeof(nameinfo_request_t), ni_req->sockaddr_len);
data/libasyncns-0.8/libasyncns/asyncns.c:639:9:  [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 (open("/dev/null", O_RDONLY) != 0)
data/libasyncns-0.8/libasyncns/asyncns.c:642:9:  [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 (open("/dev/null", O_WRONLY) != 1)
data/libasyncns-0.8/libasyncns/asyncns.c:645:9:  [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 (open("/dev/null", O_WRONLY) != 2)
data/libasyncns-0.8/libasyncns/asyncns.c:959:9:  [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(ai->ai_addr, (const uint8_t*) p + sizeof(addrinfo_serialization_t), s.ai_addrlen);
data/libasyncns-0.8/libasyncns/asyncns.c:962:9:  [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(ai->ai_canonname, (const uint8_t*) p + sizeof(addrinfo_serialization_t) + s.ai_addrlen, s.canonname_len);
data/libasyncns-0.8/libasyncns/asyncns.c:1070:21:  [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->serv, (const char *)resp + sizeof(res_response_t), res_resp->ret);
data/libasyncns-0.8/libasyncns/asyncns.c:1279: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((uint8_t*) req + sizeof(nameinfo_request_t), sa, salen);
data/libasyncns-0.8/libasyncns/asyncns.c:197: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).
    a = strlen(s);
data/libasyncns-0.8/libasyncns/asyncns.c:418: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).
    cnl = (ai->ai_canonname ? strlen(ai->ai_canonname)+1 : 0);
data/libasyncns-0.8/libasyncns/asyncns.c:480: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).
    sl = serv ? strlen(serv)+1 : 0;
data/libasyncns-0.8/libasyncns/asyncns.c:481: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).
    hl = host ? strlen(host)+1 : 0;
data/libasyncns-0.8/libasyncns/asyncns.c:1178: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).
    req->node_len = node ? strlen(node)+1 : 0;
data/libasyncns-0.8/libasyncns/asyncns.c:1179:34:  [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).
    req->service_len = service ? strlen(service)+1 : 0;
data/libasyncns-0.8/libasyncns/asyncns.c:1311:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(ret_host, q->host, hostlen);
data/libasyncns-0.8/libasyncns/asyncns.c:1316:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(ret_serv, q->serv, servlen);
data/libasyncns-0.8/libasyncns/asyncns.c:1351:22:  [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).
    req->dname_len = strlen(dname) + 1;

ANALYSIS SUMMARY:

Hits = 31
Lines analyzed = 1861 in approximately 0.08 seconds (22794 lines/second)
Physical Source Lines of Code (SLOC) = 1261
Hits@level = [0]  16 [1]   9 [2]  18 [3]   0 [4]   4 [5]   0
Hits@level+ = [0+]  47 [1+]  31 [2+]  22 [3+]   4 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 37.272 [1+] 24.5837 [2+] 17.4465 [3+] 3.17209 [4+] 3.17209 [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.