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/ballz-1.0.4/src/waterstartile.hpp Examining data/ballz-1.0.4/src/sewersbackground.cpp Examining data/ballz-1.0.4/src/doortile.hpp Examining data/ballz-1.0.4/src/floorspiketile.cpp Examining data/ballz-1.0.4/src/firetile.hpp Examining data/ballz-1.0.4/src/main.cpp Examining data/ballz-1.0.4/src/startile.hpp Examining data/ballz-1.0.4/src/unused.hpp Examining data/ballz-1.0.4/src/levelhandler.cpp Examining data/ballz-1.0.4/src/tilemap.hpp Examining data/ballz-1.0.4/src/prisonbackground.hpp Examining data/ballz-1.0.4/src/hostiletile.cpp Examining data/ballz-1.0.4/src/waterspikestile.hpp Examining data/ballz-1.0.4/src/sewersbackground.hpp Examining data/ballz-1.0.4/src/goaltile.hpp Examining data/ballz-1.0.4/src/waterstartile.cpp Examining data/ballz-1.0.4/src/game.hpp Examining data/ballz-1.0.4/src/levelhandler.hpp Examining data/ballz-1.0.4/src/game.cpp Examining data/ballz-1.0.4/src/fading.hpp Examining data/ballz-1.0.4/src/blocktile.cpp Examining data/ballz-1.0.4/src/music.cpp Examining data/ballz-1.0.4/src/resourcehandler.cpp Examining data/ballz-1.0.4/src/animatedtile.hpp Examining data/ballz-1.0.4/src/doorbuttontile.hpp Examining data/ballz-1.0.4/src/startile.cpp Examining data/ballz-1.0.4/src/tilemap.cpp Examining data/ballz-1.0.4/src/portaltile.hpp Examining data/ballz-1.0.4/src/fading.cpp Examining data/ballz-1.0.4/src/resourcehandler.hpp Examining data/ballz-1.0.4/src/watertile.hpp Examining data/ballz-1.0.4/src/firetile.cpp Examining data/ballz-1.0.4/src/goaltile.cpp Examining data/ballz-1.0.4/src/os.hpp Examining data/ballz-1.0.4/src/level.hpp Examining data/ballz-1.0.4/src/doortile.cpp Examining data/ballz-1.0.4/src/music.hpp Examining data/ballz-1.0.4/src/animatedtile.cpp Examining data/ballz-1.0.4/src/watertile.cpp Examining data/ballz-1.0.4/src/portaltile.cpp Examining data/ballz-1.0.4/src/timer.cpp Examining data/ballz-1.0.4/src/voidtile.cpp Examining data/ballz-1.0.4/src/desertbackground.hpp Examining data/ballz-1.0.4/src/prisonbackground.cpp Examining data/ballz-1.0.4/src/blocktile.hpp Examining data/ballz-1.0.4/src/ball.cpp Examining data/ballz-1.0.4/src/tile.hpp Examining data/ballz-1.0.4/src/voidtile.hpp Examining data/ballz-1.0.4/src/timer.hpp Examining data/ballz-1.0.4/src/waterspikestile.cpp Examining data/ballz-1.0.4/src/background.hpp Examining data/ballz-1.0.4/src/breakingtile.cpp Examining data/ballz-1.0.4/src/floorspikestile.hpp Examining data/ballz-1.0.4/src/levelmodel.hpp Examining data/ballz-1.0.4/src/gui/datawriter.cpp Examining data/ballz-1.0.4/src/gui/ballzscrollarea.hpp Examining data/ballz-1.0.4/src/gui/levelselector.cpp Examining data/ballz-1.0.4/src/gui/ballzlistbox.hpp Examining data/ballz-1.0.4/src/gui/ballzlistbox.cpp Examining data/ballz-1.0.4/src/gui/levelselector.hpp Examining data/ballz-1.0.4/src/gui/ballzscrollarea.cpp Examining data/ballz-1.0.4/src/gui/datawriter.hpp Examining data/ballz-1.0.4/src/desertbackground.cpp Examining data/ballz-1.0.4/src/level.cpp Examining data/ballz-1.0.4/src/hostiletile.hpp Examining data/ballz-1.0.4/src/doorbuttontile.cpp Examining data/ballz-1.0.4/src/ball.hpp Examining data/ballz-1.0.4/src/breakingtile.hpp FINAL RESULTS: data/ballz-1.0.4/src/levelhandler.cpp:117:32: [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. saveFilename = std::string(getenv("HOME")) + "/.ballz_saves.txt"; data/ballz-1.0.4/src/levelhandler.cpp:154:32: [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. saveFilename = std::string(getenv("HOME")) + "/.ballz_saves.txt"; data/ballz-1.0.4/src/level.cpp:124: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). file.open(realFilename.c_str(), std::ios::in); data/ballz-1.0.4/src/levelhandler.cpp:77: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). levelsFile.open(BALLZ_DATA_PREFIX"/levels.txt", std::ios::in); data/ballz-1.0.4/src/levelhandler.cpp:128: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). savesFile.open(saveFilename.c_str(), std::ios::out); data/ballz-1.0.4/src/levelhandler.cpp:157: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). file.open(saveFilename.c_str(), std::ios::out); data/ballz-1.0.4/src/levelhandler.cpp:184: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). file.open(realFilename.c_str(), std::ios::in); ANALYSIS SUMMARY: Hits = 7 Lines analyzed = 6485 in approximately 0.22 seconds (30116 lines/second) Physical Source Lines of Code (SLOC) = 3626 Hits@level = [0] 0 [1] 0 [2] 5 [3] 2 [4] 0 [5] 0 Hits@level+ = [0+] 7 [1+] 7 [2+] 7 [3+] 2 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 1.9305 [1+] 1.9305 [2+] 1.9305 [3+] 0.551572 [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.