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/unittest++-2.0.0/UnitTest++/AssertException.cpp
Examining data/unittest++-2.0.0/UnitTest++/AssertException.h
Examining data/unittest++-2.0.0/UnitTest++/CheckMacros.h
Examining data/unittest++-2.0.0/UnitTest++/Checks.cpp
Examining data/unittest++-2.0.0/UnitTest++/Checks.h
Examining data/unittest++-2.0.0/UnitTest++/CompositeTestReporter.cpp
Examining data/unittest++-2.0.0/UnitTest++/CompositeTestReporter.h
Examining data/unittest++-2.0.0/UnitTest++/Config.h
Examining data/unittest++-2.0.0/UnitTest++/CurrentTest.cpp
Examining data/unittest++-2.0.0/UnitTest++/CurrentTest.h
Examining data/unittest++-2.0.0/UnitTest++/DeferredTestReporter.cpp
Examining data/unittest++-2.0.0/UnitTest++/DeferredTestReporter.h
Examining data/unittest++-2.0.0/UnitTest++/DeferredTestResult.cpp
Examining data/unittest++-2.0.0/UnitTest++/DeferredTestResult.h
Examining data/unittest++-2.0.0/UnitTest++/ExceptionMacros.h
Examining data/unittest++-2.0.0/UnitTest++/ExecuteTest.h
Examining data/unittest++-2.0.0/UnitTest++/HelperMacros.h
Examining data/unittest++-2.0.0/UnitTest++/MemoryOutStream.cpp
Examining data/unittest++-2.0.0/UnitTest++/MemoryOutStream.h
Examining data/unittest++-2.0.0/UnitTest++/Posix/SignalTranslator.cpp
Examining data/unittest++-2.0.0/UnitTest++/Posix/SignalTranslator.h
Examining data/unittest++-2.0.0/UnitTest++/Posix/TimeHelpers.cpp
Examining data/unittest++-2.0.0/UnitTest++/Posix/TimeHelpers.h
Examining data/unittest++-2.0.0/UnitTest++/ReportAssert.cpp
Examining data/unittest++-2.0.0/UnitTest++/ReportAssert.h
Examining data/unittest++-2.0.0/UnitTest++/ReportAssertImpl.h
Examining data/unittest++-2.0.0/UnitTest++/RequireMacros.h
Examining data/unittest++-2.0.0/UnitTest++/RequiredCheckException.cpp
Examining data/unittest++-2.0.0/UnitTest++/RequiredCheckException.h
Examining data/unittest++-2.0.0/UnitTest++/RequiredCheckTestReporter.cpp
Examining data/unittest++-2.0.0/UnitTest++/RequiredCheckTestReporter.h
Examining data/unittest++-2.0.0/UnitTest++/Test.cpp
Examining data/unittest++-2.0.0/UnitTest++/Test.h
Examining data/unittest++-2.0.0/UnitTest++/TestDetails.cpp
Examining data/unittest++-2.0.0/UnitTest++/TestDetails.h
Examining data/unittest++-2.0.0/UnitTest++/TestList.cpp
Examining data/unittest++-2.0.0/UnitTest++/TestList.h
Examining data/unittest++-2.0.0/UnitTest++/TestMacros.h
Examining data/unittest++-2.0.0/UnitTest++/TestReporter.cpp
Examining data/unittest++-2.0.0/UnitTest++/TestReporter.h
Examining data/unittest++-2.0.0/UnitTest++/TestReporterStdout.cpp
Examining data/unittest++-2.0.0/UnitTest++/TestReporterStdout.h
Examining data/unittest++-2.0.0/UnitTest++/TestResults.cpp
Examining data/unittest++-2.0.0/UnitTest++/TestResults.h
Examining data/unittest++-2.0.0/UnitTest++/TestRunner.cpp
Examining data/unittest++-2.0.0/UnitTest++/TestRunner.h
Examining data/unittest++-2.0.0/UnitTest++/TestSuite.h
Examining data/unittest++-2.0.0/UnitTest++/ThrowingTestReporter.cpp
Examining data/unittest++-2.0.0/UnitTest++/ThrowingTestReporter.h
Examining data/unittest++-2.0.0/UnitTest++/TimeConstraint.cpp
Examining data/unittest++-2.0.0/UnitTest++/TimeConstraint.h
Examining data/unittest++-2.0.0/UnitTest++/TimeHelpers.h
Examining data/unittest++-2.0.0/UnitTest++/UnitTest++.h
Examining data/unittest++-2.0.0/UnitTest++/UnitTestPP.h
Examining data/unittest++-2.0.0/UnitTest++/Win32/TimeHelpers.cpp
Examining data/unittest++-2.0.0/UnitTest++/Win32/TimeHelpers.h
Examining data/unittest++-2.0.0/UnitTest++/XmlTestReporter.cpp
Examining data/unittest++-2.0.0/UnitTest++/XmlTestReporter.h
Examining data/unittest++-2.0.0/tests/Main.cpp
Examining data/unittest++-2.0.0/tests/RecordingReporter.h
Examining data/unittest++-2.0.0/tests/ScopedCurrentTest.h
Examining data/unittest++-2.0.0/tests/TestAssertHandler.cpp
Examining data/unittest++-2.0.0/tests/TestCheckMacros.cpp
Examining data/unittest++-2.0.0/tests/TestChecks.cpp
Examining data/unittest++-2.0.0/tests/TestCompositeTestReporter.cpp
Examining data/unittest++-2.0.0/tests/TestCurrentTest.cpp
Examining data/unittest++-2.0.0/tests/TestDeferredTestReporter.cpp
Examining data/unittest++-2.0.0/tests/TestExceptions.cpp
Examining data/unittest++-2.0.0/tests/TestLongMacros.cpp
Examining data/unittest++-2.0.0/tests/TestMemoryOutStream.cpp
Examining data/unittest++-2.0.0/tests/TestRequireMacrosWithExceptionsOff.cpp
Examining data/unittest++-2.0.0/tests/TestRequireMacrosWithExceptionsOn.cpp
Examining data/unittest++-2.0.0/tests/TestTest.cpp
Examining data/unittest++-2.0.0/tests/TestTestList.cpp
Examining data/unittest++-2.0.0/tests/TestTestMacros.cpp
Examining data/unittest++-2.0.0/tests/TestTestResults.cpp
Examining data/unittest++-2.0.0/tests/TestTestRunner.cpp
Examining data/unittest++-2.0.0/tests/TestTestSuite.cpp
Examining data/unittest++-2.0.0/tests/TestTimeConstraint.cpp
Examining data/unittest++-2.0.0/tests/TestTimeConstraintMacro.cpp
Examining data/unittest++-2.0.0/tests/TestUnitTestPP.cpp
Examining data/unittest++-2.0.0/tests/TestXmlTestReporter.cpp

FINAL RESULTS:

data/unittest++-2.0.0/UnitTest++/DeferredTestResult.cpp:19:28:  [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).
      UNIITEST_NS_QUAL_STD(strcpy)(failureStr, failureStr_);
data/unittest++-2.0.0/UnitTest++/MemoryOutStream.cpp:21:12:  [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/unittest++-2.0.0/UnitTest++/MemoryOutStream.cpp:21:21:  [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/unittest++-2.0.0/UnitTest++/MemoryOutStream.cpp:30:7:  [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.
      snprintf(txt, BUFFER_SIZE, format, value);
data/unittest++-2.0.0/UnitTest++/MemoryOutStream.cpp:54:9:  [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/unittest++-2.0.0/UnitTest++/MemoryOutStream.cpp:54:18:  [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/unittest++-2.0.0/UnitTest++/MemoryOutStream.cpp:68:10:  [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.
         snprintf(txt, BUFFER_SIZE, format, value);
data/unittest++-2.0.0/UnitTest++/MemoryOutStream.cpp:116:7:  [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(m_buffer, txt);
data/unittest++-2.0.0/UnitTest++/MemoryOutStream.cpp:206:10:  [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(buffer, m_buffer);
data/unittest++-2.0.0/UnitTest++/TestReporterStdout.cpp:18:7:  [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(stderr, errorFormat, details.filename, details.lineNumber, 1, details.testName, failure);
data/unittest++-2.0.0/UnitTest++/TestReporterStdout.cpp:21:7:  [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(stderr, errorFormat, details.filename, details.lineNumber, details.testName, failure);
data/unittest++-2.0.0/tests/RecordingReporter.h:41:7:  [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(lastStartedSuite, test.suiteName);
data/unittest++-2.0.0/tests/RecordingReporter.h:42:7:  [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(lastStartedTest, test.testName);
data/unittest++-2.0.0/tests/RecordingReporter.h:50:7:  [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(lastFailedFile, test.filename);
data/unittest++-2.0.0/tests/RecordingReporter.h:52:7:  [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(lastFailedSuite, test.suiteName);
data/unittest++-2.0.0/tests/RecordingReporter.h:53:7:  [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(lastFailedTest, test.testName);
data/unittest++-2.0.0/tests/RecordingReporter.h:54:7:  [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(lastFailedMessage, failure);
data/unittest++-2.0.0/tests/RecordingReporter.h:62:7:  [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(lastFinishedSuite, test.suiteName);
data/unittest++-2.0.0/tests/RecordingReporter.h:63:7:  [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(lastFinishedTest, test.testName);
data/unittest++-2.0.0/tests/TestDeferredTestReporter.cpp:109:10:  [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(failureMessage, goodStr);
data/unittest++-2.0.0/tests/TestDeferredTestReporter.cpp:111:10:  [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(failureMessage, badStr);
data/unittest++-2.0.0/UnitTest++/DeferredTestResult.h:21:7:  [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 failureStr[1024];
data/unittest++-2.0.0/UnitTest++/MemoryOutStream.cpp:29:7:  [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 txt[BUFFER_SIZE];
data/unittest++-2.0.0/UnitTest++/MemoryOutStream.cpp:67:10:  [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 txt[BUFFER_SIZE];
data/unittest++-2.0.0/tests/RecordingReporter.h:76:4:  [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 lastStartedSuite[kMaxStringLength];
data/unittest++-2.0.0/tests/RecordingReporter.h:77:4:  [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 lastStartedTest[kMaxStringLength];
data/unittest++-2.0.0/tests/RecordingReporter.h:80:4:  [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 lastFailedFile[kMaxStringLength];
data/unittest++-2.0.0/tests/RecordingReporter.h:82:4:  [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 lastFailedSuite[kMaxStringLength];
data/unittest++-2.0.0/tests/RecordingReporter.h:83:4:  [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 lastFailedTest[kMaxStringLength];
data/unittest++-2.0.0/tests/RecordingReporter.h:84:4:  [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 lastFailedMessage[kMaxStringLength];
data/unittest++-2.0.0/tests/RecordingReporter.h:87:4:  [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 lastFinishedSuite[kMaxStringLength];
data/unittest++-2.0.0/tests/RecordingReporter.h:88:4:  [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 lastFinishedTest[kMaxStringLength];
data/unittest++-2.0.0/tests/TestChecks.cpp:153:28:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      UNIITEST_NS_QUAL_STD(memcpy)(&nan, &bitpattern, sizeof(bitpattern));
data/unittest++-2.0.0/tests/TestChecks.cpp:164:28:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      UNIITEST_NS_QUAL_STD(memcpy)(&nan, &bitpattern, sizeof(bitpattern));
data/unittest++-2.0.0/tests/TestDeferredTestReporter.cpp:103:10:  [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 failureMessage[128];
data/unittest++-2.0.0/UnitTest++/Checks.h:64:10:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
         equal &= (expected[i] == actual[i]);
data/unittest++-2.0.0/UnitTest++/Checks.h:66:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      if (!equal)
data/unittest++-2.0.0/UnitTest++/Checks.h:91:10:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
         equal &= AreClose(expected[i], actual[i], tolerance);
data/unittest++-2.0.0/UnitTest++/Checks.h:92:14:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      return equal;
data/unittest++-2.0.0/UnitTest++/Checks.h:101:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      if (!equal)
data/unittest++-2.0.0/UnitTest++/Checks.h:124:10:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
         equal &= ArrayAreClose(expected[i], actual[i], columns, tolerance);
data/unittest++-2.0.0/UnitTest++/Checks.h:126:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      if (!equal)
data/unittest++-2.0.0/UnitTest++/MemoryOutStream.cpp:107:47:  [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 const bytesLeft = m_capacity - (int)strlen(m_buffer);
data/unittest++-2.0.0/UnitTest++/MemoryOutStream.cpp:108: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).
      int const bytesRequired = (int)strlen(txt) + 1;
data/unittest++-2.0.0/UnitTest++/MemoryOutStream.cpp:208:10:  [1] (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). Risk is low because the source is a constant character.
         strcpy(buffer, "");
data/unittest++-2.0.0/UnitTest++/Posix/TimeHelpers.cpp:30: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(static_cast<useconds_t>(ms * 1000));

ANALYSIS SUMMARY:

Hits = 46
Lines analyzed = 8147 in approximately 0.17 seconds (49100 lines/second)
Physical Source Lines of Code (SLOC) = 6468
Hits@level = [0]   3 [1]  11 [2]  14 [3]   0 [4]  21 [5]   0
Hits@level+ = [0+]  49 [1+]  46 [2+]  35 [3+]  21 [4+]  21 [5+]   0
Hits/KSLOC@level+ = [0+] 7.57576 [1+] 7.11194 [2+] 5.41126 [3+] 3.24675 [4+] 3.24675 [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.