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/blocks-of-the-undead-1.0/Oodle/stdafx.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CAnimation.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CAnimation.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CBarndoorsTransition.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CBarndoorsTransition.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CBlackEffect.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CBlackEffect.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CBounds.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CBounds.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CColor.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CColor.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CEffect.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CEffect.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CEffectSurface.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CEventData.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CExplodeEffect.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CExplodeEffect.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CFadeEvent.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CGfxPrimitives.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CFadeToLayerEffect.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CGfxPrimitives.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CGotoAnimChangeEvent.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CGotoAnimChangeEvent.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CGotoEvent.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CGotoEvent.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CImgLoader.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CImgLoader.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CInput.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CMenu.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CMenu.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CMenuButton.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CMenuButton.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CMoveEvent.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CMusic.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CParticle.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CParticle.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CPauseEvent.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CPixel.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CPixel.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CPixelExplodeEffect.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CPixelExplodeEffect.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CPlayAnimationEvent.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CPlaySoundEvent.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CPoint.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CRandomVelEvent.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CRandomVelEvent.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CRect.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CRect.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CRemoveSeqEvent.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CRemoveSeqEvent.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CResizeEvent.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CResizeEvent.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CReverseBlackEffect.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CReverseBlackEffect.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CRotateEffect.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CRotateEffect.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CSDLGame.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CSDLGame.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CScript.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CSequencedEvent.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CSequencedEvent.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CSimpleGame.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CSound.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CSprite.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CSprite.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CSpriteExplodeEffect.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CSpriteExplodeEffect.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CStatusDisplay.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CStatusDisplay.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CSurface.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CSurface.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CSurfaceData.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CSyncBlockerEvent.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CText.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CTextManager.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CTextManager.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CTimedEvent.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CTimer.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CTimer.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CTransition.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CVector.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CVector.h Examining data/blocks-of-the-undead-1.0/Oodle/src/enums.h Examining data/blocks-of-the-undead-1.0/Oodle/src/exceptions.h Examining data/blocks-of-the-undead-1.0/Oodle/src/oodle.h Examining data/blocks-of-the-undead-1.0/Oodle/src/resource.h Examining data/blocks-of-the-undead-1.0/Oodle/src/utils.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/utils.h Examining data/blocks-of-the-undead-1.0/Oodle/src/CSound.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CSoundSystem.cpp Examining data/blocks-of-the-undead-1.0/Oodle/src/CSoundSystem.h Examining data/blocks-of-the-undead-1.0/TetrisAttack/resource.h Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CApplyGravityEvent.cpp Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CApplyGravityEvent.h Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CBlock.cpp Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CBlock.h Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CBlockDeathEffect.h Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CBlockLoc.cpp Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CBLockLoc.h Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CBLockSet.cpp Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CBlockSet.h Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CCursor.cpp Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CCursor.h Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CFieldSprite.cpp Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CFieldSprite.h Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CLoadLvlEvent.h Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CPauseIfFirstDropEvent.h Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CPlayingField.cpp Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CPlayingField.h Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CSoundPlayer.h Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CRemoveBlockEvent.cpp Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CRemoveBlockEvent.h Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CSoundPlayer.cpp Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CTetrisTheme.cpp Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CTetrisTheme.h Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/main.cpp Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/tetris.h Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/util.cpp Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/util.h Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CTetrisGame.cpp Examining data/blocks-of-the-undead-1.0/TetrisAttack/src/CTetrisGame.h Examining data/blocks-of-the-undead-1.0/AnimView/src/main.cpp Examining data/blocks-of-the-undead-1.0/PuzzleEdit/src/main.cpp FINAL RESULTS: data/blocks-of-the-undead-1.0/Oodle/src/utils.cpp:33:19: [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. homedir = getenv("HOME"); data/blocks-of-the-undead-1.0/TetrisAttack/src/CTetrisGame.cpp:39:25: [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 *homedir = getenv("HOME"); data/blocks-of-the-undead-1.0/TetrisAttack/src/CTetrisGame.cpp:443:41: [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 *homedir = getenv("HOME"); data/blocks-of-the-undead-1.0/TetrisAttack/src/main.cpp:5:2: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/blocks-of-the-undead-1.0/Oodle/src/utils.cpp:46: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 tmpbuf[128]; data/blocks-of-the-undead-1.0/TetrisAttack/src/CTetrisGame.cpp:163:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(200); data/blocks-of-the-undead-1.0/TetrisAttack/src/CTetrisGame.cpp:286:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(3000); ANALYSIS SUMMARY: Hits = 7 Lines analyzed = 7911 in approximately 0.24 seconds (32298 lines/second) Physical Source Lines of Code (SLOC) = 6232 Hits@level = [0] 0 [1] 2 [2] 1 [3] 4 [4] 0 [5] 0 Hits@level+ = [0+] 7 [1+] 7 [2+] 5 [3+] 4 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 1.12323 [1+] 1.12323 [2+] 0.802311 [3+] 0.641849 [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.