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/bastet-0.43/BastetBlockChooser.cpp
Examining data/bastet-0.43/BastetBlockChooser.hpp
Examining data/bastet-0.43/Block.cpp
Examining data/bastet-0.43/Block.hpp
Examining data/bastet-0.43/BlockChooser.cpp
Examining data/bastet-0.43/BlockChooser.hpp
Examining data/bastet-0.43/BlockPosition.cpp
Examining data/bastet-0.43/BlockPosition.hpp
Examining data/bastet-0.43/Config.hpp
Examining data/bastet-0.43/Ui.cpp
Examining data/bastet-0.43/Ui.hpp
Examining data/bastet-0.43/Well.cpp
Examining data/bastet-0.43/Well.hpp
Examining data/bastet-0.43/main.cpp
Examining data/bastet-0.43/Config.cpp

FINAL RESULTS:

data/bastet-0.43/BastetBlockChooser.cpp:72:12:  [3] (random) random:
  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.
    switch(random()%4){
data/bastet-0.43/BastetBlockChooser.cpp:83:27:  [3] (random) random:
  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.
    q.push_back(BlockType(random()%7));
data/bastet-0.43/BastetBlockChooser.cpp:100:11:  [3] (random) random:
  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.
      i+=(random()%100);
data/bastet-0.43/BastetBlockChooser.cpp:118:98:  [3] (random) random:
  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.
    int pos=find_if(blockPercentages.begin(),blockPercentages.end(),bind2nd(greater_equal<int>(),random()%100)) - blockPercentages.begin();
data/bastet-0.43/BastetBlockChooser.cpp:181:12:  [3] (random) random:
  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.
    switch(random()%4){
data/bastet-0.43/BastetBlockChooser.cpp:206:11:  [3] (random) random:
  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.
      i+=(random()%100);
data/bastet-0.43/BastetBlockChooser.cpp:214:98:  [3] (random) random:
  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.
    int pos=find_if(blockPercentages.begin(),blockPercentages.end(),bind2nd(greater_equal<int>(),random()%100)) - blockPercentages.begin();
data/bastet-0.43/BlockChooser.cpp:32:27:  [3] (random) random:
  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.
    q.push_back(BlockType(random()%7));
data/bastet-0.43/BlockChooser.cpp:33:27:  [3] (random) random:
  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.
    q.push_back(BlockType(random()%7));
data/bastet-0.43/BlockChooser.cpp:37:22:  [3] (random) random:
  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.
    return BlockType(random()%7);
data/bastet-0.43/Config.cpp:61: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.
    return string(getenv("HOME"))+RcFileName;
data/bastet-0.43/Config.cpp:78:21:  [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.
    string s=string(getenv("HOME"))+LocalHighScoresFileName;
data/bastet-0.43/Ui.cpp:154:5:  [3] (random) srandom:
  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.
    srandom(time(NULL)+37);
data/bastet-0.43/Ui.cpp:208: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 buf[51];
data/bastet-0.43/Ui.cpp:477:2:  [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(500000/6);

ANALYSIS SUMMARY:

Hits = 15
Lines analyzed = 1992 in approximately 0.06 seconds (33387 lines/second)
Physical Source Lines of Code (SLOC) = 1402
Hits@level = [0]   2 [1]   1 [2]   1 [3]  13 [4]   0 [5]   0
Hits@level+ = [0+]  17 [1+]  15 [2+]  14 [3+]  13 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 12.1255 [1+] 10.699 [2+] 9.98573 [3+] 9.27247 [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.