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/jerry-3.2.0/src/funct.cpp
Examining data/jerry-3.2.0/src/funct.h
Examining data/jerry-3.2.0/src/chess/pgn_reader.cpp
Examining data/jerry-3.2.0/src/chess/database.cpp
Examining data/jerry-3.2.0/src/chess/pgn_printer.cpp
Examining data/jerry-3.2.0/src/chess/polyglot.h
Examining data/jerry-3.2.0/src/chess/board.cpp
Examining data/jerry-3.2.0/src/chess/board.h
Examining data/jerry-3.2.0/src/chess/game_node.h
Examining data/jerry-3.2.0/src/chess/pgn_database.h
Examining data/jerry-3.2.0/src/chess/pgn_database.cpp
Examining data/jerry-3.2.0/src/chess/polyglot.cpp
Examining data/jerry-3.2.0/src/chess/ecocode.cpp
Examining data/jerry-3.2.0/src/chess/constants.h
Examining data/jerry-3.2.0/src/chess/pgn_printer.h
Examining data/jerry-3.2.0/src/chess/colored_field.h
Examining data/jerry-3.2.0/src/chess/arrow.h
Examining data/jerry-3.2.0/src/chess/game_node.cpp
Examining data/jerry-3.2.0/src/chess/move.cpp
Examining data/jerry-3.2.0/src/chess/gui_printer.h
Examining data/jerry-3.2.0/src/chess/gui_printer.cpp
Examining data/jerry-3.2.0/src/chess/database.h
Examining data/jerry-3.2.0/src/chess/game.cpp
Examining data/jerry-3.2.0/src/chess/game.h
Examining data/jerry-3.2.0/src/chess/move.h
Examining data/jerry-3.2.0/src/chess/pgn_reader.h
Examining data/jerry-3.2.0/src/chess/ecocode.h
Examining data/jerry-3.2.0/src/controller/file_controller.cpp
Examining data/jerry-3.2.0/src/controller/mode_controller.h
Examining data/jerry-3.2.0/src/controller/file_controller.h
Examining data/jerry-3.2.0/src/controller/mode_controller.cpp
Examining data/jerry-3.2.0/src/controller/edit_controller.h
Examining data/jerry-3.2.0/src/controller/edit_controller.cpp
Examining data/jerry-3.2.0/src/main.cpp
Examining data/jerry-3.2.0/src/uci/uci_worker.cpp
Examining data/jerry-3.2.0/src/uci/uci_controller.cpp
Examining data/jerry-3.2.0/src/uci/uci_controller.h
Examining data/jerry-3.2.0/src/uci/engine_info.cpp
Examining data/jerry-3.2.0/src/uci/engine_info.h
Examining data/jerry-3.2.0/src/uci/uci_worker.h
Examining data/jerry-3.2.0/src/dialogs/dialog_search.h
Examining data/jerry-3.2.0/src/dialogs/dialog_enterposition.cpp
Examining data/jerry-3.2.0/src/dialogs/tab_header_search.cpp
Examining data/jerry-3.2.0/src/dialogs/dialog_guioptions.cpp
Examining data/jerry-3.2.0/src/dialogs/dialog_editheaders.cpp
Examining data/jerry-3.2.0/src/dialogs/dialog_enterposition.h
Examining data/jerry-3.2.0/src/dialogs/dialog_newgame.cpp
Examining data/jerry-3.2.0/src/dialogs/dialog_database.cpp
Examining data/jerry-3.2.0/src/dialogs/tab_font_style.cpp
Examining data/jerry-3.2.0/src/dialogs/tab_header_search.h
Examining data/jerry-3.2.0/src/dialogs/dialog_engines.h
Examining data/jerry-3.2.0/src/dialogs/dialog_about.h
Examining data/jerry-3.2.0/src/dialogs/dialog_browseheaders.cpp
Examining data/jerry-3.2.0/src/dialogs/dialog_gameanalysis.h
Examining data/jerry-3.2.0/src/dialogs/tab_font_style.h
Examining data/jerry-3.2.0/src/dialogs/dialog_browseheaders.h
Examining data/jerry-3.2.0/src/dialogs/dialog_search.cpp
Examining data/jerry-3.2.0/src/dialogs/dialog_about.cpp
Examining data/jerry-3.2.0/src/dialogs/dialog_engineoptions.h
Examining data/jerry-3.2.0/src/dialogs/dialog_promotion.cpp
Examining data/jerry-3.2.0/src/dialogs/dialog_guioptions.h
Examining data/jerry-3.2.0/src/dialogs/dialog_engineoptions.cpp
Examining data/jerry-3.2.0/src/dialogs/dialog_promotion.h
Examining data/jerry-3.2.0/src/dialogs/tab_board_style.h
Examining data/jerry-3.2.0/src/dialogs/dialog_editheaders.h
Examining data/jerry-3.2.0/src/dialogs/dialog_database.h
Examining data/jerry-3.2.0/src/dialogs/dialog_database_help.cpp
Examining data/jerry-3.2.0/src/dialogs/dialog_plaintext.cpp
Examining data/jerry-3.2.0/src/dialogs/dialog_plaintext.h
Examining data/jerry-3.2.0/src/dialogs/dialog_database_help.h
Examining data/jerry-3.2.0/src/dialogs/dialog_newgame.h
Examining data/jerry-3.2.0/src/dialogs/dialog_engines.cpp
Examining data/jerry-3.2.0/src/dialogs/dialog_nextmove.cpp
Examining data/jerry-3.2.0/src/dialogs/dialog_nextmove.h
Examining data/jerry-3.2.0/src/dialogs/dialog_gameanalysis.cpp
Examining data/jerry-3.2.0/src/dialogs/tab_board_style.cpp
Examining data/jerry-3.2.0/src/main_window.cpp
Examining data/jerry-3.2.0/src/viewController/boardviewcontroller.cpp
Examining data/jerry-3.2.0/src/viewController/database_index_model.cpp
Examining data/jerry-3.2.0/src/viewController/pickcolorboard.cpp
Examining data/jerry-3.2.0/src/viewController/pickcolorboard.h
Examining data/jerry-3.2.0/src/viewController/boardviewcontroller.h
Examining data/jerry-3.2.0/src/viewController/engineview.cpp
Examining data/jerry-3.2.0/src/viewController/on_off_button.cpp
Examining data/jerry-3.2.0/src/viewController/on_off_button.h
Examining data/jerry-3.2.0/src/viewController/engineview.h
Examining data/jerry-3.2.0/src/viewController/chessboard.h
Examining data/jerry-3.2.0/src/viewController/piece_images.h
Examining data/jerry-3.2.0/src/viewController/colorstyle.cpp
Examining data/jerry-3.2.0/src/viewController/colorstyle.h
Examining data/jerry-3.2.0/src/viewController/enterposboard.h
Examining data/jerry-3.2.0/src/viewController/chessboard.cpp
Examining data/jerry-3.2.0/src/viewController/moveviewcontroller.cpp
Examining data/jerry-3.2.0/src/viewController/moveviewcontroller.h
Examining data/jerry-3.2.0/src/viewController/piece_images.cpp
Examining data/jerry-3.2.0/src/viewController/database_index_model.h
Examining data/jerry-3.2.0/src/viewController/enterposboard.cpp
Examining data/jerry-3.2.0/src/model/game_model.cpp
Examining data/jerry-3.2.0/src/model/search_pattern.h
Examining data/jerry-3.2.0/src/model/engine.h
Examining data/jerry-3.2.0/src/model/internalengine.h
Examining data/jerry-3.2.0/src/model/engine.cpp
Examining data/jerry-3.2.0/src/model/game_model.h
Examining data/jerry-3.2.0/src/model/engine_option.cpp
Examining data/jerry-3.2.0/src/model/internalengine.cpp
Examining data/jerry-3.2.0/src/model/engine_option.h
Examining data/jerry-3.2.0/src/model/search_pattern.cpp
Examining data/jerry-3.2.0/src/model/font_style.cpp
Examining data/jerry-3.2.0/src/model/font_style.h
Examining data/jerry-3.2.0/src/main_window.h
Examining data/jerry-3.2.0/src/various/helper.h
Examining data/jerry-3.2.0/src/various/resource_finder.h
Examining data/jerry-3.2.0/src/various/helper.cpp
Examining data/jerry-3.2.0/src/various/resource_finder.cpp
Examining data/jerry-3.2.0/src/various/messagebox.cpp
Examining data/jerry-3.2.0/src/various/messagebox.h

FINAL RESULTS:

data/jerry-3.2.0/src/main.cpp:39:5:  [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/jerry-3.2.0/src/chess/database.h:19:18:  [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).
    virtual void open(QString &filename) = 0;
data/jerry-3.2.0/src/chess/pgn_database.cpp:31:15:  [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::WriteOnly | QIODevice::Text)) {
data/jerry-3.2.0/src/chess/pgn_database.cpp:60:15:  [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::WriteOnly | QIODevice::Append)) {
data/jerry-3.2.0/src/chess/pgn_database.cpp:91:15:  [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/jerry-3.2.0/src/chess/pgn_database.cpp:174:26:  [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).
void chess::PgnDatabase::open(QString &filename) {
data/jerry-3.2.0/src/chess/pgn_database.cpp:430: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/jerry-3.2.0/src/chess/pgn_database.h:17:10:  [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).
    void open(QString &filename);
data/jerry-3.2.0/src/chess/pgn_printer.cpp:71: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).
    if(fOut.open(QFile::WriteOnly | QFile::Text)) {
data/jerry-3.2.0/src/chess/pgn_reader.cpp:43: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(QFile::ReadOnly)) {
data/jerry-3.2.0/src/chess/pgn_reader.cpp:48: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 first100arr[100];
data/jerry-3.2.0/src/chess/pgn_reader.cpp:87: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(QFile::ReadOnly)) {
data/jerry-3.2.0/src/chess/pgn_reader.cpp:92: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 first100arr[100];
data/jerry-3.2.0/src/chess/pgn_reader.cpp:123:15:  [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/jerry-3.2.0/src/chess/pgn_reader.cpp:235:15:  [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/jerry-3.2.0/src/chess/pgn_reader.cpp:362:15:  [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/jerry-3.2.0/src/chess/pgn_reader.cpp:440:15:  [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/jerry-3.2.0/src/chess/pgn_reader.cpp:536:15:  [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/jerry-3.2.0/src/chess/pgn_reader.cpp:649: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/jerry-3.2.0/src/chess/pgn_reader.cpp:886:15:  [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/jerry-3.2.0/src/chess/pgn_reader.cpp:962: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/jerry-3.2.0/src/chess/pgn_reader.cpp:1047: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/jerry-3.2.0/src/chess/polyglot.cpp:9:1:  [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 promote_pieces[6] = " nbrq";
data/jerry-3.2.0/src/chess/polyglot.cpp:17:17:  [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)) {
data/jerry-3.2.0/src/chess/polyglot.cpp:60: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 move_s[6];
data/jerry-3.2.0/src/chess/polyglot.cpp:82:9:  [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(move_s,"e1g1");
data/jerry-3.2.0/src/chess/polyglot.cpp:84:9:  [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(move_s,"e1c1");
data/jerry-3.2.0/src/chess/polyglot.cpp:86:9:  [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(move_s,"e8g8");
data/jerry-3.2.0/src/chess/polyglot.cpp:88:9:  [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(move_s,"e8c8");
data/jerry-3.2.0/src/controller/file_controller.cpp:132:35:  [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).
        this->gameModel->database.open(absoluteFilename);
data/jerry-3.2.0/src/controller/file_controller.cpp:225: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).
        file.open(QIODevice::ReadOnly);
data/jerry-3.2.0/src/dialogs/dialog_database.cpp:258:39:  [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).
            this->gameModel->database.open(filename);

ANALYSIS SUMMARY:

Hits = 32
Lines analyzed = 19709 in approximately 0.60 seconds (32734 lines/second)
Physical Source Lines of Code (SLOC) = 13770
Hits@level = [0]   0 [1]   0 [2]  31 [3]   1 [4]   0 [5]   0
Hits@level+ = [0+]  32 [1+]  32 [2+]  32 [3+]   1 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 2.32389 [1+] 2.32389 [2+] 2.32389 [3+] 0.0726216 [4+]   0 [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.