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/kde-cli-tools-5.19.5/kstart/kstart.cpp Examining data/kde-cli-tools-5.19.5/kstart/kstart.h Examining data/kde-cli-tools-5.19.5/keditfiletype/kservicelistwidget.h Examining data/kde-cli-tools-5.19.5/keditfiletype/typeslistitem.cpp Examining data/kde-cli-tools-5.19.5/keditfiletype/filetypesview.cpp Examining data/kde-cli-tools-5.19.5/keditfiletype/mimetypedata.h Examining data/kde-cli-tools-5.19.5/keditfiletype/mimetypewriter.h Examining data/kde-cli-tools-5.19.5/keditfiletype/kserviceselectdlg.h Examining data/kde-cli-tools-5.19.5/keditfiletype/filegroupdetails.h Examining data/kde-cli-tools-5.19.5/keditfiletype/newtypedlg.h Examining data/kde-cli-tools-5.19.5/keditfiletype/kservicelistwidget.cpp Examining data/kde-cli-tools-5.19.5/keditfiletype/filetypedetails.cpp Examining data/kde-cli-tools-5.19.5/keditfiletype/kserviceselectdlg.cpp Examining data/kde-cli-tools-5.19.5/keditfiletype/mimetypedata.cpp Examining data/kde-cli-tools-5.19.5/keditfiletype/keditfiletype.cpp Examining data/kde-cli-tools-5.19.5/keditfiletype/filetypedetails.h Examining data/kde-cli-tools-5.19.5/keditfiletype/typeslistitem.h Examining data/kde-cli-tools-5.19.5/keditfiletype/newtypedlg.cpp Examining data/kde-cli-tools-5.19.5/keditfiletype/filegroupdetails.cpp Examining data/kde-cli-tools-5.19.5/keditfiletype/tests/filetypestest.cpp Examining data/kde-cli-tools-5.19.5/keditfiletype/mimetypewriter.cpp Examining data/kde-cli-tools-5.19.5/keditfiletype/filetypesview.h Examining data/kde-cli-tools-5.19.5/keditfiletype/keditfiletype.h Examining data/kde-cli-tools-5.19.5/ksvgtopng/ksvgtopng.cpp Examining data/kde-cli-tools-5.19.5/kbroadcastnotification/main.cpp Examining data/kde-cli-tools-5.19.5/kdesu/sudlg.h Examining data/kde-cli-tools-5.19.5/kdesu/kdesu.cpp Examining data/kde-cli-tools-5.19.5/kdesu/sudlg.cpp Examining data/kde-cli-tools-5.19.5/kioclient/kioclient.cpp Examining data/kde-cli-tools-5.19.5/kioclient/urlinfo.h Examining data/kde-cli-tools-5.19.5/kioclient/kioclient.h Examining data/kde-cli-tools-5.19.5/kcmshell/main.h Examining data/kde-cli-tools-5.19.5/kcmshell/main.cpp Examining data/kde-cli-tools-5.19.5/kmimetypefinder/kmimetypefinder.cpp Examining data/kde-cli-tools-5.19.5/ktraderclient/ktraderclient.cpp FINAL RESULTS: data/kde-cli-tools-5.19.5/kdesu/kdesu.cpp:282:22: [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. int result = system(command.constData()); data/kde-cli-tools-5.19.5/kdesu/kdesu.cpp:455:22: [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. int result = system(command.constData()); data/kde-cli-tools-5.19.5/kdesu/kdesu.cpp:210:26: [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. char *cur_user = getenv("USER"); data/kde-cli-tools-5.19.5/kdesu/kdesu.cpp:212:24: [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. cur_user = getenv("LOGNAME"); data/kde-cli-tools-5.19.5/kdesu/kdesu.cpp:67: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)) data/kde-cli-tools-5.19.5/keditfiletype/mimetypedata.cpp:114: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). if (!qfile.open(QFile::ReadOnly)) data/kde-cli-tools-5.19.5/keditfiletype/mimetypewriter.cpp:82:22: [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 (!packageFile.open(QIODevice::WriteOnly)) { data/kde-cli-tools-5.19.5/kmimetypefinder/kmimetypefinder.cpp:60: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). qstdin.open(stdin, QIODevice::ReadOnly); data/kde-cli-tools-5.19.5/ksvgtopng/ksvgtopng.cpp:26:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int width = atoi(argv[1]); data/kde-cli-tools-5.19.5/ksvgtopng/ksvgtopng.cpp:27:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int height = atoi(argv[2]); ANALYSIS SUMMARY: Hits = 10 Lines analyzed = 6346 in approximately 0.26 seconds (24568 lines/second) Physical Source Lines of Code (SLOC) = 4319 Hits@level = [0] 11 [1] 0 [2] 6 [3] 2 [4] 2 [5] 0 Hits@level+ = [0+] 21 [1+] 10 [2+] 10 [3+] 4 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 4.86224 [1+] 2.31535 [2+] 2.31535 [3+] 0.92614 [4+] 0.46307 [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.