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/slowhttptest-1.8.2/src/range-generator.cc
Examining data/slowhttptest-1.8.2/src/range-generator.h
Examining data/slowhttptest-1.8.2/src/range-request-generator-main.cc
Examining data/slowhttptest-1.8.2/src/range-request-generator.cc
Examining data/slowhttptest-1.8.2/src/range-request-generator.h
Examining data/slowhttptest-1.8.2/src/slowhttptest.cc
Examining data/slowhttptest-1.8.2/src/slowhttptest.h
Examining data/slowhttptest-1.8.2/src/slowhttptestmain.cc
Examining data/slowhttptest-1.8.2/src/slowlog.cc
Examining data/slowhttptest-1.8.2/src/slowlog.h
Examining data/slowhttptest-1.8.2/src/slowsocket.cc
Examining data/slowhttptest-1.8.2/src/slowsocket.h
Examining data/slowhttptest-1.8.2/src/slowstats.cc
Examining data/slowhttptest-1.8.2/src/slowstats.h
Examining data/slowhttptest-1.8.2/src/slowstats_test.cc
Examining data/slowhttptest-1.8.2/src/slowurl.cc
Examining data/slowhttptest-1.8.2/src/slowurl.h
Examining data/slowhttptest-1.8.2/src/socket.cc
Examining data/slowhttptest-1.8.2/src/socket.h
Examining data/slowhttptest-1.8.2/src/ssl_socket.cc
Examining data/slowhttptest-1.8.2/src/ssl_socket.h
Examining data/slowhttptest-1.8.2/src/text-generator.cc
Examining data/slowhttptest-1.8.2/src/text-generator.h
Examining data/slowhttptest-1.8.2/src/text_gen_test.cc

FINAL RESULTS:

data/slowhttptest-1.8.2/src/slowhttptest.cc:382:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(csv_file_name, "%s.csv", path);  
data/slowhttptest-1.8.2/src/slowhttptest.cc:383:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(html_file_name, "%s.html", path);  
data/slowhttptest-1.8.2/src/slowhttptest.cc:396:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(test_info,"<table class='slow_results' border='0'>"
data/slowhttptest-1.8.2/src/slowhttptest.cc:424:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(test_info,"<table class='slow_results' border='0'>"
data/slowhttptest-1.8.2/src/slowhttptest.cc:481:5:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    printf(cCYA"CSV report saved to " cLCY "%s\n" cRST,
data/slowhttptest-1.8.2/src/slowhttptest.cc:483:5:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    printf(cCYA"HTML report saved to " cLCY "%s\n" cRST,
data/slowhttptest-1.8.2/src/slowlog.cc:69:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf(log_file, format, va);
data/slowhttptest-1.8.2/src/slowlog.cc:85:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(log_file, format, va);
data/slowhttptest-1.8.2/src/slowstats.cc:96:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf(file_, new_format.c_str(), va);
data/slowhttptest-1.8.2/src/slowstats.cc:160: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(file_, fmt, str1, str2);
data/slowhttptest-1.8.2/src/slowhttptestmain.cc:174:14:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while((o = getopt(argc, argv, ":HBRXgha:b:c:d:e:f:i:j:k:l:m:n:o:p:r:s:t:u:v:w:x:y:z:")) != -1) {
data/slowhttptest-1.8.2/src/text-generator.h:48:29:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  RandomTextGenerator() { ::srand(time(NULL)); }
data/slowhttptest-1.8.2/src/slowhttptest.cc:379: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 csv_file_name[1024] = {0};
data/slowhttptest-1.8.2/src/slowhttptest.cc:380: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 html_file_name[1024] = {0};
data/slowhttptest-1.8.2/src/slowhttptest.cc:394: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 test_info[1024];
data/slowhttptest-1.8.2/src/slowhttptest.cc:659:3:  [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[kBufSize];
data/slowhttptest-1.8.2/src/slowhttptestmain.cc:146:3:  [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 url[1024] = { 0 };
data/slowhttptest-1.8.2/src/slowhttptestmain.cc:147:3:  [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[1024] = { 0 };
data/slowhttptest-1.8.2/src/slowhttptestmain.cc:148:3:  [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 proxy[1024] = { 0 };
data/slowhttptest-1.8.2/src/slowhttptestmain.cc:149:3:  [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 verb[16] = { 0 };
data/slowhttptest-1.8.2/src/slowhttptestmain.cc:150:3:  [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 content_type[1024] = { 0 };
data/slowhttptest-1.8.2/src/slowhttptestmain.cc:151:3:  [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 accept[1024] = { 0 };
data/slowhttptest-1.8.2/src/slowhttptestmain.cc:152:3:  [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 cookie[1024] = { 0 };
data/slowhttptest-1.8.2/src/slowlog.cc:44:43:  [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).
  log_file = file_name == NULL ? stdout : fopen(file_name, "w");
data/slowhttptest-1.8.2/src/slowlog.cc:62:3:  [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 ctimebuf[32];
data/slowhttptest-1.8.2/src/slowlog.cc:78: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 ctimebuf[32];
data/slowhttptest-1.8.2/src/slowstats.cc:81:11:  [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_ = fopen(file_name_.c_str(), "w");
data/slowhttptest-1.8.2/src/slowhttptest.cc:236: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).
    if(proxy != 0 && strlen(proxy)) {
data/slowhttptest-1.8.2/src/slowhttptest.cc:271:21:  [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(verb != 0 && strlen(verb)) {
data/slowhttptest-1.8.2/src/slowhttptest.cc:281:8:  [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(verb)) {
data/slowhttptest-1.8.2/src/slowhttptest.cc:287:8:  [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(verb)) {
data/slowhttptest-1.8.2/src/slowhttptest.cc:296:27:  [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(content_type != 0 && strlen(content_type)) {
data/slowhttptest-1.8.2/src/slowhttptest.cc:304:21:  [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(accept != 0 && strlen(accept)) {
data/slowhttptest-1.8.2/src/slowhttptest.cc:337: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).
  if (cookie != 0 && strlen(cookie)) {
data/slowhttptest-1.8.2/src/slowhttptest.cc:381: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).
    if(path && strlen(path)) {
data/slowhttptest-1.8.2/src/slowhttptest.cc:972: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).
                  strlen(extra_data), eFollowUpSend);
data/slowhttptest-1.8.2/src/slowhttptest.cc:989: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).
                        (int) strlen(extra_data),
data/slowhttptest-1.8.2/src/slowhttptest.cc:1013:7:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
      usleep(tv_delay.tv_usec);
data/slowhttptest-1.8.2/src/slowhttptestmain.cc:193:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(proxy, optarg, 1023);
data/slowhttptest-1.8.2/src/slowhttptestmain.cc:197:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(proxy, optarg, 1023);
data/slowhttptest-1.8.2/src/slowhttptestmain.cc:201:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(content_type, optarg, 1023);
data/slowhttptest-1.8.2/src/slowhttptestmain.cc:227:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(cookie, optarg, 1023);
data/slowhttptest-1.8.2/src/slowhttptestmain.cc:238:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(accept, optarg, 1023);
data/slowhttptest-1.8.2/src/slowhttptestmain.cc:245:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(path, optarg, 1023);
data/slowhttptest-1.8.2/src/slowhttptestmain.cc:260:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(verb, optarg, 15);
data/slowhttptest-1.8.2/src/slowhttptestmain.cc:263:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(url, optarg, 1023);
data/slowhttptest-1.8.2/src/slowhttptestmain.cc:311: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(url)) {
data/slowhttptest-1.8.2/src/slowhttptestmain.cc:312:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(url, DEFAULT_URL, sizeof(url));

ANALYSIS SUMMARY:

Hits = 48
Lines analyzed = 3313 in approximately 0.11 seconds (30606 lines/second)
Physical Source Lines of Code (SLOC) = 2475
Hits@level = [0]  20 [1]  21 [2]  15 [3]   2 [4]  10 [5]   0
Hits@level+ = [0+]  68 [1+]  48 [2+]  27 [3+]  12 [4+]  10 [5+]   0
Hits/KSLOC@level+ = [0+] 27.4747 [1+] 19.3939 [2+] 10.9091 [3+] 4.84848 [4+] 4.0404 [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.