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/ukui-system-monitor-1.0.3/shell/macro.h Examining data/ukui-system-monitor-1.0.3/component/utils.h Examining data/ukui-system-monitor-1.0.3/component/mytitlebar.h Examining data/ukui-system-monitor-1.0.3/component/mytitlebar.cpp Examining data/ukui-system-monitor-1.0.3/src/filesystemlistitem.h Examining data/ukui-system-monitor-1.0.3/src/networkwidget.cpp Examining data/ukui-system-monitor-1.0.3/src/networkwidget.h Examining data/ukui-system-monitor-1.0.3/src/cpuballwidget.cpp Examining data/ukui-system-monitor-1.0.3/src/netcatogoryshow.cpp Examining data/ukui-system-monitor-1.0.3/src/systemmonitor.cpp Examining data/ukui-system-monitor-1.0.3/src/propertiesdialog.cpp Examining data/ukui-system-monitor-1.0.3/src/memorywidget.cpp Examining data/ukui-system-monitor-1.0.3/src/processworker.h Examining data/ukui-system-monitor-1.0.3/src/propertiesdialog.h Examining data/ukui-system-monitor-1.0.3/src/processdata.h Examining data/ukui-system-monitor-1.0.3/src/systemmonitor.h Examining data/ukui-system-monitor-1.0.3/src/resourcescategory.h Examining data/ukui-system-monitor-1.0.3/src/shell/customstyle.cpp Examining data/ukui-system-monitor-1.0.3/src/shell/customstyle.h Examining data/ukui-system-monitor-1.0.3/src/filesystemdialog.cpp Examining data/ukui-system-monitor-1.0.3/src/filesystemlistwidget.cpp Examining data/ukui-system-monitor-1.0.3/src/processlistwidget.h Examining data/ukui-system-monitor-1.0.3/src/networkindicator.h Examining data/ukui-system-monitor-1.0.3/src/memorycircle.cpp Examining data/ukui-system-monitor-1.0.3/src/maincontroller.cpp Examining data/ukui-system-monitor-1.0.3/src/processcategory.cpp Examining data/ukui-system-monitor-1.0.3/src/processmanager.cpp Examining data/ukui-system-monitor-1.0.3/src/monitortitlewidget.h Examining data/ukui-system-monitor-1.0.3/src/filesystemdialog.h Examining data/ukui-system-monitor-1.0.3/src/linebandwith.cpp Examining data/ukui-system-monitor-1.0.3/src/cpuballwidget.h Examining data/ukui-system-monitor-1.0.3/src/processlistitem.cpp Examining data/ukui-system-monitor-1.0.3/src/smoothcurvegenerator.h Examining data/ukui-system-monitor-1.0.3/src/processlistitem.h Examining data/ukui-system-monitor-1.0.3/src/filesystemwatcher.cpp Examining data/ukui-system-monitor-1.0.3/src/QtSingleApplication/qtsingleapplication.h Examining data/ukui-system-monitor-1.0.3/src/QtSingleApplication/qtsinglecoreapplication.h Examining data/ukui-system-monitor-1.0.3/src/QtSingleApplication/qtlockedfile_win.cpp Examining data/ukui-system-monitor-1.0.3/src/QtSingleApplication/qtlocalpeer.h Examining data/ukui-system-monitor-1.0.3/src/QtSingleApplication/qtlocalpeer.cpp Examining data/ukui-system-monitor-1.0.3/src/QtSingleApplication/qtlockedfile.h Examining data/ukui-system-monitor-1.0.3/src/QtSingleApplication/qtlockedfile.cpp Examining data/ukui-system-monitor-1.0.3/src/QtSingleApplication/qtsingleapplication.cpp Examining data/ukui-system-monitor-1.0.3/src/QtSingleApplication/qtsinglecoreapplication.cpp Examining data/ukui-system-monitor-1.0.3/src/QtSingleApplication/qtlockedfile_unix.cpp Examining data/ukui-system-monitor-1.0.3/src/processdialog.h Examining data/ukui-system-monitor-1.0.3/src/resourcescategory.cpp Examining data/ukui-system-monitor-1.0.3/src/maincontroller.h Examining data/ukui-system-monitor-1.0.3/src/util.h Examining data/ukui-system-monitor-1.0.3/src/monitortitlewidget.cpp Examining data/ukui-system-monitor-1.0.3/src/processdialog.cpp Examining data/ukui-system-monitor-1.0.3/src/resourcesdialog.h Examining data/ukui-system-monitor-1.0.3/src/memorycircle.h Examining data/ukui-system-monitor-1.0.3/src/renicedialog.cpp Examining data/ukui-system-monitor-1.0.3/src/filesystemworker.h Examining data/ukui-system-monitor-1.0.3/src/processmanager.h Examining data/ukui-system-monitor-1.0.3/src/filesystemworker.cpp Examining data/ukui-system-monitor-1.0.3/src/cpuratewidget.h Examining data/ukui-system-monitor-1.0.3/src/cpuratewidget.cpp Examining data/ukui-system-monitor-1.0.3/src/smoothcurvegenerator.cpp Examining data/ukui-system-monitor-1.0.3/src/memorywidget.h Examining data/ukui-system-monitor-1.0.3/src/filesystemdata.cpp Examining data/ukui-system-monitor-1.0.3/src/netcatogoryshow.h Examining data/ukui-system-monitor-1.0.3/src/singleProcessNet/devices.h Examining data/ukui-system-monitor-1.0.3/src/singleProcessNet/process.cpp Examining data/ukui-system-monitor-1.0.3/src/singleProcessNet/packet.cpp Examining data/ukui-system-monitor-1.0.3/src/singleProcessNet/kylinsystemnethogs.h Examining data/ukui-system-monitor-1.0.3/src/singleProcessNet/conninode.cpp Examining data/ukui-system-monitor-1.0.3/src/singleProcessNet/connection.cpp Examining data/ukui-system-monitor-1.0.3/src/singleProcessNet/packet.h Examining data/ukui-system-monitor-1.0.3/src/singleProcessNet/decpcap.c Examining data/ukui-system-monitor-1.0.3/src/singleProcessNet/devices.cpp Examining data/ukui-system-monitor-1.0.3/src/singleProcessNet/scanthread.cpp Examining data/ukui-system-monitor-1.0.3/src/singleProcessNet/refreshthread.h Examining data/ukui-system-monitor-1.0.3/src/singleProcessNet/inode2prog.h Examining data/ukui-system-monitor-1.0.3/src/singleProcessNet/decpcap.h Examining data/ukui-system-monitor-1.0.3/src/singleProcessNet/mainwindow.cpp Examining data/ukui-system-monitor-1.0.3/src/singleProcessNet/process.h Examining data/ukui-system-monitor-1.0.3/src/singleProcessNet/refreshthread.cpp Examining data/ukui-system-monitor-1.0.3/src/singleProcessNet/scanthread.h Examining data/ukui-system-monitor-1.0.3/src/singleProcessNet/conninode.h Examining data/ukui-system-monitor-1.0.3/src/singleProcessNet/connection.h Examining data/ukui-system-monitor-1.0.3/src/singleProcessNet/inode2prog.cpp Examining data/ukui-system-monitor-1.0.3/src/processcategory.h Examining data/ukui-system-monitor-1.0.3/src/filesystemwatcher.h Examining data/ukui-system-monitor-1.0.3/src/main.cpp Examining data/ukui-system-monitor-1.0.3/src/resourcesdialog.cpp Examining data/ukui-system-monitor-1.0.3/src/util.cpp Examining data/ukui-system-monitor-1.0.3/src/renicedialog.h Examining data/ukui-system-monitor-1.0.3/src/resourcesindicator.cpp Examining data/ukui-system-monitor-1.0.3/src/networkflow.h Examining data/ukui-system-monitor-1.0.3/src/resourcesindicator.h Examining data/ukui-system-monitor-1.0.3/src/filesystemlistwidget.h Examining data/ukui-system-monitor-1.0.3/src/linebandwith.h Examining data/ukui-system-monitor-1.0.3/src/processlistwidget.cpp Examining data/ukui-system-monitor-1.0.3/src/filesystemdata.h Examining data/ukui-system-monitor-1.0.3/src/networkindicator.cpp Examining data/ukui-system-monitor-1.0.3/src/processworker.cpp Examining data/ukui-system-monitor-1.0.3/src/framelessExtended/framelesshandle.h Examining data/ukui-system-monitor-1.0.3/src/framelessExtended/framelesshandle.cpp Examining data/ukui-system-monitor-1.0.3/src/framelessExtended/widgethandlerealize.cpp Examining data/ukui-system-monitor-1.0.3/src/framelessExtended/framelesshandleprivate.h Examining data/ukui-system-monitor-1.0.3/src/framelessExtended/widgethandlerealize.h Examining data/ukui-system-monitor-1.0.3/src/framelessExtended/cursorposcalculator.cpp Examining data/ukui-system-monitor-1.0.3/src/framelessExtended/cursorposcalculator.h Examining data/ukui-system-monitor-1.0.3/src/filesystemlistitem.cpp Examining data/ukui-system-monitor-1.0.3/src/networkflow.cpp Examining data/ukui-system-monitor-1.0.3/widgets/mysearchedit.h Examining data/ukui-system-monitor-1.0.3/widgets/mydialog.h Examining data/ukui-system-monitor-1.0.3/widgets/mydialog.cpp Examining data/ukui-system-monitor-1.0.3/widgets/myhoverbutton.cpp Examining data/ukui-system-monitor-1.0.3/widgets/myhoverbutton.h Examining data/ukui-system-monitor-1.0.3/widgets/myaction.cpp Examining data/ukui-system-monitor-1.0.3/widgets/myactiongroupitem.h Examining data/ukui-system-monitor-1.0.3/widgets/myaction.h Examining data/ukui-system-monitor-1.0.3/widgets/mytristatebutton.h Examining data/ukui-system-monitor-1.0.3/widgets/myunderlinebutton.h Examining data/ukui-system-monitor-1.0.3/widgets/myactiongroupitem.cpp Examining data/ukui-system-monitor-1.0.3/widgets/mytristatebutton.cpp Examining data/ukui-system-monitor-1.0.3/widgets/mysearchedit.cpp Examining data/ukui-system-monitor-1.0.3/widgets/myactiongroup.cpp Examining data/ukui-system-monitor-1.0.3/widgets/myactiongroup.h Examining data/ukui-system-monitor-1.0.3/widgets/myunderlinebutton.cpp FINAL RESULTS: data/ukui-system-monitor-1.0.3/src/singleProcessNet/inode2prog.cpp:177:17: [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. int usedlen = readlink(fromname, linkname, linklen-1); data/ukui-system-monitor-1.0.3/src/main.cpp:70:35: [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 locale = QLocale::system().name(); data/ukui-system-monitor-1.0.3/src/processlistitem.cpp:340:32: [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. QCollator qco(QLocale::system()); data/ukui-system-monitor-1.0.3/src/processlistitem.cpp:366:32: [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. QCollator qco(QLocale::system()); data/ukui-system-monitor-1.0.3/src/processlistitem.cpp:385:32: [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. QCollator qco(QLocale::system()); data/ukui-system-monitor-1.0.3/src/processworker.cpp:244:13: [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. if (access("/run/systemd/seats/", F_OK) >= 0) { data/ukui-system-monitor-1.0.3/src/resourcesdialog.cpp:125:27: [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. &user, &nice, &system, &idle, &iowait, &irq, &softirq, &steal, &guest, &guestnice); data/ukui-system-monitor-1.0.3/src/resourcesdialog.cpp:126:30: [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. workTime = user + nice + system; data/ukui-system-monitor-1.0.3/src/singleProcessNet/packet.cpp:90:2: [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(iFreq.ifr_name, device); data/ukui-system-monitor-1.0.3/src/util.cpp:177:67: [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 localNameFlag = QString("Name[%1]=").arg(QLocale::system().name()); data/ukui-system-monitor-1.0.3/src/util.cpp:179:76: [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 genericNameFlag = QString("GenericName[%1]=").arg(QLocale::system().name()); data/ukui-system-monitor-1.0.3/src/main.cpp:57:62: [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. QString id = QString("ukui-system-monitor"+QLatin1String(getenv("DISPLAY"))); data/ukui-system-monitor-1.0.3/src/QtSingleApplication/qtlocalpeer.cpp:108: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). lockFile.open(QIODevice::ReadWrite); data/ukui-system-monitor-1.0.3/src/QtSingleApplication/qtlockedfile.cpp:123:20: [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). bool QtLockedFile::open(OpenMode mode) data/ukui-system-monitor-1.0.3/src/QtSingleApplication/qtlockedfile.cpp:129: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). return QFile::open(mode); data/ukui-system-monitor-1.0.3/src/QtSingleApplication/qtlockedfile.h:76: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). bool open(OpenMode mode); data/ukui-system-monitor-1.0.3/src/cpuratewidget.cpp:73: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/ukui-system-monitor-1.0.3/src/cpuratewidget.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 buf[BUF_SIZE]; data/ukui-system-monitor-1.0.3/src/cpuratewidget.cpp:112: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/ukui-system-monitor-1.0.3/src/cpuratewidget.cpp:142: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/ukui-system-monitor-1.0.3/src/cpuratewidget.cpp:179: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(QFile::ReadOnly)) { data/ukui-system-monitor-1.0.3/src/filesystemwatcher.cpp:52:12: [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). m_fd = open(DEVICE_MOUNT_PONINT_RECORD_FILE, O_RDONLY); data/ukui-system-monitor-1.0.3/src/filesystemworker.cpp:36: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 devname[256]; data/ukui-system-monitor-1.0.3/src/filesystemworker.cpp:37: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 mountdir[256]; data/ukui-system-monitor-1.0.3/src/filesystemworker.cpp:38: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 type[256]; data/ukui-system-monitor-1.0.3/src/filesystemworker.cpp:88:5: [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(disk.devname, entry->devname, strlen(entry->devname)); data/ukui-system-monitor-1.0.3/src/filesystemworker.cpp:89:5: [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(disk.mountdir, entry->mountdir, strlen(entry->mountdir)); data/ukui-system-monitor-1.0.3/src/filesystemworker.cpp:90:5: [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(disk.type, entry->type, strlen(entry->type)); data/ukui-system-monitor-1.0.3/src/maincontroller.cpp:67: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 service_name[SERVICE_NAME_SIZE]; data/ukui-system-monitor-1.0.3/src/maincontroller.cpp:86: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 service_name[SERVICE_NAME_SIZE]; data/ukui-system-monitor-1.0.3/src/processworker.cpp:83: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[10]; data/ukui-system-monitor-1.0.3/src/processworker.cpp:153:5: [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(s, buf, sz); data/ukui-system-monitor-1.0.3/src/processworker.cpp:165: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[26]; data/ukui-system-monitor-1.0.3/src/processworker.cpp:369:13: [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 username[16]; data/ukui-system-monitor-1.0.3/src/resourcesdialog.cpp:108:18: [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). FILE *file = fopen("/proc/stat", "r"); data/ukui-system-monitor-1.0.3/src/resourcesdialog.cpp:113: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 buffer[1024] = {0}; data/ukui-system-monitor-1.0.3/src/singleProcessNet/conninode.cpp:57:2: [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 rem_addr[128], local_addr[128]; data/ukui-system-monitor-1.0.3/src/singleProcessNet/conninode.cpp:153:20: [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). FILE * procinfo = fopen (filename, "r"); data/ukui-system-monitor-1.0.3/src/singleProcessNet/conninode.cpp:155:2: [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[8192]; data/ukui-system-monitor-1.0.3/src/singleProcessNet/decpcap.c:300: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 (userdata_copy, handle->userdata, handle->userdata_size); data/ukui-system-monitor-1.0.3/src/singleProcessNet/inode2prog.cpp:83:2: [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[255]; data/ukui-system-monitor-1.0.3/src/singleProcessNet/inode2prog.cpp:98: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). int fd = open(filepath, O_RDONLY); data/ukui-system-monitor-1.0.3/src/singleProcessNet/inode2prog.cpp:118:2: [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 filename[maxfilenamelen]; data/ukui-system-monitor-1.0.3/src/singleProcessNet/inode2prog.cpp:149:2: [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 dirname[10 + MAX_PID_LENGTH]; data/ukui-system-monitor-1.0.3/src/singleProcessNet/inode2prog.cpp:170: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 fromname[10 + MAX_PID_LENGTH + 1 + MAX_FDLINK]; data/ukui-system-monitor-1.0.3/src/singleProcessNet/inode2prog.cpp:176: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 linkname [linklen]; data/ukui-system-monitor-1.0.3/src/singleProcessNet/kylinsystemnethogs.h:81: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. local_addr (char m_address [33], local_addr * m_next = NULL) data/ukui-system-monitor-1.0.3/src/singleProcessNet/kylinsystemnethogs.h:84: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 address [40]; data/ukui-system-monitor-1.0.3/src/singleProcessNet/packet.cpp:100:18: [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). FILE * ifinfo = fopen ("/proc/net/if_inet6", "r"); data/ukui-system-monitor-1.0.3/src/singleProcessNet/packet.cpp:101:2: [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 [500]; data/ukui-system-monitor-1.0.3/src/singleProcessNet/packet.cpp:108: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 address [33]; data/ukui-system-monitor-1.0.3/src/singleProcessNet/packet.cpp:109: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 ifname [9]; data/ukui-system-monitor-1.0.3/src/singleProcessNet/packet.cpp:257:6: [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 addy [50]; data/ukui-system-monitor-1.0.3/src/singleProcessNet/process.cpp:165:2: [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 procdir [100]; data/ukui-system-monitor-1.0.3/src/singleProcessNet/process.cpp:166:2: [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(procdir , "/proc/%d", node->pid); data/ukui-system-monitor-1.0.3/src/singleProcessNet/scanthread.cpp:134: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 errbuf[PCAP_ERRBUF_SIZE]; data/ukui-system-monitor-1.0.3/src/systemmonitor.cpp:541: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)) qDebug() << "Read file Failed."; data/ukui-system-monitor-1.0.3/src/util.cpp:125:8: [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). in.open(desktopFile); data/ukui-system-monitor-1.0.3/src/util.cpp:171:8: [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). in.open(desktopFile); data/ukui-system-monitor-1.0.3/src/util.cpp:274: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 buffer1[30]; data/ukui-system-monitor-1.0.3/src/util.cpp:301:12: [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 (fd.open(QFile::ReadOnly)) { data/ukui-system-monitor-1.0.3/src/QtSingleApplication/qtlocalpeer.cpp:167:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). res &= (socket.read(qstrlen(ack)) == ack); data/ukui-system-monitor-1.0.3/src/filesystemworker.cpp:88:42: [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). memcpy(disk.devname, entry->devname, strlen(entry->devname)); data/ukui-system-monitor-1.0.3/src/filesystemworker.cpp:89:44: [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). memcpy(disk.mountdir, entry->mountdir, strlen(entry->mountdir)); data/ukui-system-monitor-1.0.3/src/filesystemworker.cpp:90:36: [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). memcpy(disk.type, entry->type, strlen(entry->type)); data/ukui-system-monitor-1.0.3/src/singleProcessNet/conninode.cpp:80:6: [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(local_addr) > 8) data/ukui-system-monitor-1.0.3/src/singleProcessNet/inode2prog.cpp:86:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (int length; (length = read(fd, buf, sizeof(buf))) > 0;) { data/ukui-system-monitor-1.0.3/src/singleProcessNet/inode2prog.cpp:151: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). size_t dirlen = 10 + strlen(pid); data/ukui-system-monitor-1.0.3/src/singleProcessNet/inode2prog.cpp:169:29: [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 fromlen = dirlen + strlen(entry->d_name) + 1; data/ukui-system-monitor-1.0.3/src/singleProcessNet/scanthread.cpp:188:13: [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(100); ANALYSIS SUMMARY: Hits = 70 Lines analyzed = 21262 in approximately 0.57 seconds (37198 lines/second) Physical Source Lines of Code (SLOC) = 13728 Hits@level = [0] 35 [1] 9 [2] 49 [3] 1 [4] 10 [5] 1 Hits@level+ = [0+] 105 [1+] 70 [2+] 61 [3+] 12 [4+] 11 [5+] 1 Hits/KSLOC@level+ = [0+] 7.6486 [1+] 5.09907 [2+] 4.44347 [3+] 0.874126 [4+] 0.801282 [5+] 0.0728438 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.