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/sailcut-1.4.1/src/app.cpp
Examining data/sailcut-1.4.1/src/app.h
Examining data/sailcut-1.4.1/src/boatdef-panel.cpp
Examining data/sailcut-1.4.1/src/boatdef-panel.h
Examining data/sailcut-1.4.1/src/filewriter.h
Examining data/sailcut-1.4.1/src/formboat.cpp
Examining data/sailcut-1.4.1/src/formboat.h
Examining data/sailcut-1.4.1/src/formhull.h
Examining data/sailcut-1.4.1/src/formhulldef.cpp
Examining data/sailcut-1.4.1/src/formhulldef.h
Examining data/sailcut-1.4.1/src/formmain.cpp
Examining data/sailcut-1.4.1/src/formmain.h
Examining data/sailcut-1.4.1/src/formmould.cpp
Examining data/sailcut-1.4.1/src/formmould.h
Examining data/sailcut-1.4.1/src/formpanelgroup.cpp
Examining data/sailcut-1.4.1/src/formpanelgroup.h
Examining data/sailcut-1.4.1/src/formprint.cpp
Examining data/sailcut-1.4.1/src/formprint.h
Examining data/sailcut-1.4.1/src/formrig.h
Examining data/sailcut-1.4.1/src/formrigdef.cpp
Examining data/sailcut-1.4.1/src/formrigdef.h
Examining data/sailcut-1.4.1/src/formsail.cpp
Examining data/sailcut-1.4.1/src/formsail.h
Examining data/sailcut-1.4.1/src/formsaildef.h
Examining data/sailcut-1.4.1/src/geocpp/geocpp.h
Examining data/sailcut-1.4.1/src/geocpp/matrix.cpp
Examining data/sailcut-1.4.1/src/geocpp/matrix.h
Examining data/sailcut-1.4.1/src/geocpp/matrix4x4.cpp
Examining data/sailcut-1.4.1/src/geocpp/matrix4x4.h
Examining data/sailcut-1.4.1/src/geocpp/rect.cpp
Examining data/sailcut-1.4.1/src/geocpp/rect.h
Examining data/sailcut-1.4.1/src/geocpp/subspace.cpp
Examining data/sailcut-1.4.1/src/geocpp/subspace.h
Examining data/sailcut-1.4.1/src/geocpp/vector.cpp
Examining data/sailcut-1.4.1/src/geocpp/vector.h
Examining data/sailcut-1.4.1/src/main.cpp
Examining data/sailcut-1.4.1/src/prefs.cpp
Examining data/sailcut-1.4.1/src/prefs.h
Examining data/sailcut-1.4.1/src/sailcpp/boatdef.cpp
Examining data/sailcut-1.4.1/src/sailcpp/boatdef.h
Examining data/sailcut-1.4.1/src/sailcpp/hulldef.cpp
Examining data/sailcut-1.4.1/src/sailcpp/hulldef.h
Examining data/sailcut-1.4.1/src/sailcpp/hullworker.cpp
Examining data/sailcut-1.4.1/src/sailcpp/hullworker.h
Examining data/sailcut-1.4.1/src/sailcpp/panel.cpp
Examining data/sailcut-1.4.1/src/sailcpp/panel.h
Examining data/sailcut-1.4.1/src/sailcpp/panelgroup.cpp
Examining data/sailcut-1.4.1/src/sailcpp/panelgroup.h
Examining data/sailcut-1.4.1/src/sailcpp/rigdef.cpp
Examining data/sailcut-1.4.1/src/sailcpp/rigdef.h
Examining data/sailcut-1.4.1/src/sailcpp/rigworker.cpp
Examining data/sailcut-1.4.1/src/sailcpp/rigworker.h
Examining data/sailcut-1.4.1/src/sailcpp/sailcalc.cpp
Examining data/sailcut-1.4.1/src/sailcpp/sailcalc.h
Examining data/sailcut-1.4.1/src/sailcpp/saildef.cpp
Examining data/sailcut-1.4.1/src/sailcpp/saildef.h
Examining data/sailcut-1.4.1/src/sailcpp/sailmould.cpp
Examining data/sailcut-1.4.1/src/sailcpp/sailmould.h
Examining data/sailcut-1.4.1/src/sailcpp/sailworker.cpp
Examining data/sailcut-1.4.1/src/sailcpp/sailworker.h
Examining data/sailcut-1.4.1/src/saildisp.cpp
Examining data/sailcut-1.4.1/src/saildisp.h
Examining data/sailcut-1.4.1/src/saildispgl.cpp
Examining data/sailcut-1.4.1/src/saildispgl.h
Examining data/sailcut-1.4.1/src/saildisplabel.cpp
Examining data/sailcut-1.4.1/src/saildisplabel.h
Examining data/sailcut-1.4.1/src/saildoc.cpp
Examining data/sailcut-1.4.1/src/saildoc.h
Examining data/sailcut-1.4.1/src/sailpainter.cpp
Examining data/sailcut-1.4.1/src/sailpainter.h
Examining data/sailcut-1.4.1/src/sailprinter.cpp
Examining data/sailcut-1.4.1/src/sailprinter.h
Examining data/sailcut-1.4.1/src/sailtreeitem.cpp
Examining data/sailcut-1.4.1/src/sailtreeitem.h
Examining data/sailcut-1.4.1/src/sailtreemodel.cpp
Examining data/sailcut-1.4.1/src/sailtreemodel.h
Examining data/sailcut-1.4.1/src/sailviewer-panel.cpp
Examining data/sailcut-1.4.1/src/sailviewer-panel.h
Examining data/sailcut-1.4.1/src/sailviewer-tabs.cpp
Examining data/sailcut-1.4.1/src/sailviewer-tabs.h
Examining data/sailcut-1.4.1/src/sailviewer.cpp
Examining data/sailcut-1.4.1/src/sailviewer.h
Examining data/sailcut-1.4.1/src/sailwriter-carlson.cpp
Examining data/sailcut-1.4.1/src/sailwriter-carlson.h
Examining data/sailcut-1.4.1/src/sailwriter-dxf.cpp
Examining data/sailcut-1.4.1/src/sailwriter-dxf.h
Examining data/sailcut-1.4.1/src/sailwriter-hand.cpp
Examining data/sailcut-1.4.1/src/sailwriter-hand.h
Examining data/sailcut-1.4.1/src/sailwriter-svg.cpp
Examining data/sailcut-1.4.1/src/sailwriter-svg.h
Examining data/sailcut-1.4.1/src/sailwriter-txt.cpp
Examining data/sailcut-1.4.1/src/sailwriter-txt.h
Examining data/sailcut-1.4.1/src/sailwriter-xml.h
Examining data/sailcut-1.4.1/src/widgetprofile.cpp
Examining data/sailcut-1.4.1/src/widgetprofile.h
Examining data/sailcut-1.4.1/src/widgetprofilevert.cpp
Examining data/sailcut-1.4.1/src/widgetprofilevert.h
Examining data/sailcut-1.4.1/src/formhull.cpp
Examining data/sailcut-1.4.1/src/formrig.cpp
Examining data/sailcut-1.4.1/src/formsaildef.cpp
Examining data/sailcut-1.4.1/tests/geocpp/tst_geocpp.cpp

FINAL RESULTS:

data/sailcut-1.4.1/src/app.cpp:189:16:  [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 CSailApp::open(const QString &filename)
data/sailcut-1.4.1/src/app.h:60: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(const QString &filename);
data/sailcut-1.4.1/src/formmain.cpp:267: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).
        app->open(newfile);
data/sailcut-1.4.1/src/formmain.cpp:278: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).
        app->open(a->data().toString());
data/sailcut-1.4.1/src/geocpp/matrix.cpp:500: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(m_data, m.m_data, sizeof(real) * m_nrow * m_ncol);
data/sailcut-1.4.1/src/geocpp/matrix.h:64:13:  [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(m_data, m.m_data, sizeof(real) * m_nrow * m_ncol);
data/sailcut-1.4.1/src/main.cpp:41: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).
        app.open(argv[1]);
data/sailcut-1.4.1/src/sailcpp/panelgroup.cpp:90: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 buffer[32];
data/sailcut-1.4.1/src/sailcpp/panelgroup.cpp:91:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buffer, "%i", i);
data/sailcut-1.4.1/src/sailcpp/panelgroup.cpp:105: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 buffer[32];
data/sailcut-1.4.1/src/sailcpp/panelgroup.cpp:106:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buffer, "%i", i);
data/sailcut-1.4.1/src/saildoc.cpp:51: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 ( !f.open(QIODevice::ReadOnly) )
data/sailcut-1.4.1/src/saildoc.cpp:1121: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 ( !f.open(QIODevice::WriteOnly) )
data/sailcut-1.4.1/src/sailwriter-carlson.cpp:96:9:  [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).
    out.open(QFile::encodeName(filename),ios::out);
data/sailcut-1.4.1/src/sailwriter-dxf.cpp:68:9:  [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).
    out.open(QFile::encodeName(filename),ios::out);
data/sailcut-1.4.1/src/sailwriter-hand.cpp:34:11:  [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).
    myOut.open(QFile::encodeName(filename), ios::out);
data/sailcut-1.4.1/src/sailwriter-txt.cpp:33:11:  [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).
    myOut.open(QFile::encodeName(filename), ios::out);
data/sailcut-1.4.1/src/app.cpp:266:49:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            CPrefs newPrefs = CPrefsXmlWriter().read(prefsfile);
data/sailcut-1.4.1/src/boatdef-panel.cpp:183:69:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            (CPanelGroup&)element = CSailWorker(CSailDefXmlWriter().read(filename)).makeSail();
data/sailcut-1.4.1/src/boatdef-panel.cpp:186:69:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            (CPanelGroup&)element = CHullWorker(CHullDefXmlWriter().read(filename)).makeHull();
data/sailcut-1.4.1/src/boatdef-panel.cpp:189:67:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            (CPanelGroup&)element = CRigWorker(CRigDefXmlWriter().read(filename)).makeRig();
data/sailcut-1.4.1/src/boatdef-panel.cpp:192:60:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            (CPanelGroup&)element = CPanelGroupXmlWriter().read(filename);
data/sailcut-1.4.1/src/filewriter.h:95:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    virtual const objtype read(const QString &) const
data/sailcut-1.4.1/src/filewriter.h:111:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                dest = read(newfilename);
data/sailcut-1.4.1/src/formboat.cpp:68:48:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        CSailDef saildef = CSailDefXmlWriter().read(newfile);
data/sailcut-1.4.1/src/formboat.cpp:74:48:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        CHullDef hulldef = CHullDefXmlWriter().read(newfile);
data/sailcut-1.4.1/src/formboat.cpp:80:45:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        CRigDef rigdef = CRigDefXmlWriter().read(newfile);
data/sailcut-1.4.1/src/formboat.cpp:86:56:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        (CPanelGroup&)element = CPanelGroupXmlWriter().read(newfile);
data/sailcut-1.4.1/src/formboat.cpp:111:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
bool CFormBoat::read(const QString &filename)
data/sailcut-1.4.1/src/formboat.cpp:114:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        setDef(writer.read(filename));
data/sailcut-1.4.1/src/formboat.h:40:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    bool read(const QString &filename);
data/sailcut-1.4.1/src/formhull.cpp:62:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
bool CFormHull::read(const QString &filename)
data/sailcut-1.4.1/src/formhull.cpp:65:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        setDef(writer.read(filename));
data/sailcut-1.4.1/src/formhull.h:38:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    bool read(const QString &filename);
data/sailcut-1.4.1/src/formmain.cpp:126:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(filename)) {
data/sailcut-1.4.1/src/formmain.h:50:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    virtual bool read(const QString &filename) = 0;
data/sailcut-1.4.1/src/formpanelgroup.cpp:60:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
bool CFormPanelGroup::read(const QString &filename)
data/sailcut-1.4.1/src/formpanelgroup.cpp:63:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        setDef(writer.read(filename));
data/sailcut-1.4.1/src/formpanelgroup.h:41:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    bool read(const QString &filename);
data/sailcut-1.4.1/src/formrig.cpp:63:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
bool CFormRig::read(const QString &filename)
data/sailcut-1.4.1/src/formrig.cpp:66:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        setDef(writer.read(filename));
data/sailcut-1.4.1/src/formrig.h:38:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    bool read(const QString &filename);
data/sailcut-1.4.1/src/formsail.cpp:107:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
bool CFormSail::read(const QString &filename)
data/sailcut-1.4.1/src/formsail.cpp:110:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        setDef(writer.read(filename));
data/sailcut-1.4.1/src/formsail.h:41:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    bool read(const QString &filename);
data/sailcut-1.4.1/src/sailwriter-xml.h:71:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    const objtype read(const QString &filename) const

ANALYSIS SUMMARY:

Hits = 46
Lines analyzed = 21189 in approximately 0.62 seconds (34403 lines/second)
Physical Source Lines of Code (SLOC) = 12173
Hits@level = [0]   0 [1]  29 [2]  17 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  46 [1+]  46 [2+]  17 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 3.77885 [1+] 3.77885 [2+] 1.39653 [3+]   0 [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.