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/smb4k-3.0.7/smb4k/smb4kprofilesmenu.cpp Examining data/smb4k-3.0.7/smb4k/smb4ksharesviewitem.cpp Examining data/smb4k-3.0.7/smb4k/smb4kconfigpageprofiles.h Examining data/smb4k-3.0.7/smb4k/smb4kmainwindow.cpp Examining data/smb4k-3.0.7/smb4k/smb4kbookmarkmenu.h Examining data/smb4k-3.0.7/smb4k/smb4ksharesmenu.h Examining data/smb4k-3.0.7/smb4k/smb4kconfigpageuserinterface.h Examining data/smb4k-3.0.7/smb4k/smb4kconfigpageuserinterface.cpp Examining data/smb4k-3.0.7/smb4k/smb4kconfigdialog.h Examining data/smb4k-3.0.7/smb4k/smb4ksystemtray.h Examining data/smb4k-3.0.7/smb4k/smb4kconfigpageprofiles.cpp Examining data/smb4k-3.0.7/smb4k/smb4ksharesmenu.cpp Examining data/smb4k-3.0.7/smb4k/smb4knetworkbrowserdockwidget.h Examining data/smb4k-3.0.7/smb4k/smb4kbookmarkmenu.cpp Examining data/smb4k-3.0.7/smb4k/smb4ksharesview.cpp Examining data/smb4k-3.0.7/smb4k/smb4knetworkbrowser.h Examining data/smb4k-3.0.7/smb4k/main.cpp Examining data/smb4k-3.0.7/smb4k/smb4knetworkbrowseritem.h Examining data/smb4k-3.0.7/smb4k/smb4kmainwindow.h Examining data/smb4k-3.0.7/smb4k/smb4knetworkbrowserdockwidget.cpp Examining data/smb4k-3.0.7/smb4k/smb4kconfigpagenetwork.h Examining data/smb4k-3.0.7/smb4k/smb4knetworkbrowseritem.cpp Examining data/smb4k-3.0.7/smb4k/smb4ktooltip.cpp Examining data/smb4k-3.0.7/smb4k/smb4kconfigpagecustomoptions.h Examining data/smb4k-3.0.7/smb4k/smb4kconfigpagemounting.cpp Examining data/smb4k-3.0.7/smb4k/smb4kconfigdialog.cpp Examining data/smb4k-3.0.7/smb4k/smb4knetworkbrowser.cpp Examining data/smb4k-3.0.7/smb4k/smb4knetworksearchtoolbar.h Examining data/smb4k-3.0.7/smb4k/smb4ksystemtray.cpp Examining data/smb4k-3.0.7/smb4k/smb4kconfigpagesynchronization.cpp Examining data/smb4k-3.0.7/smb4k/smb4kconfigpageauthentication.h Examining data/smb4k-3.0.7/smb4k/smb4ksharesviewitem.h Examining data/smb4k-3.0.7/smb4k/smb4kconfigpageauthentication.cpp Examining data/smb4k-3.0.7/smb4k/smb4ksharesview.h Examining data/smb4k-3.0.7/smb4k/smb4kconfigpagenetwork.cpp Examining data/smb4k-3.0.7/smb4k/smb4kconfigpagemounting.h Examining data/smb4k-3.0.7/smb4k/smb4kprofilesmenu.h Examining data/smb4k-3.0.7/smb4k/smb4knetworksearchtoolbar.cpp Examining data/smb4k-3.0.7/smb4k/smb4ksharesviewdockwidget.h Examining data/smb4k-3.0.7/smb4k/smb4kconfigpagesynchronization.h Examining data/smb4k-3.0.7/smb4k/smb4ksharesviewdockwidget.cpp Examining data/smb4k-3.0.7/smb4k/smb4kconfigpagecustomoptions.cpp Examining data/smb4k-3.0.7/smb4k/smb4ktooltip.h Examining data/smb4k-3.0.7/helpers/smb4kmounthelper.h Examining data/smb4k-3.0.7/helpers/smb4kmounthelper.cpp Examining data/smb4k-3.0.7/core/smb4kglobal_p.cpp Examining data/smb4k-3.0.7/core/smb4ksynchronizer.cpp Examining data/smb4k-3.0.7/core/smb4khardwareinterface_p.cpp Examining data/smb4k-3.0.7/core/smb4kwalletmanager.cpp Examining data/smb4k-3.0.7/core/smb4kfile.h Examining data/smb4k-3.0.7/core/smb4kcustomoptionsmanager_p.h Examining data/smb4k-3.0.7/core/smb4knotification_p.cpp Examining data/smb4k-3.0.7/core/smb4kprofilemanager.cpp Examining data/smb4k-3.0.7/core/smb4kmounter_p.h Examining data/smb4k-3.0.7/core/smb4kclient.cpp Examining data/smb4k-3.0.7/core/smb4khost.h Examining data/smb4k-3.0.7/core/smb4kbookmarkhandler.cpp Examining data/smb4k-3.0.7/core/smb4ksynchronizer_p.h Examining data/smb4k-3.0.7/core/smb4knotification.h Examining data/smb4k-3.0.7/core/smb4kmounter.cpp Examining data/smb4k-3.0.7/core/smb4kcustomoptions.cpp Examining data/smb4k-3.0.7/core/smb4kglobal_p.h Examining data/smb4k-3.0.7/core/smb4knotification.cpp Examining data/smb4k-3.0.7/core/smb4kauthinfo.h Examining data/smb4k-3.0.7/core/smb4khomesshareshandler.cpp Examining data/smb4k-3.0.7/core/smb4kclient.h Examining data/smb4k-3.0.7/core/smb4kbookmarkhandler_p.cpp Examining data/smb4k-3.0.7/core/smb4kclient_p.cpp Examining data/smb4k-3.0.7/core/smb4kcustomoptionsmanager_p.cpp Examining data/smb4k-3.0.7/core/smb4kclient_p.h Examining data/smb4k-3.0.7/core/smb4kprofilemanager_p.cpp Examining data/smb4k-3.0.7/core/smb4kauthinfo.cpp Examining data/smb4k-3.0.7/core/smb4kbookmark.cpp Examining data/smb4k-3.0.7/core/smb4khardwareinterface.cpp Examining data/smb4k-3.0.7/core/smb4kprofilemanager.h Examining data/smb4k-3.0.7/core/smb4kglobal.h Examining data/smb4k-3.0.7/core/smb4knotification_p.h Examining data/smb4k-3.0.7/core/smb4khomesshareshandler_p.cpp Examining data/smb4k-3.0.7/core/smb4kwalletmanager_p.h Examining data/smb4k-3.0.7/core/smb4kworkgroup.cpp Examining data/smb4k-3.0.7/core/smb4khardwareinterface.h Examining data/smb4k-3.0.7/core/smb4kwalletmanager_p.cpp Examining data/smb4k-3.0.7/core/smb4kbookmarkhandler_p.h Examining data/smb4k-3.0.7/core/smb4kcustomoptionsmanager.cpp Examining data/smb4k-3.0.7/core/smb4kfile.cpp Examining data/smb4k-3.0.7/core/smb4kcustomoptions.h Examining data/smb4k-3.0.7/core/smb4khardwareinterface_p.h Examining data/smb4k-3.0.7/core/smb4kglobal.cpp Examining data/smb4k-3.0.7/core/smb4kshare.cpp Examining data/smb4k-3.0.7/core/smb4ksynchronizer.h Examining data/smb4k-3.0.7/core/smb4khost.cpp Examining data/smb4k-3.0.7/core/smb4kmounter_p.cpp Examining data/smb4k-3.0.7/core/smb4kwalletmanager.h Examining data/smb4k-3.0.7/core/smb4kprofilemanager_p.h Examining data/smb4k-3.0.7/core/smb4kworkgroup.h Examining data/smb4k-3.0.7/core/smb4kbasicnetworkitem.cpp Examining data/smb4k-3.0.7/core/smb4khomesshareshandler_p.h Examining data/smb4k-3.0.7/core/smb4ksynchronizer_p.cpp Examining data/smb4k-3.0.7/core/smb4kcustomoptionsmanager.h Examining data/smb4k-3.0.7/core/smb4kbookmark.h Examining data/smb4k-3.0.7/core/smb4kmounter.h Examining data/smb4k-3.0.7/core/smb4kbookmarkhandler.h Examining data/smb4k-3.0.7/core/smb4khomesshareshandler.h Examining data/smb4k-3.0.7/core/smb4kbasicnetworkitem.h Examining data/smb4k-3.0.7/core/smb4kshare.h Examining data/smb4k-3.0.7/plasmoid/plugin/smb4kprofileobject.h Examining data/smb4k-3.0.7/plasmoid/plugin/smb4kqmlplugin.h Examining data/smb4k-3.0.7/plasmoid/plugin/smb4kdeclarative.cpp Examining data/smb4k-3.0.7/plasmoid/plugin/smb4kprofileobject.cpp Examining data/smb4k-3.0.7/plasmoid/plugin/smb4knetworkobject.cpp Examining data/smb4k-3.0.7/plasmoid/plugin/smb4kdeclarative.h Examining data/smb4k-3.0.7/plasmoid/plugin/smb4knetworkobject.h Examining data/smb4k-3.0.7/plasmoid/plugin/smb4kbookmarkobject.cpp Examining data/smb4k-3.0.7/plasmoid/plugin/smb4kdeclarative_p.h Examining data/smb4k-3.0.7/plasmoid/plugin/smb4kdeclarative_p.cpp Examining data/smb4k-3.0.7/plasmoid/plugin/smb4kqmlplugin.cpp Examining data/smb4k-3.0.7/plasmoid/plugin/smb4kbookmarkobject.h FINAL RESULTS: data/smb4k-3.0.7/core/smb4kcustomoptions.cpp:563:45: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. void Smb4KCustomOptions::setWriteAccess(int access) data/smb4k-3.0.7/core/smb4kcustomoptions.cpp:565:20: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. d->writeAccess = access; data/smb4k-3.0.7/core/smb4kcustomoptions.h:418:29: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. void setWriteAccess(int access); data/smb4k-3.0.7/core/smb4kbookmarkhandler.cpp:302: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 (xmlFile.open(QIODevice::WriteOnly|QIODevice::Text)) data/smb4k-3.0.7/core/smb4kbookmarkhandler.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 (xmlFile.open(QIODevice::ReadOnly | QIODevice::Text)) data/smb4k-3.0.7/core/smb4kclient_p.cpp:908: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|QFile::Text)) data/smb4k-3.0.7/core/smb4kclient_p.cpp:993: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 (!file.open(QFile::ReadOnly)) data/smb4k-3.0.7/core/smb4kclient_p.cpp:1005: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 buffer[4096]; data/smb4k-3.0.7/core/smb4kcustomoptionsmanager.cpp:372: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 (xmlFile.open(QIODevice::ReadOnly | QIODevice::Text)) data/smb4k-3.0.7/core/smb4kcustomoptionsmanager.cpp:775: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 (xmlFile.open(QIODevice::WriteOnly|QIODevice::Text)) data/smb4k-3.0.7/core/smb4kglobal_p.cpp:167:19: [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 (smbConf.open(QIODevice::ReadOnly | QIODevice::Text)) data/smb4k-3.0.7/core/smb4kglobal_p.cpp:238:29: [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 (includeFile.open(QIODevice::ReadOnly | QIODevice::Text)) data/smb4k-3.0.7/core/smb4khomesshareshandler.cpp:155: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 (xmlFile.open(QIODevice::ReadOnly | QIODevice::Text)) data/smb4k-3.0.7/core/smb4khomesshareshandler.cpp:299: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 (xmlFile.open(QIODevice::WriteOnly|QIODevice::Text)) data/smb4k-3.0.7/core/smb4kclient_p.cpp:1011:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((bytes = file.read(buffer, sizeof(buffer))) > 0) data/smb4k-3.0.7/core/smb4kglobal_p.cpp:116:74: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). const QMap<QString,QString> &Smb4KGlobalPrivate::globalSambaOptions(bool read) data/smb4k-3.0.7/core/smb4kglobal_p.cpp:118:62: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((!m_sambaConfigMissing && m_sambaOptions.isEmpty()) || read) ANALYSIS SUMMARY: Hits = 17 Lines analyzed = 44918 in approximately 0.94 seconds (47780 lines/second) Physical Source Lines of Code (SLOC) = 24258 Hits@level = [0] 0 [1] 3 [2] 11 [3] 0 [4] 3 [5] 0 Hits@level+ = [0+] 17 [1+] 17 [2+] 14 [3+] 3 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 0.7008 [1+] 0.7008 [2+] 0.577129 [3+] 0.123671 [4+] 0.123671 [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.