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/kalarm-20.08.2/src/eventid.cpp Examining data/kalarm-20.08.2/src/sounddlg.h Examining data/kalarm-20.08.2/src/traywindow.cpp Examining data/kalarm-20.08.2/src/emailidcombo.cpp Examining data/kalarm-20.08.2/src/fontcolour.h Examining data/kalarm-20.08.2/src/functions.cpp Examining data/kalarm-20.08.2/src/autostart/autostart.cpp Examining data/kalarm-20.08.2/src/autostart/autostart.h Examining data/kalarm-20.08.2/src/mainwindow.h Examining data/kalarm-20.08.2/src/templatemenuaction.cpp Examining data/kalarm-20.08.2/src/recurrenceedit_p.h Examining data/kalarm-20.08.2/src/akonadicollectionsearch.cpp Examining data/kalarm-20.08.2/src/displaycalendar.cpp Examining data/kalarm-20.08.2/src/startdaytimer.cpp Examining data/kalarm-20.08.2/src/birthdaymodel.cpp Examining data/kalarm-20.08.2/src/wakedlg.h Examining data/kalarm-20.08.2/src/pickfileradio.cpp Examining data/kalarm-20.08.2/src/functions.h Examining data/kalarm-20.08.2/src/deferdlg.h Examining data/kalarm-20.08.2/src/templatelistview.h Examining data/kalarm-20.08.2/src/repetitionbutton.h Examining data/kalarm-20.08.2/src/messagewin.h Examining data/kalarm-20.08.2/src/find.cpp Examining data/kalarm-20.08.2/src/resourcescalendar.h Examining data/kalarm-20.08.2/src/specialactions.h Examining data/kalarm-20.08.2/src/newalarmaction.cpp Examining data/kalarm-20.08.2/src/templatedlg.cpp Examining data/kalarm-20.08.2/src/messagewin_p.h Examining data/kalarm-20.08.2/src/traywindow.h Examining data/kalarm-20.08.2/src/dbushandler.cpp Examining data/kalarm-20.08.2/src/mainwindowbase.h Examining data/kalarm-20.08.2/src/timeselector.h Examining data/kalarm-20.08.2/src/prefdlg.cpp Examining data/kalarm-20.08.2/src/eventlistview.cpp Examining data/kalarm-20.08.2/src/resourcescalendar.cpp Examining data/kalarm-20.08.2/src/recurrenceedit.h Examining data/kalarm-20.08.2/src/migratekde4files.h Examining data/kalarm-20.08.2/src/emailidcombo.h Examining data/kalarm-20.08.2/src/kamail.cpp Examining data/kalarm-20.08.2/src/preferences.cpp Examining data/kalarm-20.08.2/src/resourceselector.cpp Examining data/kalarm-20.08.2/src/mainwindow.cpp Examining data/kalarm-20.08.2/src/lib/timeedit.h Examining data/kalarm-20.08.2/src/lib/filedialog.h Examining data/kalarm-20.08.2/src/lib/combobox.h Examining data/kalarm-20.08.2/src/lib/desktop.h Examining data/kalarm-20.08.2/src/lib/spinbox.cpp Examining data/kalarm-20.08.2/src/lib/colourbutton.cpp Examining data/kalarm-20.08.2/src/lib/spinbox2.cpp Examining data/kalarm-20.08.2/src/lib/groupbox.cpp Examining data/kalarm-20.08.2/src/lib/desktop.cpp Examining data/kalarm-20.08.2/src/lib/synchtimer.h Examining data/kalarm-20.08.2/src/lib/combobox.cpp Examining data/kalarm-20.08.2/src/lib/locale.cpp Examining data/kalarm-20.08.2/src/lib/pushbutton.h Examining data/kalarm-20.08.2/src/lib/lineedit.cpp Examining data/kalarm-20.08.2/src/lib/dragdrop.cpp Examining data/kalarm-20.08.2/src/lib/messagebox.cpp Examining data/kalarm-20.08.2/src/lib/radiobutton.cpp Examining data/kalarm-20.08.2/src/lib/timeperiod.h Examining data/kalarm-20.08.2/src/lib/timespinbox.h Examining data/kalarm-20.08.2/src/lib/label.cpp Examining data/kalarm-20.08.2/src/lib/checkbox.h Examining data/kalarm-20.08.2/src/lib/packedlayout.h Examining data/kalarm-20.08.2/src/lib/autoqpointer.h Examining data/kalarm-20.08.2/src/lib/spinbox2.h Examining data/kalarm-20.08.2/src/lib/timespinbox.cpp Examining data/kalarm-20.08.2/src/lib/spinbox2_p.h Examining data/kalarm-20.08.2/src/lib/groupbox.h Examining data/kalarm-20.08.2/src/lib/checkbox.cpp Examining data/kalarm-20.08.2/src/lib/config.h Examining data/kalarm-20.08.2/src/lib/dragdrop.h Examining data/kalarm-20.08.2/src/lib/shellprocess.h Examining data/kalarm-20.08.2/src/lib/slider.cpp Examining data/kalarm-20.08.2/src/lib/timeperiod.cpp Examining data/kalarm-20.08.2/src/lib/timeedit.cpp Examining data/kalarm-20.08.2/src/lib/timezonecombo.cpp Examining data/kalarm-20.08.2/src/lib/file.h Examining data/kalarm-20.08.2/src/lib/label.h Examining data/kalarm-20.08.2/src/lib/spinbox.h Examining data/kalarm-20.08.2/src/lib/messagebox.h Examining data/kalarm-20.08.2/src/lib/synchtimer.cpp Examining data/kalarm-20.08.2/src/lib/stackedwidgets.cpp Examining data/kalarm-20.08.2/src/lib/buttongroup.h Examining data/kalarm-20.08.2/src/lib/shellprocess.cpp Examining data/kalarm-20.08.2/src/lib/filedialog.cpp Examining data/kalarm-20.08.2/src/lib/colourbutton.h Examining data/kalarm-20.08.2/src/lib/pushbutton.cpp Examining data/kalarm-20.08.2/src/lib/file.cpp Examining data/kalarm-20.08.2/src/lib/packedlayout.cpp Examining data/kalarm-20.08.2/src/lib/buttongroup.cpp Examining data/kalarm-20.08.2/src/lib/slider.h Examining data/kalarm-20.08.2/src/lib/timezonecombo.h Examining data/kalarm-20.08.2/src/lib/locale.h Examining data/kalarm-20.08.2/src/lib/radiobutton.h Examining data/kalarm-20.08.2/src/lib/lineedit.h Examining data/kalarm-20.08.2/src/lib/stackedwidgets.h Examining data/kalarm-20.08.2/src/lib/config.cpp Examining data/kalarm-20.08.2/src/lib/autodeletelist.h Examining data/kalarm-20.08.2/src/resourceselector.h Examining data/kalarm-20.08.2/src/fontcolourbutton.h Examining data/kalarm-20.08.2/src/alarmlistview.h Examining data/kalarm-20.08.2/src/templatepickdlg.cpp Examining data/kalarm-20.08.2/src/latecancel.h Examining data/kalarm-20.08.2/src/alarmlistview.cpp Examining data/kalarm-20.08.2/src/editdlg_p.h Examining data/kalarm-20.08.2/src/templatedlg.h Examining data/kalarm-20.08.2/src/wakedlg.cpp Examining data/kalarm-20.08.2/src/alarmtimewidget.cpp Examining data/kalarm-20.08.2/src/sounddlg.cpp Examining data/kalarm-20.08.2/src/migratekde4files.cpp Examining data/kalarm-20.08.2/src/birthdaydlg.cpp Examining data/kalarm-20.08.2/src/kalarmapp.cpp Examining data/kalarm-20.08.2/src/akonadicollectionsearch.h Examining data/kalarm-20.08.2/src/commandoptions.h Examining data/kalarm-20.08.2/src/timeselector.cpp Examining data/kalarm-20.08.2/src/fontcolourbutton.cpp Examining data/kalarm-20.08.2/src/templatelistview.cpp Examining data/kalarm-20.08.2/src/messagewin.cpp Examining data/kalarm-20.08.2/src/main.cpp Examining data/kalarm-20.08.2/src/commandoptions.cpp Examining data/kalarm-20.08.2/src/eventid.h Examining data/kalarm-20.08.2/src/mainwindowbase.cpp Examining data/kalarm-20.08.2/src/rtcwakeaction.h Examining data/kalarm-20.08.2/src/reminder.cpp Examining data/kalarm-20.08.2/src/preferences.h Examining data/kalarm-20.08.2/src/dbushandler.h Examining data/kalarm-20.08.2/src/find.h Examining data/kalarm-20.08.2/src/recurrenceedit.cpp Examining data/kalarm-20.08.2/src/undo.h Examining data/kalarm-20.08.2/src/soundpicker.cpp Examining data/kalarm-20.08.2/src/newalarmaction.h Examining data/kalarm-20.08.2/src/kalarm.h Examining data/kalarm-20.08.2/src/alarmlistdelegate.cpp Examining data/kalarm-20.08.2/src/prefdlg.h Examining data/kalarm-20.08.2/src/editdlgtypes.h Examining data/kalarm-20.08.2/src/editdlg.h Examining data/kalarm-20.08.2/src/editdlgtypes.cpp Examining data/kalarm-20.08.2/src/soundpicker.h Examining data/kalarm-20.08.2/src/templatepickdlg.h Examining data/kalarm-20.08.2/src/latecancel.cpp Examining data/kalarm-20.08.2/src/templatemenuaction.h Examining data/kalarm-20.08.2/src/alarmlistdelegate.h Examining data/kalarm-20.08.2/src/repetitionbutton.cpp Examining data/kalarm-20.08.2/src/resources/dirresourceimportdialog.h Examining data/kalarm-20.08.2/src/resources/resourcecreator.h Examining data/kalarm-20.08.2/src/resources/fileresourcecalendarupdater.h Examining data/kalarm-20.08.2/src/resources/resourcemodel.h Examining data/kalarm-20.08.2/src/resources/resourcedatamodelbase.h Examining data/kalarm-20.08.2/src/resources/dirresourceimportdialog.cpp Examining data/kalarm-20.08.2/src/resources/akonadidatamodel.h Examining data/kalarm-20.08.2/src/resources/resourcemodel.cpp Examining data/kalarm-20.08.2/src/resources/fileresourcedatamodel.h Examining data/kalarm-20.08.2/src/resources/calendarupdater.cpp Examining data/kalarm-20.08.2/src/resources/resourceselectdialog.h Examining data/kalarm-20.08.2/src/resources/akonadicalendarupdater.cpp Examining data/kalarm-20.08.2/src/resources/resourcetype.cpp Examining data/kalarm-20.08.2/src/resources/akonadiresourcecreator.cpp Examining data/kalarm-20.08.2/src/resources/resources.h Examining data/kalarm-20.08.2/src/resources/datamodel.cpp Examining data/kalarm-20.08.2/src/resources/fileresourcemigrator.cpp Examining data/kalarm-20.08.2/src/resources/akonadidatamodel.cpp Examining data/kalarm-20.08.2/src/resources/fileresourceconfigmanager.cpp Examining data/kalarm-20.08.2/src/resources/singlefileresource.cpp Examining data/kalarm-20.08.2/src/resources/resource.cpp Examining data/kalarm-20.08.2/src/resources/akonadiresource.cpp Examining data/kalarm-20.08.2/src/resources/dirresourceimportdialog_p.h Examining data/kalarm-20.08.2/src/resources/fileresourcesettings.h Examining data/kalarm-20.08.2/src/resources/fileresource.cpp Examining data/kalarm-20.08.2/src/resources/singlefileresource.h Examining data/kalarm-20.08.2/src/resources/resourcedatamodelbase.cpp Examining data/kalarm-20.08.2/src/resources/calendarupdater.h Examining data/kalarm-20.08.2/src/resources/fileresource.h Examining data/kalarm-20.08.2/src/resources/fileresourcemigrator.h Examining data/kalarm-20.08.2/src/resources/akonadiresourcecreator.h Examining data/kalarm-20.08.2/src/resources/fileresourcecreator.h Examining data/kalarm-20.08.2/src/resources/akonadiresource.h Examining data/kalarm-20.08.2/src/resources/akonadicalendarupdater.h Examining data/kalarm-20.08.2/src/resources/eventmodel.h Examining data/kalarm-20.08.2/src/resources/singlefileresourceconfigdialog.h Examining data/kalarm-20.08.2/src/resources/fileresourcesettings.cpp Examining data/kalarm-20.08.2/src/resources/resource.h Examining data/kalarm-20.08.2/src/resources/fileresourcedatamodel.cpp Examining data/kalarm-20.08.2/src/resources/resourcetype.h Examining data/kalarm-20.08.2/src/resources/fileresourcecalendarupdater.cpp Examining data/kalarm-20.08.2/src/resources/calendarfunctions.cpp Examining data/kalarm-20.08.2/src/resources/fileresourcecreator.cpp Examining data/kalarm-20.08.2/src/resources/singlefileresourceconfigdialog.cpp Examining data/kalarm-20.08.2/src/resources/fileresourceconfigmanager.h Examining data/kalarm-20.08.2/src/resources/datamodel.h Examining data/kalarm-20.08.2/src/resources/akonadiresourcemigrator.h Examining data/kalarm-20.08.2/src/resources/eventmodel.cpp Examining data/kalarm-20.08.2/src/resources/resourceselectdialog.cpp Examining data/kalarm-20.08.2/src/resources/resources.cpp Examining data/kalarm-20.08.2/src/resources/calendarfunctions.h Examining data/kalarm-20.08.2/src/resources/akonadiresourcemigrator.cpp Examining data/kalarm-20.08.2/src/resources/resourcecreator.cpp Examining data/kalarm-20.08.2/src/eventlistview.h Examining data/kalarm-20.08.2/src/fontcolour.cpp Examining data/kalarm-20.08.2/src/startdaytimer.h Examining data/kalarm-20.08.2/src/kamail.h Examining data/kalarm-20.08.2/src/pickfileradio.h Examining data/kalarm-20.08.2/src/displaycalendar.h Examining data/kalarm-20.08.2/src/functions_p.h Examining data/kalarm-20.08.2/src/kalarmiface.h Examining data/kalarm-20.08.2/src/editdlg.cpp Examining data/kalarm-20.08.2/src/kalarmapp.h Examining data/kalarm-20.08.2/src/reminder.h Examining data/kalarm-20.08.2/src/prefdlg_p.h Examining data/kalarm-20.08.2/src/deferdlg.cpp Examining data/kalarm-20.08.2/src/undo.cpp Examining data/kalarm-20.08.2/src/birthdaymodel.h Examining data/kalarm-20.08.2/src/specialactions.cpp Examining data/kalarm-20.08.2/src/birthdaydlg.h Examining data/kalarm-20.08.2/src/rtcwakeaction.cpp Examining data/kalarm-20.08.2/src/alarmtimewidget.h FINAL RESULTS: data/kalarm-20.08.2/src/functions.cpp:1752:5: [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(timeStr, timeString.left(i >= 0 ? i : MAX_DT_LEN).constData()); data/kalarm-20.08.2/src/kamail.cpp:203:22: [4] (shell) popen: 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. FILE* fd = ::popen(command.toLocal8Bit().constData(), "w"); data/kalarm-20.08.2/src/lib/shellprocess.cpp:198:18: [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. && !access(envshell.data(), X_OK)) // and it's executable data/kalarm-20.08.2/src/rtcwakeaction.cpp:45:16: [4] (shell) popen: 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. FILE* wh = popen("whereis -b rtcwake", "r"); data/kalarm-20.08.2/src/displaycalendar.cpp:83:23: [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 DisplayCalendar::open() data/kalarm-20.08.2/src/displaycalendar.h:50: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). static bool open(); data/kalarm-20.08.2/src/functions.cpp:603: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). if (DisplayCalendar::open()) data/kalarm-20.08.2/src/functions.cpp:994: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). qFile.open(QIODevice::ReadOnly); data/kalarm-20.08.2/src/functions.cpp:1751: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 timeStr[MAX_DT_LEN+1]; data/kalarm-20.08.2/src/kalarmapp.cpp:2306:13: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (tmpfile.isEmpty()) data/kalarm-20.08.2/src/kalarmapp.cpp:2311:31: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). return doShellCommand(tmpfile, event, &alarm, (flags | ProcData::TEMP_FILE), receiver, slotOutput, methodExited); data/kalarm-20.08.2/src/kalarmapp.cpp:2387:25: [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 (logfile.open(QIODevice::Append | QIODevice::Text)) data/kalarm-20.08.2/src/kalarmapp.cpp:2485: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). if (!tmpFile.open()) data/kalarm-20.08.2/src/kalarmapp.cpp:2666: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). DisplayCalendar::open(); data/kalarm-20.08.2/src/kamail.cpp:438:24: [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/kalarm-20.08.2/src/messagewin.cpp:427:44: [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). mTempFile->open(); data/kalarm-20.08.2/src/messagewin.cpp:1234:30: [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 (DisplayCalendar::open()) data/kalarm-20.08.2/src/preferences.cpp:204: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 (!file.open(QIODevice::ReadOnly)) data/kalarm-20.08.2/src/preferences.cpp:252: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 (!file.open(QIODevice::WriteOnly)) data/kalarm-20.08.2/src/resources/resourcedatamodelbase.cpp:790: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 minutes[3] = "00"; data/kalarm-20.08.2/src/resources/resourcedatamodelbase.cpp:797: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 hours[3] = "00"; data/kalarm-20.08.2/src/resources/singlefileresource.cpp:239: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 (!f.open(QIODevice::WriteOnly) || !f.resize(0)) data/kalarm-20.08.2/src/resources/singlefileresource.cpp:658: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). if (file.open(QIODevice::ReadOnly)) data/kalarm-20.08.2/src/rtcwakeaction.cpp:48: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 buff[512] = { '\0' }; data/kalarm-20.08.2/src/traywindow.cpp:377:17: [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 minutes[3] = "00"; data/kalarm-20.08.2/src/resources/singlefileresource.cpp:664:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). hash.addData(file.read(blockSize)); ANALYSIS SUMMARY: Hits = 26 Lines analyzed = 60615 in approximately 1.73 seconds (35071 lines/second) Physical Source Lines of Code (SLOC) = 40273 Hits@level = [0] 0 [1] 1 [2] 21 [3] 0 [4] 4 [5] 0 Hits@level+ = [0+] 26 [1+] 26 [2+] 25 [3+] 4 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 0.645594 [1+] 0.645594 [2+] 0.620763 [3+] 0.0993221 [4+] 0.0993221 [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.