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/burgerspace-1.9.3/src/RemoteServer.cpp
Examining data/burgerspace-1.9.3/src/LocalServer.h
Examining data/burgerspace-1.9.3/src/util.h
Examining data/burgerspace-1.9.3/src/client.cpp
Examining data/burgerspace-1.9.3/src/BurgerSpaceServer.h
Examining data/burgerspace-1.9.3/src/EnemySprite.h
Examining data/burgerspace-1.9.3/src/Controller.h
Examining data/burgerspace-1.9.3/src/EnemySprite.cpp
Examining data/burgerspace-1.9.3/src/BurgerSpaceServer.cpp
Examining data/burgerspace-1.9.3/src/IngredientSprite.h
Examining data/burgerspace-1.9.3/src/IngredientGroup.cpp
Examining data/burgerspace-1.9.3/src/RemoteServer.h
Examining data/burgerspace-1.9.3/src/LocalServer.cpp
Examining data/burgerspace-1.9.3/src/IngredientGroup.h
Examining data/burgerspace-1.9.3/src/pixmaps.h
Examining data/burgerspace-1.9.3/src/BurgerSpaceClient.h
Examining data/burgerspace-1.9.3/src/BurgerSpaceClient.cpp
Examining data/burgerspace-1.9.3/src/server.cpp

FINAL RESULTS:

data/burgerspace-1.9.3/src/BurgerSpaceClient.cpp:749:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access(subdir.c_str(), W_OK) != 0)
data/burgerspace-1.9.3/src/BurgerSpaceServer.cpp:3319:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access(subdir.c_str(), W_OK) != 0)
data/burgerspace-1.9.3/src/BurgerSpaceClient.cpp:716:24:  [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.
    const char *home = getenv("HOME");  // TODO: what about non-Unix systems?
data/burgerspace-1.9.3/src/BurgerSpaceServer.cpp:1389: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.
    static const bool infinitePepper = (getenv("INFINITEPEPPER") != NULL);
data/burgerspace-1.9.3/src/BurgerSpaceServer.cpp:1727:34:  [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.
    static bool noEnemiesFlag = (getenv("NOENEMIES") != NULL);
data/burgerspace-1.9.3/src/BurgerSpaceServer.cpp:2577:39:  [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.
        static bool invincibleChef = (getenv("INVINCIBLECHEF") != NULL);
data/burgerspace-1.9.3/src/BurgerSpaceServer.cpp:3286:24:  [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.
    const char *home = getenv("HOME");  // TODO: what about non-Unix systems?
data/burgerspace-1.9.3/src/client.cpp:169:13:  [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.
        c = getopt_long(argc, argv, "", knownOptions, NULL);
data/burgerspace-1.9.3/src/client.cpp:297: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.
    const char *s = getenv("SEED");
data/burgerspace-1.9.3/src/client.cpp:303:5:  [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(seed);
data/burgerspace-1.9.3/src/server.cpp:801:13:  [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.
        c = getopt_long(argc, argv, "", knownOptions, NULL);
data/burgerspace-1.9.3/src/server.cpp:855: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.
    const char *s = getenv("SEED");
data/burgerspace-1.9.3/src/server.cpp:861:5:  [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(seed);
data/burgerspace-1.9.3/src/util.h:109: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.
    const char *s = getenv(envVarName);
data/burgerspace-1.9.3/src/BurgerSpaceClient.cpp:586: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 s[64];
data/burgerspace-1.9.3/src/BurgerSpaceClient.cpp:764: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 temp[512];
data/burgerspace-1.9.3/src/BurgerSpaceClient.cpp:785:9:  [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 slotDesc[32], fileTime[32];
data/burgerspace-1.9.3/src/BurgerSpaceServer.cpp:119: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 buffer[256];
data/burgerspace-1.9.3/src/BurgerSpaceServer.cpp:657:27:  [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.
    xpmMatrix = new const char **[nRows * nCols];
data/burgerspace-1.9.3/src/BurgerSpaceServer.cpp:1217:14:  [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.
    unsigned char alts[4];  // alternatives for the key
data/burgerspace-1.9.3/src/BurgerSpaceServer.cpp:1482:22:  [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.
        static const char table[4] = { 0, 1, 0, 2 };
data/burgerspace-1.9.3/src/BurgerSpaceServer.cpp:2623: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 number[64];
data/burgerspace-1.9.3/src/BurgerSpaceServer.cpp:3080: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 temp[512];
data/burgerspace-1.9.3/src/BurgerSpaceServer.cpp:3128: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 temp[512];
data/burgerspace-1.9.3/src/BurgerSpaceServer.cpp:3148: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 temp[512];
data/burgerspace-1.9.3/src/BurgerSpaceServer.cpp:3180: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 temp[512];
data/burgerspace-1.9.3/src/BurgerSpaceServer.cpp:3334: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 temp[512];
data/burgerspace-1.9.3/src/RemoteServer.cpp:45:58:  [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.
                                                unsigned char _serverIPAddr[4],
data/burgerspace-1.9.3/src/RemoteServer.cpp:60:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(serverIPAddr, _serverIPAddr, 4);
data/burgerspace-1.9.3/src/RemoteServer.cpp:199:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&to.sin_addr, serverIPAddr, 4);
data/burgerspace-1.9.3/src/RemoteServer.h:38:26:  [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.
                unsigned char _serverIPAddr[4],
data/burgerspace-1.9.3/src/RemoteServer.h:80:14:  [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.
    unsigned char serverIPAddr[4];
data/burgerspace-1.9.3/src/client.cpp:298:53:  [2] (integer) atol:
  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).
    unsigned int seed = (unsigned int) (s != NULL ? atol(s) : time(NULL));
data/burgerspace-1.9.3/src/server.cpp:141:31:  [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.
    GameClient(const unsigned char _ipAddr[4], unsigned short _udpPort, Role _role)
data/burgerspace-1.9.3/src/server.cpp:167:30:  [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.
    void init(const unsigned char _ipAddr[4], unsigned short _udpPort)
data/burgerspace-1.9.3/src/server.cpp:169:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(ipAddr, _ipAddr, 4);
data/burgerspace-1.9.3/src/server.cpp:174:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&to.sin_addr, _ipAddr, 4);
data/burgerspace-1.9.3/src/server.cpp:193:36:  [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.
    bool hasAddress(const unsigned char _ipAddr[4], unsigned short _udpPort) const
data/burgerspace-1.9.3/src/server.cpp:229:14:  [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.
    unsigned char ipAddr[4];
data/burgerspace-1.9.3/src/server.cpp:332:49:  [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.
    GameClient *insertGameClient(const unsigned char _ipAddr[4], unsigned short _udpPort, Role _requestedRole)
data/burgerspace-1.9.3/src/server.cpp:492:55:  [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.
    GameClient *getGameClientByAddress(const unsigned char _ipAddr[4], unsigned short _udpPort)
data/burgerspace-1.9.3/src/server.cpp:651: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 buffer[MAX_LEN_PACKET];
data/burgerspace-1.9.3/src/server.cpp:856:53:  [2] (integer) atol:
  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).
    unsigned int seed = (unsigned int) (s != NULL ? atol(s) : time(NULL));
data/burgerspace-1.9.3/src/BurgerSpaceServer.cpp:2625:24:  [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).
    size_t numDigits = strlen(number);
data/burgerspace-1.9.3/src/BurgerSpaceServer.cpp:2839:33:  [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).
        size_t thisRowsLength = strlen(levelDesc[rowNo]);

ANALYSIS SUMMARY:

Hits = 45
Lines analyzed = 8284 in approximately 0.26 seconds (32312 lines/second)
Physical Source Lines of Code (SLOC) = 5799
Hits@level = [0]  18 [1]   2 [2]  29 [3]  12 [4]   2 [5]   0
Hits@level+ = [0+]  63 [1+]  45 [2+]  43 [3+]  14 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 10.8639 [1+] 7.75996 [2+] 7.41507 [3+] 2.41421 [4+] 0.344887 [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.