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/nitrokey-app-1.4.1/src/GUI/Authentication.cpp
Examining data/nitrokey-app-1.4.1/src/GUI/Authentication.h
Examining data/nitrokey-app-1.4.1/src/GUI/Clipboard.cpp
Examining data/nitrokey-app-1.4.1/src/GUI/Clipboard.h
Examining data/nitrokey-app-1.4.1/src/GUI/ManageWindow.cpp
Examining data/nitrokey-app-1.4.1/src/GUI/ManageWindow.h
Examining data/nitrokey-app-1.4.1/src/GUI/StorageActions.cpp
Examining data/nitrokey-app-1.4.1/src/GUI/StorageActions.h
Examining data/nitrokey-app-1.4.1/src/GUI/Tray.cpp
Examining data/nitrokey-app-1.4.1/src/GUI/Tray.h
Examining data/nitrokey-app-1.4.1/src/GUI/graphicstools.cpp
Examining data/nitrokey-app-1.4.1/src/GUI/graphicstools.h
Examining data/nitrokey-app-1.4.1/src/core/ScopedGuard.h
Examining data/nitrokey-app-1.4.1/src/core/SecureString.cpp
Examining data/nitrokey-app-1.4.1/src/core/SecureString.h
Examining data/nitrokey-app-1.4.1/src/core/ThreadWorker.cpp
Examining data/nitrokey-app-1.4.1/src/core/ThreadWorker.h
Examining data/nitrokey-app-1.4.1/src/hotpslot.cpp
Examining data/nitrokey-app-1.4.1/src/hotpslot.h
Examining data/nitrokey-app-1.4.1/src/libada.cpp
Examining data/nitrokey-app-1.4.1/src/libada.h
Examining data/nitrokey-app-1.4.1/src/main.cpp
Examining data/nitrokey-app-1.4.1/src/mcvs-wrapper.h
Examining data/nitrokey-app-1.4.1/src/systemutils.cpp
Examining data/nitrokey-app-1.4.1/src/systemutils.h
Examining data/nitrokey-app-1.4.1/src/ui/OwnSleep.h
Examining data/nitrokey-app-1.4.1/src/ui/aboutdialog.cpp
Examining data/nitrokey-app-1.4.1/src/ui/aboutdialog.h
Examining data/nitrokey-app-1.4.1/src/ui/licensedialog.cpp
Examining data/nitrokey-app-1.4.1/src/ui/licensedialog.h
Examining data/nitrokey-app-1.4.1/src/ui/mainwindow.cpp
Examining data/nitrokey-app-1.4.1/src/ui/mainwindow.h
Examining data/nitrokey-app-1.4.1/src/ui/nitrokey-applet.cpp
Examining data/nitrokey-app-1.4.1/src/ui/nitrokey-applet.h
Examining data/nitrokey-app-1.4.1/src/ui/pindialog.cpp
Examining data/nitrokey-app-1.4.1/src/ui/pindialog.h
Examining data/nitrokey-app-1.4.1/src/ui/securitydialog.cpp
Examining data/nitrokey-app-1.4.1/src/ui/securitydialog.h
Examining data/nitrokey-app-1.4.1/src/ui/stick20changepassworddialog.cpp
Examining data/nitrokey-app-1.4.1/src/ui/stick20changepassworddialog.h
Examining data/nitrokey-app-1.4.1/src/ui/stick20debugdialog.cpp
Examining data/nitrokey-app-1.4.1/src/ui/stick20debugdialog.h
Examining data/nitrokey-app-1.4.1/src/ui/stick20hiddenvolumedialog.cpp
Examining data/nitrokey-app-1.4.1/src/ui/stick20hiddenvolumedialog.h
Examining data/nitrokey-app-1.4.1/src/ui/stick20lockfirmwaredialog.cpp
Examining data/nitrokey-app-1.4.1/src/ui/stick20lockfirmwaredialog.h
Examining data/nitrokey-app-1.4.1/src/ui/stick20responsedialog.cpp
Examining data/nitrokey-app-1.4.1/src/ui/stick20responsedialog.h
Examining data/nitrokey-app-1.4.1/src/ui/stick20updatedialog.cpp
Examining data/nitrokey-app-1.4.1/src/ui/stick20updatedialog.h
Examining data/nitrokey-app-1.4.1/src/utils/bool_values.h
Examining data/nitrokey-app-1.4.1/src/utils/sleep.h
Examining data/nitrokey-app-1.4.1/src/version.h
Examining data/nitrokey-app-1.4.1/libnitrokey/DeviceCommunicationExceptions.cpp
Examining data/nitrokey-app-1.4.1/libnitrokey/NK_C_API.cc
Examining data/nitrokey-app-1.4.1/libnitrokey/NK_C_API.h
Examining data/nitrokey-app-1.4.1/libnitrokey/NitrokeyManager.cc
Examining data/nitrokey-app-1.4.1/libnitrokey/command_id.cc
Examining data/nitrokey-app-1.4.1/libnitrokey/device.cc
Examining data/nitrokey-app-1.4.1/libnitrokey/libnitrokey/CommandFailedException.h
Examining data/nitrokey-app-1.4.1/libnitrokey/libnitrokey/DeviceCommunicationExceptions.h
Examining data/nitrokey-app-1.4.1/libnitrokey/libnitrokey/LibraryException.h
Examining data/nitrokey-app-1.4.1/libnitrokey/libnitrokey/LongOperationInProgressException.h
Examining data/nitrokey-app-1.4.1/libnitrokey/libnitrokey/NitrokeyManager.h
Examining data/nitrokey-app-1.4.1/libnitrokey/libnitrokey/command.h
Examining data/nitrokey-app-1.4.1/libnitrokey/libnitrokey/command_id.h
Examining data/nitrokey-app-1.4.1/libnitrokey/libnitrokey/cxx_semantics.h
Examining data/nitrokey-app-1.4.1/libnitrokey/libnitrokey/deprecated.h
Examining data/nitrokey-app-1.4.1/libnitrokey/libnitrokey/device.h
Examining data/nitrokey-app-1.4.1/libnitrokey/libnitrokey/device_proto.h
Examining data/nitrokey-app-1.4.1/libnitrokey/libnitrokey/dissect.h
Examining data/nitrokey-app-1.4.1/libnitrokey/libnitrokey/hidapi/hidapi.h
Examining data/nitrokey-app-1.4.1/libnitrokey/libnitrokey/log.h
Examining data/nitrokey-app-1.4.1/libnitrokey/libnitrokey/misc.h
Examining data/nitrokey-app-1.4.1/libnitrokey/libnitrokey/stick10_commands.h
Examining data/nitrokey-app-1.4.1/libnitrokey/libnitrokey/stick10_commands_0.8.h
Examining data/nitrokey-app-1.4.1/libnitrokey/libnitrokey/stick20_commands.h
Examining data/nitrokey-app-1.4.1/libnitrokey/libnitrokey/version.h
Examining data/nitrokey-app-1.4.1/libnitrokey/log.cc
Examining data/nitrokey-app-1.4.1/libnitrokey/misc.cc
Examining data/nitrokey-app-1.4.1/libnitrokey/unittest/catch_main.cpp
Examining data/nitrokey-app-1.4.1/libnitrokey/unittest/test1.cc
Examining data/nitrokey-app-1.4.1/libnitrokey/unittest/test2.cc
Examining data/nitrokey-app-1.4.1/libnitrokey/unittest/test3.cc
Examining data/nitrokey-app-1.4.1/libnitrokey/unittest/test_C_API.cpp
Examining data/nitrokey-app-1.4.1/libnitrokey/unittest/test_HOTP.cc
Examining data/nitrokey-app-1.4.1/libnitrokey/unittest/test_command_ids_header.h
Examining data/nitrokey-app-1.4.1/libnitrokey/unittest/test_issues.cc
Examining data/nitrokey-app-1.4.1/libnitrokey/unittest/test_minimal.c
Examining data/nitrokey-app-1.4.1/libnitrokey/unittest/test_multiple_devices.cc
Examining data/nitrokey-app-1.4.1/libnitrokey/unittest/test_offline.cc
Examining data/nitrokey-app-1.4.1/libnitrokey/unittest/test_safe.cpp
Examining data/nitrokey-app-1.4.1/libnitrokey/unittest/test_strdup.cpp
Examining data/nitrokey-app-1.4.1/libnitrokey/version.cc
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/base32_crockford.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/base32_default_crockford.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/base32_default_hex.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/base32_default_rfc4648.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/base32_hex.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/base32_rfc4648.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/base64_default_rfc4648.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/base64_default_url.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/base64_default_url_unpadded.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/base64_rfc4648.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/base64_url.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/base64_url_unpadded.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/data/access.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/data/raw_result_buffer.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/detail/base32.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/detail/base64.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/detail/codec.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/detail/config.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/detail/hex.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/detail/stream_codec.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/hex_default_lower.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/hex_default_upper.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/hex_lower.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/hex_upper.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/parse_error.hpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/test/test_cppcodec.cpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/tool/base32dec.cpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/tool/base32enc.cpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/tool/base64dec.cpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/tool/base64enc.cpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/tool/helloworld.cpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/tool/hexdec.cpp
Examining data/nitrokey-app-1.4.1/3rdparty/cppcodec/tool/hexenc.cpp

FINAL RESULTS:

data/nitrokey-app-1.4.1/libnitrokey/unittest/test3.cc:56:3:  [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 *) (authreq.card_password), default_admin_pin);
data/nitrokey-app-1.4.1/libnitrokey/unittest/test3.cc:57:3:  [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 *) (authreq.temporary_password), temporary_password);
data/nitrokey-app-1.4.1/libnitrokey/unittest/test_HOTP.cc:72: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((char *)(authreq.temporary_password), temporary_password);
data/nitrokey-app-1.4.1/libnitrokey/unittest/test_HOTP.cc:92: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 *)(auth.temporary_password), temporary_password);
data/nitrokey-app-1.4.1/src/main.cpp:187:26:  [4] (shell) system:
  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.
  QLocale loc = QLocale::system();
data/nitrokey-app-1.4.1/src/main.cpp:196:26:  [4] (shell) system:
  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.
        QString(QLocale::system().name()),
data/nitrokey-app-1.4.1/src/main.cpp:232:80:  [4] (shell) system:
  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.
  success = myappTranslator.load(QString(":/i18n/nitrokey_%1.qm").arg(QLocale::system().name()));
data/nitrokey-app-1.4.1/src/main.cpp:252:38:  [4] (shell) system:
  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.
  qtTranslator.load("qt_" + QLocale::system().name());
data/nitrokey-app-1.4.1/src/main.cpp:254:38:  [4] (shell) system:
  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.
  qtTranslator.load("qt_" + QLocale::system().name(),
data/nitrokey-app-1.4.1/src/mcvs-wrapper.h:56: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((dest), (source));                                                                    \
data/nitrokey-app-1.4.1/src/mcvs-wrapper.h:63:3:  [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((dest), (dest_size), (format), ##__VA_ARGS__);
data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/data/access.hpp:77:19:  [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.
    struct flag { char c[2]; }; // sizeof > 1
data/nitrokey-app-1.4.1/3rdparty/cppcodec/cppcodec/parse_error.hpp:81: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 s[4];
data/nitrokey-app-1.4.1/libnitrokey/NK_C_API.cc:39:2:  [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(dup, str, len);
data/nitrokey-app-1.4.1/libnitrokey/NitrokeyManager.cc:48: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(dup, str, len);
data/nitrokey-app-1.4.1/libnitrokey/device.cc:257: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 buf[1];
data/nitrokey-app-1.4.1/libnitrokey/misc.cc:46: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 buf[3];
data/nitrokey-app-1.4.1/libnitrokey/misc.cc:67: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 formatbuf[128];
data/nitrokey-app-1.4.1/libnitrokey/unittest/test1.cc:56:3:  [2] (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 string.
  strcpy((char *)(authreq.card_password), "12345678");
data/nitrokey-app-1.4.1/libnitrokey/unittest/test1.cc:61:5:  [2] (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 string.
    strcpy((char *)(authreq.user_password), "123456");
data/nitrokey-app-1.4.1/libnitrokey/unittest/test_HOTP.cc:39: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 buf[3];
data/nitrokey-app-1.4.1/libnitrokey/unittest/test_HOTP.cc:71:7:  [2] (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 string.
      strcpy((char *)(authreq.card_password), "12345678");
data/nitrokey-app-1.4.1/libnitrokey/unittest/test_HOTP.cc:80:5:  [2] (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 string.
    strcpy(reinterpret_cast<char *>(hwrite.slot_name), "rfc4226_lib");
data/nitrokey-app-1.4.1/src/hotpslot.h:63: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 slotName[15+1] = {};
data/nitrokey-app-1.4.1/src/hotpslot.h:64: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 secret[SECRET_LENGTH_HEX+1] = {};
data/nitrokey-app-1.4.1/src/hotpslot.h:77: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 tokenID[13+1] = {};
data/nitrokey-app-1.4.1/src/mcvs-wrapper.h:67:12:  [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).
    (FP) = fopen((file), (options));                                                               \
data/nitrokey-app-1.4.1/src/ui/aboutdialog.cpp:113:14:  [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 (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
data/nitrokey-app-1.4.1/src/ui/mainwindow.cpp:495: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(slot->counter, &counterFromGUI, sizeof counterFromGUI);
data/nitrokey-app-1.4.1/src/ui/mainwindow.cpp:535: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(slot->slotName, slotNameFromGUI.constData(), toCopy);
data/nitrokey-app-1.4.1/src/ui/mainwindow.cpp:540: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(slot->tokenID, ompFromGUI.constData(), toCopy);
data/nitrokey-app-1.4.1/src/ui/mainwindow.cpp:544: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(slot->tokenID + 2, ttFromGUI.constData(), toCopy);
data/nitrokey-app-1.4.1/src/ui/mainwindow.cpp:548: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(slot->tokenID + 4, muiFromGUI.constData(), toCopy);
data/nitrokey-app-1.4.1/src/ui/mainwindow.cpp:1776:24:  [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 (!log_file->open(QIODevice::WriteOnly | QIODevice::Text)){
data/nitrokey-app-1.4.1/src/ui/stick20hiddenvolumedialog.h:38:14:  [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 HiddenVolumePassword_au8[MAX_HIDDEN_VOLUME_PASSOWORD_SIZE + 1] = {};
data/nitrokey-app-1.4.1/3rdparty/cppcodec/tool/base32dec.cpp:34:25:  [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).
        size_t arglen = strlen(argv[i]);
data/nitrokey-app-1.4.1/3rdparty/cppcodec/tool/base32enc.cpp:34:25:  [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).
        size_t arglen = strlen(argv[i]);
data/nitrokey-app-1.4.1/3rdparty/cppcodec/tool/base64dec.cpp:34:25:  [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).
        size_t arglen = strlen(argv[i]);
data/nitrokey-app-1.4.1/3rdparty/cppcodec/tool/base64enc.cpp:34:25:  [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).
        size_t arglen = strlen(argv[i]);
data/nitrokey-app-1.4.1/3rdparty/cppcodec/tool/hexdec.cpp:34:25:  [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).
        size_t arglen = strlen(argv[i]);
data/nitrokey-app-1.4.1/3rdparty/cppcodec/tool/hexenc.cpp:34:25:  [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).
        size_t arglen = strlen(argv[i]);
data/nitrokey-app-1.4.1/libnitrokey/NitrokeyManager.cc:429:50:  [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(user_temporary_password != nullptr && strlen(user_temporary_password)!=0){ //FIXME use string instead of strlen
data/nitrokey-app-1.4.1/libnitrokey/NitrokeyManager.cc:437:50:  [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(user_temporary_password != nullptr && strlen(user_temporary_password)!=0) {
data/nitrokey-app-1.4.1/libnitrokey/NitrokeyManager.cc:467:52:  [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(user_temporary_password != nullptr && strlen(user_temporary_password)!=0){ //FIXME use string instead of strlen
data/nitrokey-app-1.4.1/libnitrokey/libnitrokey/misc.h:94:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy((char*) &dest, src, s_dest);
data/nitrokey-app-1.4.1/libnitrokey/unittest/test_HOTP.cc:38:11:  [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).
  REQUIRE(strlen(hexString)%2==0);
data/nitrokey-app-1.4.1/libnitrokey/unittest/test_HOTP.cc:41:23:  [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).
    for(size_t i=0; i<strlen(hexString); i++){
data/nitrokey-app-1.4.1/src/mcvs-wrapper.h:44:36:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
#define STRCPY(dest, size, source) strncpy((dest), (source), (size));
data/nitrokey-app-1.4.1/src/mcvs-wrapper.h:45:55:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
#define STRNCPY(dest, dest_size, source, source_size) strncpy((dest), (source), (dest_size));
data/nitrokey-app-1.4.1/src/mcvs-wrapper.h:54: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).
    if (strlen((source)) <= (dest_size)-strlen((dest)) - 1) {                                      \
data/nitrokey-app-1.4.1/src/mcvs-wrapper.h:54:41:  [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((source)) <= (dest_size)-strlen((dest)) - 1) {                                      \
data/nitrokey-app-1.4.1/src/mcvs-wrapper.h:55: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).
      printf("%zu %zu %zu\n", strlen((source)), sizeof((dest)), strlen((dest)));                   \
data/nitrokey-app-1.4.1/src/mcvs-wrapper.h:55:65:  [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).
      printf("%zu %zu %zu\n", strlen((source)), sizeof((dest)), strlen((dest)));                   \
data/nitrokey-app-1.4.1/src/ui/OwnSleep.h:29:17:  [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.
    static void usleep(unsigned long usecs) { QThread::usleep(usecs); }
data/nitrokey-app-1.4.1/src/ui/OwnSleep.h:29:56:  [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.
    static void usleep(unsigned long usecs) { QThread::usleep(usecs); }
data/nitrokey-app-1.4.1/src/ui/stick20hiddenvolumedialog.cpp:90: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 (8 > strlen(password_byte_array.constData())) {
data/nitrokey-app-1.4.1/src/ui/stick20hiddenvolumedialog.cpp:119:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((char *) HV_Setup_st.HiddenVolumePassword_au8, p, password_byte_array.length());
data/nitrokey-app-1.4.1/src/utils/sleep.h:32:15:  [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.
  static void usleep(unsigned long usecs) { QThread::usleep(usecs); }
data/nitrokey-app-1.4.1/src/utils/sleep.h:32:54:  [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.
  static void usleep(unsigned long usecs) { QThread::usleep(usecs); }

ANALYSIS SUMMARY:

Hits = 59
Lines analyzed = 21923 in approximately 0.88 seconds (24882 lines/second)
Physical Source Lines of Code (SLOC) = 14190
Hits@level = [0]   6 [1]  24 [2]  24 [3]   0 [4]  11 [5]   0
Hits@level+ = [0+]  65 [1+]  59 [2+]  35 [3+]  11 [4+]  11 [5+]   0
Hits/KSLOC@level+ = [0+] 4.58069 [1+] 4.15786 [2+] 2.46653 [3+] 0.775194 [4+] 0.775194 [5+]   0
Dot directories skipped = 3 (--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.