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/lugaru-1.2/Source/Animation/Animation.cpp
Examining data/lugaru-1.2/Source/Animation/Animation.hpp
Examining data/lugaru-1.2/Source/Animation/Joint.cpp
Examining data/lugaru-1.2/Source/Animation/Joint.hpp
Examining data/lugaru-1.2/Source/Animation/Muscle.cpp
Examining data/lugaru-1.2/Source/Animation/Muscle.hpp
Examining data/lugaru-1.2/Source/Animation/Skeleton.cpp
Examining data/lugaru-1.2/Source/Animation/Skeleton.hpp
Examining data/lugaru-1.2/Source/Audio/Sounds.cpp
Examining data/lugaru-1.2/Source/Audio/Sounds.hpp
Examining data/lugaru-1.2/Source/Audio/openal_wrapper.cpp
Examining data/lugaru-1.2/Source/Audio/openal_wrapper.hpp
Examining data/lugaru-1.2/Source/Devtools/ConsoleCmds.cpp
Examining data/lugaru-1.2/Source/Devtools/ConsoleCmds.hpp
Examining data/lugaru-1.2/Source/Environment/Lights.cpp
Examining data/lugaru-1.2/Source/Environment/Lights.hpp
Examining data/lugaru-1.2/Source/Environment/Skybox.cpp
Examining data/lugaru-1.2/Source/Environment/Skybox.hpp
Examining data/lugaru-1.2/Source/Environment/Terrain.cpp
Examining data/lugaru-1.2/Source/Environment/Terrain.hpp
Examining data/lugaru-1.2/Source/Game.cpp
Examining data/lugaru-1.2/Source/GameDraw.cpp
Examining data/lugaru-1.2/Source/GameTick.cpp
Examining data/lugaru-1.2/Source/Globals.cpp
Examining data/lugaru-1.2/Source/Graphic/Decal.cpp
Examining data/lugaru-1.2/Source/Graphic/Decal.hpp
Examining data/lugaru-1.2/Source/Graphic/Models.cpp
Examining data/lugaru-1.2/Source/Graphic/Models.hpp
Examining data/lugaru-1.2/Source/Graphic/Sprite.cpp
Examining data/lugaru-1.2/Source/Graphic/Sprite.hpp
Examining data/lugaru-1.2/Source/Graphic/Stereo.cpp
Examining data/lugaru-1.2/Source/Graphic/Stereo.hpp
Examining data/lugaru-1.2/Source/Graphic/Text.cpp
Examining data/lugaru-1.2/Source/Graphic/Text.hpp
Examining data/lugaru-1.2/Source/Graphic/Texture.cpp
Examining data/lugaru-1.2/Source/Graphic/Texture.hpp
Examining data/lugaru-1.2/Source/Graphic/gamegl.hpp
Examining data/lugaru-1.2/Source/Level/Awards.cpp
Examining data/lugaru-1.2/Source/Level/Awards.hpp
Examining data/lugaru-1.2/Source/Level/Campaign.cpp
Examining data/lugaru-1.2/Source/Level/Campaign.hpp
Examining data/lugaru-1.2/Source/Level/Dialog.cpp
Examining data/lugaru-1.2/Source/Level/Dialog.hpp
Examining data/lugaru-1.2/Source/Level/Hotspot.cpp
Examining data/lugaru-1.2/Source/Level/Hotspot.hpp
Examining data/lugaru-1.2/Source/Math/Frustum.cpp
Examining data/lugaru-1.2/Source/Math/Frustum.hpp
Examining data/lugaru-1.2/Source/Math/Random.hpp
Examining data/lugaru-1.2/Source/Math/XYZ.cpp
Examining data/lugaru-1.2/Source/Math/XYZ.hpp
Examining data/lugaru-1.2/Source/Menu/Menu.cpp
Examining data/lugaru-1.2/Source/Menu/Menu.hpp
Examining data/lugaru-1.2/Source/Objects/Object.cpp
Examining data/lugaru-1.2/Source/Objects/Object.hpp
Examining data/lugaru-1.2/Source/Objects/Person.cpp
Examining data/lugaru-1.2/Source/Objects/Person.hpp
Examining data/lugaru-1.2/Source/Objects/PersonType.cpp
Examining data/lugaru-1.2/Source/Objects/PersonType.hpp
Examining data/lugaru-1.2/Source/Objects/Weapons.cpp
Examining data/lugaru-1.2/Source/Objects/Weapons.hpp
Examining data/lugaru-1.2/Source/Platform/Platform.hpp
Examining data/lugaru-1.2/Source/Platform/PlatformUnix.cpp
Examining data/lugaru-1.2/Source/Platform/PlatformWindows.cpp
Examining data/lugaru-1.2/Source/Thirdparty/optionparser.h
Examining data/lugaru-1.2/Source/Tutorial.cpp
Examining data/lugaru-1.2/Source/Tutorial.hpp
Examining data/lugaru-1.2/Source/User/Account.cpp
Examining data/lugaru-1.2/Source/User/Account.hpp
Examining data/lugaru-1.2/Source/User/Settings.cpp
Examining data/lugaru-1.2/Source/User/Settings.hpp
Examining data/lugaru-1.2/Source/Utils/Folders.cpp
Examining data/lugaru-1.2/Source/Utils/Folders.hpp
Examining data/lugaru-1.2/Source/Utils/ImageIO.cpp
Examining data/lugaru-1.2/Source/Utils/ImageIO.hpp
Examining data/lugaru-1.2/Source/Utils/Input.cpp
Examining data/lugaru-1.2/Source/Utils/Input.hpp
Examining data/lugaru-1.2/Source/Utils/binio.h
Examining data/lugaru-1.2/Source/Utils/pack.c
Examining data/lugaru-1.2/Source/Utils/private.c
Examining data/lugaru-1.2/Source/Utils/private.h
Examining data/lugaru-1.2/Source/Utils/unpack.c
Examining data/lugaru-1.2/Source/main.cpp
Examining data/lugaru-1.2/Source/GameInitDispose.cpp
Examining data/lugaru-1.2/Source/Game.hpp

FINAL RESULTS:

data/lugaru-1.2/Source/Audio/openal_wrapper.cpp:318:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(fname, _fname);
data/lugaru-1.2/Source/Audio/openal_wrapper.cpp:433:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(retval->name, name_or_data);
data/lugaru-1.2/Source/Devtools/ConsoleCmds.cpp:549:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(Hotspot::hotspots.back().text, args + shift);
data/lugaru-1.2/Source/GameTick.cpp:60:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf(buf, size, format, ...) _sprintf_p(buf, size, format)
data/lugaru-1.2/Source/GameTick.cpp:1480:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(Person::players.back()->clothes[i], Person::players[0]->clothes[i]);
data/lugaru-1.2/Source/main.cpp:517:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(exe, start);
data/lugaru-1.2/Source/main.cpp:521:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(exe, bin);
data/lugaru-1.2/Source/main.cpp:523:13:  [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(exe, X_OK) == 0) { /* Exists as executable? We're done. */
data/lugaru-1.2/Source/main.cpp:524:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(exe, start);       /* i'm lazy. piss off. */
data/lugaru-1.2/Source/Utils/Folders.cpp:89: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* path = getenv(ENVVAR);
data/lugaru-1.2/Source/Utils/Folders.cpp:108:27:  [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* homedir = getenv("HOME");
data/lugaru-1.2/Source/main.cpp:552:12:  [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.
    envr = getenv("PATH");
data/lugaru-1.2/Source/Audio/openal_wrapper.cpp:323:5:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
    strcat(fname, ".ogg");
data/lugaru-1.2/Source/Audio/openal_wrapper.cpp:326:16:  [2] (misc) fopen:
  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* io = fopen(fname, "rb");
data/lugaru-1.2/Source/Audio/openal_wrapper.cpp:367: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 buf[1024 * 16];
data/lugaru-1.2/Source/Audio/openal_wrapper.cpp:384:17:  [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(retval + (size - rc), buf, rc);
data/lugaru-1.2/Source/Devtools/ConsoleCmds.cpp:130: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[64];
data/lugaru-1.2/Source/Devtools/ConsoleCmds.cpp:135:13:  [2] (misc) fopen:
  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).
    tfile = fopen(file_path.c_str(), "rb");
data/lugaru-1.2/Source/Devtools/ConsoleCmds.cpp:205:13:  [2] (misc) fopen:
  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).
    tfile = fopen(map_path.c_str(), "wb");
data/lugaru-1.2/Source/Devtools/ConsoleCmds.cpp:511:24:  [2] (integer) atoi:
  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).
    Tutorial::active = atoi(args);
data/lugaru-1.2/Source/Devtools/ConsoleCmds.cpp:516:15:  [2] (integer) atoi:
  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).
    hostile = atoi(args);
data/lugaru-1.2/Source/Devtools/ConsoleCmds.cpp:556: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 buf1[32];
data/lugaru-1.2/Source/Devtools/ConsoleCmds.cpp:570: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 buf1[32];
data/lugaru-1.2/Source/GameTick.cpp:326: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 filename[1024];
data/lugaru-1.2/Source/GameTick.cpp:329:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(filename, "Screenshot-%04d%02d%02d-%02d%02d%02d.png",
data/lugaru-1.2/Source/GameTick.cpp:486: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 buf[32];
data/lugaru-1.2/Source/Level/Hotspot.hpp:41: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 text[256] = { 0 };
data/lugaru-1.2/Source/Objects/Person.hpp:251: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 clothes[10][256];
data/lugaru-1.2/Source/User/Account.cpp:251:13:  [2] (misc) fopen:
  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).
    tfile = fopen(filename.c_str(), "rb");
data/lugaru-1.2/Source/User/Account.cpp:275:13:  [2] (misc) fopen:
  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).
    tfile = fopen(filename.c_str(), "wb");
data/lugaru-1.2/Source/User/Settings.cpp:188: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 setting[256];
data/lugaru-1.2/Source/User/Settings.cpp:189: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 string[256];
data/lugaru-1.2/Source/Utils/Folders.cpp:52: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 path[MAX_PATH];
data/lugaru-1.2/Source/Utils/Folders.cpp:134:19:  [2] (misc) fopen:
  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* tfile = fopen(filename.c_str(), mode);
data/lugaru-1.2/Source/Utils/Folders.cpp:144:12:  [2] (misc) fopen:
  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 = fopen(filepath.c_str(), "rb");
data/lugaru-1.2/Source/Utils/ImageIO.cpp:105:20:  [2] (misc) fopen:
  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* infile = fopen(file_name, "rb");
data/lugaru-1.2/Source/Utils/ImageIO.cpp:158:16:  [2] (misc) fopen:
  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* fp = fopen(file_name, "rb");
data/lugaru-1.2/Source/Utils/ImageIO.cpp:223:13:  [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(dst, row_pointers[i], pitch);
data/lugaru-1.2/Source/Utils/ImageIO.cpp:251:10:  [2] (misc) fopen:
  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).
    fp = fopen(file_name, "wb");
data/lugaru-1.2/Source/Utils/private.c:38: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(dst, src, 1 * count);
data/lugaru-1.2/Source/Utils/private.c:55: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(dst, src, 2 * count);
data/lugaru-1.2/Source/Utils/private.c:72: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(dst, src, 4 * count);
data/lugaru-1.2/Source/Utils/private.c:89: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(dst, src, 8 * count);
data/lugaru-1.2/Source/Audio/openal_wrapper.cpp:317: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).
    char* fname = (char*)alloca(strlen(_fname) + 16);
data/lugaru-1.2/Source/Audio/openal_wrapper.cpp:431: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).
        retval->name = new char[strlen(name_or_data) + 1];
data/lugaru-1.2/Source/Devtools/ConsoleCmds.cpp:78:35:  [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).
    return !strncasecmp(str, pfx, strlen(pfx));
data/lugaru-1.2/Source/Devtools/ConsoleCmds.cpp:150:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(Person::players[pnum]->clothes[id], buf, 64);
data/lugaru-1.2/Source/Devtools/ConsoleCmds.cpp:236:26:  [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).
        int templength = strlen(Person::players[0]->clothes[k]);
data/lugaru-1.2/Source/Devtools/ConsoleCmds.cpp:256:26:  [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).
        int templength = strlen(Hotspot::hotspots[i].text);
data/lugaru-1.2/Source/Devtools/ConsoleCmds.cpp:301:30:  [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).
                templength = strlen(Person::players[j]->clothes[k]);
data/lugaru-1.2/Source/Devtools/ConsoleCmds.cpp:550:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat(Hotspot::hotspots.back().text, "\n");
data/lugaru-1.2/Source/Devtools/ConsoleCmds.cpp:558:5:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
    sscanf(args, "%d %31s", &type, buf1);
data/lugaru-1.2/Source/Devtools/ConsoleCmds.cpp:573:5:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
    sscanf(args, "%d %31s", &whichdlg, buf1);
data/lugaru-1.2/Source/Game.cpp:157:36:  [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).
                (*charselected) += strlen(evenement.text.text);
data/lugaru-1.2/Source/GameDraw.cpp:598:83:  [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).
                    text->glPrintOutlined(1, 0, 0, 1 - bonustime, 1024 / 2 - 10 * strlen(bonus_name), 768 / 16 + 768 * 4 / 5, bonus_name, 1, 2, 1024, 768);
data/lugaru-1.2/Source/User/Settings.cpp:197:13:  [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(setting) == 0 || setting[0] == ' ' || setting[0] == '\t') {
data/lugaru-1.2/Source/Utils/Folders.cpp:91:28:  [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 ((path != NULL) && (strlen(path) != 0)) {
data/lugaru-1.2/Source/Utils/Folders.cpp:95:35:  [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 ((homedir != NULL) && (strlen(homedir) != 0)) {
data/lugaru-1.2/Source/main.cpp:502:16:  [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 = strlen(start) + strlen(bin) + 2;
data/lugaru-1.2/Source/main.cpp:502:32:  [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 = strlen(start) + strlen(bin) + 2;
data/lugaru-1.2/Source/main.cpp:518:38:  [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 ((exe[0] == '\0') || (exe[strlen(exe) - 1] != '/')) {
data/lugaru-1.2/Source/main.cpp:519:13:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
            strcat(exe, "/");
data/lugaru-1.2/Source/main.cpp:572:28:  [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).
        const size_t len = strlen(dir);
data/lugaru-1.2/Source/main.cpp:574:38:  [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).
        const size_t bundledirslen = strlen(bundledirs);

ANALYSIS SUMMARY:

Hits = 64
Lines analyzed = 37751 in approximately 1.13 seconds (33442 lines/second)
Physical Source Lines of Code (SLOC) = 30177
Hits@level = [0]  56 [1]  21 [2]  31 [3]   3 [4]   9 [5]   0
Hits@level+ = [0+] 120 [1+]  64 [2+]  43 [3+]  12 [4+]   9 [5+]   0
Hits/KSLOC@level+ = [0+] 3.97654 [1+] 2.12082 [2+] 1.42493 [3+] 0.397654 [4+] 0.29824 [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.