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/audiocd-kio-20.08.1/audiocd.h Examining data/audiocd-kio-20.08.1/audiocd.cpp Examining data/audiocd-kio-20.08.1/kcmaudiocd/kcmaudiocd.h Examining data/audiocd-kio-20.08.1/kcmaudiocd/kcmaudiocd.cpp Examining data/audiocd-kio-20.08.1/plugins/opus/encoderopus.h Examining data/audiocd-kio-20.08.1/plugins/opus/encoderopus.cpp Examining data/audiocd-kio-20.08.1/plugins/audiocdencoder.cpp Examining data/audiocd-kio-20.08.1/plugins/vorbis/encodervorbis.h Examining data/audiocd-kio-20.08.1/plugins/vorbis/encodervorbis.cpp Examining data/audiocd-kio-20.08.1/plugins/audiocdencoder.h Examining data/audiocd-kio-20.08.1/plugins/flac/encoderflac.cpp Examining data/audiocd-kio-20.08.1/plugins/flac/encoderflac.h Examining data/audiocd-kio-20.08.1/plugins/lame/encoderlame.h Examining data/audiocd-kio-20.08.1/plugins/lame/encoderlame.cpp Examining data/audiocd-kio-20.08.1/plugins/wav/encoderwav.cpp Examining data/audiocd-kio-20.08.1/plugins/wav/encoderwav.h Examining data/audiocd-kio-20.08.1/plugins/wav/encodercda.cpp Examining data/audiocd-kio-20.08.1/plugins/wav/encodercda.h FINAL RESULTS: data/audiocd-kio-20.08.1/plugins/lame/encoderlame.cpp:236: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). d->tempFile->open(); data/audiocd-kio-20.08.1/plugins/lame/encoderlame.cpp:320: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 ( file.open( QIODevice::ReadOnly ) ) { data/audiocd-kio-20.08.1/plugins/lame/encoderlame.cpp:321: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 data[1024]; data/audiocd-kio-20.08.1/plugins/opus/encoderopus.cpp:131: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). d->tempFile->open(); data/audiocd-kio-20.08.1/plugins/opus/encoderopus.cpp:206: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 ( file.open( QIODevice::ReadOnly ) ) { data/audiocd-kio-20.08.1/plugins/opus/encoderopus.cpp:207: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 data[1024]; data/audiocd-kio-20.08.1/audiocd.cpp:256:8: [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(drive->dev->device_path) > 0 ) data/audiocd-kio-20.08.1/audiocd.cpp:567:27: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). const mode_t _umask = ::umask(0); data/audiocd-kio-20.08.1/audiocd.cpp:568:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). ::umask(_umask); data/audiocd-kio-20.08.1/audiocd.cpp:588:28: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). const mode_t _umask = ::umask(0); data/audiocd-kio-20.08.1/audiocd.cpp:589:6: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). ::umask(_umask); data/audiocd-kio-20.08.1/audiocd.cpp:603:29: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). const mode_t _umask = ::umask(0); data/audiocd-kio-20.08.1/audiocd.cpp:604:7: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). ::umask(_umask); data/audiocd-kio-20.08.1/audiocd.cpp:642:26: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). const mode_t _umask = ::umask(0); data/audiocd-kio-20.08.1/audiocd.cpp:643:4: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). ::umask(_umask); data/audiocd-kio-20.08.1/audiocd.cpp:971:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int encoderProcessed = encoder->read(buf, CD_FRAMESAMPLES); data/audiocd-kio-20.08.1/plugins/audiocdencoder.h:113:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual long read(qint16 * buf, int frames) = 0; data/audiocd-kio-20.08.1/plugins/flac/encoderflac.cpp:180:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). long EncoderFLAC::read(qint16 * buf, int frames) data/audiocd-kio-20.08.1/plugins/flac/encoderflac.h:56:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual long read(qint16 * buf, int frames) override; data/audiocd-kio-20.08.1/plugins/lame/encoderlame.cpp:291:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). long EncoderLame::read(qint16 *buf, int frames){ data/audiocd-kio-20.08.1/plugins/lame/encoderlame.cpp:323:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint read = file.read(data, 1024); data/audiocd-kio-20.08.1/plugins/lame/encoderlame.cpp:324:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). QByteArray output(data, read); data/audiocd-kio-20.08.1/plugins/lame/encoderlame.h:56:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual long read(qint16 * buf, int frames) override; data/audiocd-kio-20.08.1/plugins/opus/encoderopus.cpp:177:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). long EncoderOpus::read(qint16 *buf, int frames){ data/audiocd-kio-20.08.1/plugins/opus/encoderopus.cpp:209:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uint read = file.read(data, 1024); data/audiocd-kio-20.08.1/plugins/opus/encoderopus.cpp:210:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). QByteArray output(data, read); data/audiocd-kio-20.08.1/plugins/opus/encoderopus.h:57:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual long read(qint16 * buf, int frames) override; data/audiocd-kio-20.08.1/plugins/vorbis/encodervorbis.cpp:241:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). long EncoderVorbis::read(qint16 * buf, int frames){ data/audiocd-kio-20.08.1/plugins/vorbis/encodervorbis.h:59:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual long read(qint16 * buf, int frames) override; data/audiocd-kio-20.08.1/plugins/wav/encodercda.cpp:49:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). long EncoderCda::read(qint16 * buf, int frames){ data/audiocd-kio-20.08.1/plugins/wav/encodercda.h:51:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual long read(qint16 * buf, int frames) override; ANALYSIS SUMMARY: Hits = 31 Lines analyzed = 3715 in approximately 0.14 seconds (25853 lines/second) Physical Source Lines of Code (SLOC) = 2413 Hits@level = [0] 1 [1] 25 [2] 6 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 32 [1+] 31 [2+] 6 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 13.2615 [1+] 12.8471 [2+] 2.48653 [3+] 0 [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.