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/katarakt-0.2/src/beamerwindow.cpp Examining data/katarakt-0.2/src/beamerwindow.h Examining data/katarakt-0.2/src/canvas.cpp Examining data/katarakt-0.2/src/canvas.h Examining data/katarakt-0.2/src/config.cpp Examining data/katarakt-0.2/src/config.h Examining data/katarakt-0.2/src/dbus/dbus.cpp Examining data/katarakt-0.2/src/dbus/dbus.h Examining data/katarakt-0.2/src/dbus/source_correlate.cpp Examining data/katarakt-0.2/src/dbus/source_correlate.h Examining data/katarakt-0.2/src/download.cpp Examining data/katarakt-0.2/src/download.h Examining data/katarakt-0.2/src/gotoline.cpp Examining data/katarakt-0.2/src/gotoline.h Examining data/katarakt-0.2/src/grid.cpp Examining data/katarakt-0.2/src/grid.h Examining data/katarakt-0.2/src/kpage.cpp Examining data/katarakt-0.2/src/kpage.h Examining data/katarakt-0.2/src/layout/gridlayout.cpp Examining data/katarakt-0.2/src/layout/gridlayout.h Examining data/katarakt-0.2/src/layout/layout.cpp Examining data/katarakt-0.2/src/layout/layout.h Examining data/katarakt-0.2/src/layout/presenterlayout.cpp Examining data/katarakt-0.2/src/layout/presenterlayout.h Examining data/katarakt-0.2/src/layout/singlelayout.cpp Examining data/katarakt-0.2/src/layout/singlelayout.h Examining data/katarakt-0.2/src/main.cpp Examining data/katarakt-0.2/src/resourcemanager.cpp Examining data/katarakt-0.2/src/resourcemanager.h Examining data/katarakt-0.2/src/search.cpp Examining data/katarakt-0.2/src/search.h Examining data/katarakt-0.2/src/selection.cpp Examining data/katarakt-0.2/src/selection.h Examining data/katarakt-0.2/src/splitter.cpp Examining data/katarakt-0.2/src/splitter.h Examining data/katarakt-0.2/src/toc.cpp Examining data/katarakt-0.2/src/toc.h Examining data/katarakt-0.2/src/util.cpp Examining data/katarakt-0.2/src/viewer.cpp Examining data/katarakt-0.2/src/viewer.h Examining data/katarakt-0.2/src/worker.cpp Examining data/katarakt-0.2/src/worker.h Examining data/katarakt-0.2/src/util.h FINAL RESULTS: data/katarakt-0.2/src/main.cpp:52:11: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int c = getopt_long(argc, argv, "+up:fq:hs:v", long_options, &option_index); data/katarakt-0.2/src/dbus/source_correlate.cpp:30: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). viewer->open(filename); data/katarakt-0.2/src/download.cpp:46: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). file->open(); data/katarakt-0.2/src/kpage.h:45: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 rotation[3]; data/katarakt-0.2/src/main.cpp:70:54: [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). CFG::get_instance()->set_tmp_value("start_page", atoi(optarg) - 1); data/katarakt-0.2/src/viewer.cpp:203: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). void Viewer::open(QString new_file) { data/katarakt-0.2/src/viewer.cpp:216: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). void Viewer::open() { data/katarakt-0.2/src/viewer.cpp:219:3: [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). open(new_file); data/katarakt-0.2/src/viewer.cpp:593:37: [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). add_action(base, "Keys/open", SLOT(open()), this); data/katarakt-0.2/src/viewer.h:42:7: [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(QString filename); data/katarakt-0.2/src/viewer.h:83:7: [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(); // ask user for filename data/katarakt-0.2/src/resourcemanager.cpp:366:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t bytes = read(inotify_fd, buf, sizeof(i_buf)); data/katarakt-0.2/src/viewer.cpp:529:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(sig_fd[1], &tmp, sizeof(char)) < 0) { ANALYSIS SUMMARY: Hits = 13 Lines analyzed = 6548 in approximately 0.17 seconds (37470 lines/second) Physical Source Lines of Code (SLOC) = 5133 Hits@level = [0] 0 [1] 2 [2] 10 [3] 1 [4] 0 [5] 0 Hits@level+ = [0+] 13 [1+] 13 [2+] 11 [3+] 1 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 2.53263 [1+] 2.53263 [2+] 2.143 [3+] 0.194818 [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.