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/libkiwix-9.4.1+dfsg/include/book.h
Examining data/libkiwix-9.4.1+dfsg/include/bookmark.h
Examining data/libkiwix-9.4.1+dfsg/include/common.h
Examining data/libkiwix-9.4.1+dfsg/include/downloader.h
Examining data/libkiwix-9.4.1+dfsg/include/entry.h
Examining data/libkiwix-9.4.1+dfsg/include/kiwix.h
Examining data/libkiwix-9.4.1+dfsg/include/kiwixserve.h
Examining data/libkiwix-9.4.1+dfsg/include/library.h
Examining data/libkiwix-9.4.1+dfsg/include/libxml_dumper.h
Examining data/libkiwix-9.4.1+dfsg/include/manager.h
Examining data/libkiwix-9.4.1+dfsg/include/name_mapper.h
Examining data/libkiwix-9.4.1+dfsg/include/opds_dumper.h
Examining data/libkiwix-9.4.1+dfsg/include/reader.h
Examining data/libkiwix-9.4.1+dfsg/include/search_renderer.h
Examining data/libkiwix-9.4.1+dfsg/include/searcher.h
Examining data/libkiwix-9.4.1+dfsg/include/server.h
Examining data/libkiwix-9.4.1+dfsg/include/tools/base64.h
Examining data/libkiwix-9.4.1+dfsg/include/tools/lock.h
Examining data/libkiwix-9.4.1+dfsg/include/tools/networkTools.h
Examining data/libkiwix-9.4.1+dfsg/include/tools/otherTools.h
Examining data/libkiwix-9.4.1+dfsg/include/tools/pathTools.h
Examining data/libkiwix-9.4.1+dfsg/include/tools/regexTools.h
Examining data/libkiwix-9.4.1+dfsg/include/tools/stringTools.h
Examining data/libkiwix-9.4.1+dfsg/src/aria2.cpp
Examining data/libkiwix-9.4.1+dfsg/src/aria2.h
Examining data/libkiwix-9.4.1+dfsg/src/book.cpp
Examining data/libkiwix-9.4.1+dfsg/src/bookmark.cpp
Examining data/libkiwix-9.4.1+dfsg/src/downloader.cpp
Examining data/libkiwix-9.4.1+dfsg/src/entry.cpp
Examining data/libkiwix-9.4.1+dfsg/src/kiwixserve.cpp
Examining data/libkiwix-9.4.1+dfsg/src/library.cpp
Examining data/libkiwix-9.4.1+dfsg/src/libxml_dumper.cpp
Examining data/libkiwix-9.4.1+dfsg/src/manager.cpp
Examining data/libkiwix-9.4.1+dfsg/src/microhttpd_wrapper.h
Examining data/libkiwix-9.4.1+dfsg/src/name_mapper.cpp
Examining data/libkiwix-9.4.1+dfsg/src/opds_dumper.cpp
Examining data/libkiwix-9.4.1+dfsg/src/reader.cpp
Examining data/libkiwix-9.4.1+dfsg/src/search_renderer.cpp
Examining data/libkiwix-9.4.1+dfsg/src/searcher.cpp
Examining data/libkiwix-9.4.1+dfsg/src/server.cpp
Examining data/libkiwix-9.4.1+dfsg/src/server/byte_range.cpp
Examining data/libkiwix-9.4.1+dfsg/src/server/byte_range.h
Examining data/libkiwix-9.4.1+dfsg/src/server/etag.cpp
Examining data/libkiwix-9.4.1+dfsg/src/server/etag.h
Examining data/libkiwix-9.4.1+dfsg/src/server/internalServer.cpp
Examining data/libkiwix-9.4.1+dfsg/src/server/internalServer.h
Examining data/libkiwix-9.4.1+dfsg/src/server/request_context.cpp
Examining data/libkiwix-9.4.1+dfsg/src/server/request_context.h
Examining data/libkiwix-9.4.1+dfsg/src/server/response.cpp
Examining data/libkiwix-9.4.1+dfsg/src/server/response.h
Examining data/libkiwix-9.4.1+dfsg/src/subprocess.cpp
Examining data/libkiwix-9.4.1+dfsg/src/subprocess.h
Examining data/libkiwix-9.4.1+dfsg/src/subprocess_unix.cpp
Examining data/libkiwix-9.4.1+dfsg/src/subprocess_unix.h
Examining data/libkiwix-9.4.1+dfsg/src/subprocess_windows.cpp
Examining data/libkiwix-9.4.1+dfsg/src/subprocess_windows.h
Examining data/libkiwix-9.4.1+dfsg/src/tools/base64.cpp
Examining data/libkiwix-9.4.1+dfsg/src/tools/networkTools.cpp
Examining data/libkiwix-9.4.1+dfsg/src/tools/otherTools.cpp
Examining data/libkiwix-9.4.1+dfsg/src/tools/pathTools.cpp
Examining data/libkiwix-9.4.1+dfsg/src/tools/regexTools.cpp
Examining data/libkiwix-9.4.1+dfsg/src/tools/stringTools.cpp
Examining data/libkiwix-9.4.1+dfsg/src/wrapper/java/book.cpp
Examining data/libkiwix-9.4.1+dfsg/src/wrapper/java/filter.cpp
Examining data/libkiwix-9.4.1+dfsg/src/wrapper/java/kiwixicu.cpp
Examining data/libkiwix-9.4.1+dfsg/src/wrapper/java/kiwixreader.cpp
Examining data/libkiwix-9.4.1+dfsg/src/wrapper/java/kiwixsearcher.cpp
Examining data/libkiwix-9.4.1+dfsg/src/wrapper/java/kiwixserver.cpp
Examining data/libkiwix-9.4.1+dfsg/src/wrapper/java/library.cpp
Examining data/libkiwix-9.4.1+dfsg/src/wrapper/java/manager.cpp
Examining data/libkiwix-9.4.1+dfsg/src/wrapper/java/utils.h
Examining data/libkiwix-9.4.1+dfsg/src/xmlrpc.h
Examining data/libkiwix-9.4.1+dfsg/test/book.cpp
Examining data/libkiwix-9.4.1+dfsg/test/counterParsing.cpp
Examining data/libkiwix-9.4.1+dfsg/test/httplib.h
Examining data/libkiwix-9.4.1+dfsg/test/kiwixserve.cpp
Examining data/libkiwix-9.4.1+dfsg/test/library.cpp
Examining data/libkiwix-9.4.1+dfsg/test/manager.cpp
Examining data/libkiwix-9.4.1+dfsg/test/parseUrl.cpp
Examining data/libkiwix-9.4.1+dfsg/test/pathTools.cpp
Examining data/libkiwix-9.4.1+dfsg/test/regex.cpp
Examining data/libkiwix-9.4.1+dfsg/test/server.cpp
Examining data/libkiwix-9.4.1+dfsg/test/stringTools.cpp
Examining data/libkiwix-9.4.1+dfsg/test/tagParsing.cpp

FINAL RESULTS:

data/libkiwix-9.4.1+dfsg/src/tools/pathTools.cpp:395:18:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
  ssize_t size = readlink("/proc/self/exe", binRootPath, PATH_MAX);
data/libkiwix-9.4.1+dfsg/src/subprocess_unix.cpp:69:11:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      if (execvp(binary, const_cast<char* const*>(commandLine.data()))) {
data/libkiwix-9.4.1+dfsg/test/httplib.h:77: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_s
data/libkiwix-9.4.1+dfsg/test/httplib.h:2897:13:  [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.
  auto sn = snprintf(buf.data(), buf.size() - 1, fmt, args...);
data/libkiwix-9.4.1+dfsg/test/httplib.h:2914:11:  [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(&glowable_buf[0], glowable_buf.size() - 1, fmt, args...));
data/libkiwix-9.4.1+dfsg/src/reader.cpp:91:3:  [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.
  srand(time(NULL));
data/libkiwix-9.4.1+dfsg/src/subprocess_windows.cpp:17:3:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
  InitializeCriticalSection(&m_criticalSection);
data/libkiwix-9.4.1+dfsg/src/subprocess_windows.cpp:33:3:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
  EnterCriticalSection(&self->m_criticalSection);
data/libkiwix-9.4.1+dfsg/src/subprocess_windows.cpp:98:3:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
  EnterCriticalSection(&m_criticalSection);
data/libkiwix-9.4.1+dfsg/src/tools/pathTools.cpp:372:25:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    char* cAppImage = ::getenv("APPIMAGE");
data/libkiwix-9.4.1+dfsg/src/tools/pathTools.cpp:374:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
      char* cArgv0 = ::getenv("ARGV0");
data/libkiwix-9.4.1+dfsg/src/tools/pathTools.cpp:375:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
      char* cOwd = ::getenv("OWD");
data/libkiwix-9.4.1+dfsg/src/tools/pathTools.cpp:446:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  char* cDataDir = ::getenv("KIWIX_DATA_DIR");
data/libkiwix-9.4.1+dfsg/src/tools/pathTools.cpp:461:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  cDataDir = ::getenv("XDG_DATA_HOME");
data/libkiwix-9.4.1+dfsg/src/tools/pathTools.cpp:465:18:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    cDataDir = ::getenv("HOME");
data/libkiwix-9.4.1+dfsg/src/reader.cpp:401: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 tempArray[16] = "";
data/libkiwix-9.4.1+dfsg/src/reader.cpp:404:22:  [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).
      tempArray[k] = atoi(temp.c_str());
data/libkiwix-9.4.1+dfsg/src/server/response.cpp:160:3:  [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(buf, blob.data(), max_size_to_set);
data/libkiwix-9.4.1+dfsg/src/subprocess_windows.cpp:42:17:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  size_t size = MultiByteToWideChar(CP_UTF8, 0,
data/libkiwix-9.4.1+dfsg/src/subprocess_windows.cpp:45:14:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  auto ret = MultiByteToWideChar(CP_UTF8, 0,
data/libkiwix-9.4.1+dfsg/src/tools/base64.cpp:46:12:  [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.
  unsigned char char_array_3[3];
data/libkiwix-9.4.1+dfsg/src/tools/base64.cpp:47:12:  [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.
  unsigned char char_array_4[4];
data/libkiwix-9.4.1+dfsg/src/tools/base64.cpp:90:12:  [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.
  unsigned char char_array_4[4], char_array_3[3];
data/libkiwix-9.4.1+dfsg/src/tools/pathTools.cpp:74:22:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  auto needed_size = MultiByteToWideChar(CP_UTF8, 0, str.data(), str.size(), NULL, 0);
data/libkiwix-9.4.1+dfsg/src/tools/pathTools.cpp:76:3:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  MultiByteToWideChar(CP_UTF8, 0, str.data(), str.size(), &ret[0], needed_size);
data/libkiwix-9.4.1+dfsg/src/tools/pathTools.cpp:276:13:  [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).
  auto fd = open(path.c_str(), O_RDONLY);
data/libkiwix-9.4.1+dfsg/src/tools/pathTools.cpp:310:7:  [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).
  fin.open(path.c_str(), std::ios::in);
data/libkiwix-9.4.1+dfsg/src/tools/pathTools.cpp:332:3:  [2] (buffer) wchar_t:
  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.
  wchar_t cbase[MAX_PATH];
data/libkiwix-9.4.1+dfsg/src/tools/pathTools.cpp:333:3:  [2] (buffer) wchar_t:
  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.
  wchar_t ctmp[MAX_PATH];
data/libkiwix-9.4.1+dfsg/src/tools/pathTools.cpp:389: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 binRootPath[PATH_MAX];
data/libkiwix-9.4.1+dfsg/src/tools/pathTools.cpp:394: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 binRootPath[PATH_MAX];
data/libkiwix-9.4.1+dfsg/src/tools/pathTools.cpp:409:13:  [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).
  auto fd = open(path.c_str(), O_WRONLY | O_CREAT | O_TRUNC,
data/libkiwix-9.4.1+dfsg/test/httplib.h:1526: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 buf[INET_ADDRSTRLEN];
data/libkiwix-9.4.1+dfsg/test/httplib.h:1824: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[bufsiz];
data/libkiwix-9.4.1+dfsg/test/httplib.h:1863: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[CPPHTTPLIB_RECV_BUFSIZ];
data/libkiwix-9.4.1+dfsg/test/httplib.h:1884: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[CPPHTTPLIB_RECV_BUFSIZ];
data/libkiwix-9.4.1+dfsg/test/httplib.h:1895: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[CPPHTTPLIB_RECV_BUFSIZ];
data/libkiwix-9.4.1+dfsg/test/httplib.h:1911: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[bufsiz];
data/libkiwix-9.4.1+dfsg/test/httplib.h:2121: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 hex[4];
data/libkiwix-9.4.1+dfsg/test/httplib.h:2145:11:  [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 buff[4];
data/libkiwix-9.4.1+dfsg/test/httplib.h:4998: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 name[BUFSIZ];
data/libkiwix-9.4.1+dfsg/src/tools/otherTools.cpp:188:3:  [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(1000 * milliseconds);
data/libkiwix-9.4.1+dfsg/src/tools/pathTools.cpp:294:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      readsize = ::read(fd, p, readsize);
data/libkiwix-9.4.1+dfsg/src/tools/stringTools.cpp:395:17:  [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.
        && std::equal(start.begin(), start.end(), base.begin());
data/libkiwix-9.4.1+dfsg/test/httplib.h:356:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  virtual ssize_t read(char *ptr, size_t size) = 0;
data/libkiwix-9.4.1+dfsg/test/httplib.h:1092:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  fs.read(&out[0], size);
data/libkiwix-9.4.1+dfsg/test/httplib.h:1152:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      auto n = strm_.read(&byte, 1);
data/libkiwix-9.4.1+dfsg/test/httplib.h:1294:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ssize_t read(char *ptr, size_t size) override;
data/libkiwix-9.4.1+dfsg/test/httplib.h:1313:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ssize_t read(char *ptr, size_t size) override;
data/libkiwix-9.4.1+dfsg/test/httplib.h:1332:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ssize_t read(char *ptr, size_t size) override;
data/libkiwix-9.4.1+dfsg/test/httplib.h:1868:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    auto n = strm.read(buf, (std::min)(read_len, CPPHTTPLIB_RECV_BUFSIZ));
data/libkiwix-9.4.1+dfsg/test/httplib.h:1888:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    auto n = strm.read(buf, (std::min)(read_len, CPPHTTPLIB_RECV_BUFSIZ));
data/libkiwix-9.4.1+dfsg/test/httplib.h:1897:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    auto n = strm.read(buf, CPPHTTPLIB_RECV_BUFSIZ);
data/libkiwix-9.4.1+dfsg/test/httplib.h:2530: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).
      [&](const char *token) { data_length += strlen(token); },
data/libkiwix-9.4.1+dfsg/test/httplib.h:2883: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).
  return write(ptr, strlen(ptr));
data/libkiwix-9.4.1+dfsg/test/httplib.h:2941:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
inline ssize_t SocketStream::read(char *ptr, size_t size) {
data/libkiwix-9.4.1+dfsg/test/httplib.h:2977:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
inline ssize_t BufferStream::read(char *ptr, size_t size) {
data/libkiwix-9.4.1+dfsg/test/httplib.h:4679:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
inline ssize_t SSLSocketStream::read(char *ptr, size_t size) {
data/libkiwix-9.4.1+dfsg/test/httplib.h:4971:13:  [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(name) == name_len) {

ANALYSIS SUMMARY:

Hits = 59
Lines analyzed = 18612 in approximately 0.53 seconds (35409 lines/second)
Physical Source Lines of Code (SLOC) = 13238
Hits@level = [0]  43 [1]  18 [2]  26 [3]  10 [4]   4 [5]   1
Hits@level+ = [0+] 102 [1+]  59 [2+]  41 [3+]  15 [4+]   5 [5+]   1
Hits/KSLOC@level+ = [0+] 7.70509 [1+] 4.45687 [2+] 3.09714 [3+] 1.1331 [4+] 0.377701 [5+] 0.0755401
Dot directories skipped = 2 (--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.