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/zaz-1.0.0~dfsg1/src/textureloader.cpp
Examining data/zaz-1.0.0~dfsg1/src/menu.h
Examining data/zaz-1.0.0~dfsg1/src/editor.cpp
Examining data/zaz-1.0.0~dfsg1/src/directorylister.cpp
Examining data/zaz-1.0.0~dfsg1/src/menu.cpp
Examining data/zaz-1.0.0~dfsg1/src/splash.h
Examining data/zaz-1.0.0~dfsg1/src/levelset.h
Examining data/zaz-1.0.0~dfsg1/src/ogvexport.h
Examining data/zaz-1.0.0~dfsg1/src/bezier.h
Examining data/zaz-1.0.0~dfsg1/src/gameloop.h
Examining data/zaz-1.0.0~dfsg1/src/textureloader.h
Examining data/zaz-1.0.0~dfsg1/src/splash.cpp
Examining data/zaz-1.0.0~dfsg1/src/hiscores.cpp
Examining data/zaz-1.0.0~dfsg1/src/mainmenu.h
Examining data/zaz-1.0.0~dfsg1/src/tests.cpp
Examining data/zaz-1.0.0~dfsg1/src/sample.h
Examining data/zaz-1.0.0~dfsg1/src/lineeditor.h
Examining data/zaz-1.0.0~dfsg1/src/oggsample.cpp
Examining data/zaz-1.0.0~dfsg1/src/profile.h
Examining data/zaz-1.0.0~dfsg1/src/player.cpp
Examining data/zaz-1.0.0~dfsg1/src/profile.cpp
Examining data/zaz-1.0.0~dfsg1/src/wavesample.cpp
Examining data/zaz-1.0.0~dfsg1/src/level.cpp
Examining data/zaz-1.0.0~dfsg1/src/ogvexport.cpp
Examining data/zaz-1.0.0~dfsg1/src/ballpath.cpp
Examining data/zaz-1.0.0~dfsg1/src/settings.h
Examining data/zaz-1.0.0~dfsg1/src/ballpath.h
Examining data/zaz-1.0.0~dfsg1/src/audiobuffer.h
Examining data/zaz-1.0.0~dfsg1/src/editor.h
Examining data/zaz-1.0.0~dfsg1/src/settings.cpp
Examining data/zaz-1.0.0~dfsg1/src/frame_events.cpp
Examining data/zaz-1.0.0~dfsg1/src/game.h
Examining data/zaz-1.0.0~dfsg1/src/bezier.cpp
Examining data/zaz-1.0.0~dfsg1/src/gameloop.cpp
Examining data/zaz-1.0.0~dfsg1/src/common.h
Examining data/zaz-1.0.0~dfsg1/src/directorylister.h
Examining data/zaz-1.0.0~dfsg1/src/frame_events.h
Examining data/zaz-1.0.0~dfsg1/src/tests.h
Examining data/zaz-1.0.0~dfsg1/src/scene.h
Examining data/zaz-1.0.0~dfsg1/src/main.cpp
Examining data/zaz-1.0.0~dfsg1/src/gettext.h
Examining data/zaz-1.0.0~dfsg1/src/player.h
Examining data/zaz-1.0.0~dfsg1/src/levelset.cpp
Examining data/zaz-1.0.0~dfsg1/src/lineeditor.cpp
Examining data/zaz-1.0.0~dfsg1/src/level.h
Examining data/zaz-1.0.0~dfsg1/src/error.h
Examining data/zaz-1.0.0~dfsg1/src/audiobuffer.cpp
Examining data/zaz-1.0.0~dfsg1/src/hiscores.h
Examining data/zaz-1.0.0~dfsg1/src/mainmenu.cpp
Examining data/zaz-1.0.0~dfsg1/src/streamingoggsample.cpp
Examining data/zaz-1.0.0~dfsg1/src/game.cpp
Examining data/zaz-1.0.0~dfsg1/src/scene.cpp
Examining data/zaz-1.0.0~dfsg1/src/mixer.cpp
Examining data/zaz-1.0.0~dfsg1/src/mixer.h

FINAL RESULTS:

data/zaz-1.0.0~dfsg1/src/editor.cpp:365: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(sline, modedesc.c_str());
data/zaz-1.0.0~dfsg1/src/game.cpp:352:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    sprintf(tempbuff, "%s%szaz-%s.bmp", exportpath.c_str(), SEPARATOR, datebuff);
data/zaz-1.0.0~dfsg1/src/game.cpp:368:29:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                            sprintf(tempbuff, "%s%szaz-%s-%d.bmp", exportpath.c_str(), SEPARATOR, datebuff, f);
data/zaz-1.0.0~dfsg1/src/game.cpp:807:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(extraLifeTxt, "%s", _("Extra Life !"));
data/zaz-1.0.0~dfsg1/src/gameloop.cpp:209:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(tempbuff, "%s%szaz-%s.ogv", exportpath.c_str(), SEPARATOR, datebuff);
data/zaz-1.0.0~dfsg1/src/gameloop.cpp:226:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(tempbuff, "%s%szaz-%s-%d.ogv", exportpath.c_str(), SEPARATOR, datebuff, f);
data/zaz-1.0.0~dfsg1/src/main.cpp:114:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(err, "Could not initialize SDL:%s\n", SDL_GetError());
data/zaz-1.0.0~dfsg1/src/main.cpp:171:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    sprintf(err, "%s \n", SDL_GetError());
data/zaz-1.0.0~dfsg1/src/mainmenu.cpp:834:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(levelName, "%s", sets[f].getDesc().c_str());
data/zaz-1.0.0~dfsg1/src/mainmenu.cpp:964:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(levelName, "%s", levels[f].lev.name.c_str());
data/zaz-1.0.0~dfsg1/src/mainmenu.cpp:979:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(lockedTxt, "%s", _("locked"));
data/zaz-1.0.0~dfsg1/src/profile.cpp:151: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(buff, cfg[name].c_str());
data/zaz-1.0.0~dfsg1/src/scene.cpp:258:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(msg, "%s", _("Exporting video [press ESC to cancel]"));
data/zaz-1.0.0~dfsg1/src/settings.cpp:140:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(envString, "%s=%s", LANGENVVAR, lang.c_str());
data/zaz-1.0.0~dfsg1/src/settings.cpp:210: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(envLang, cenvLang);
data/zaz-1.0.0~dfsg1/src/settings.cpp:374: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(buff, cfg[name].c_str());
data/zaz-1.0.0~dfsg1/src/settings.cpp:452: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(buff, getFilename(phname).c_str());
data/zaz-1.0.0~dfsg1/src/textureloader.cpp:49: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(phname, filename);
data/zaz-1.0.0~dfsg1/src/game.cpp:99: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(randomSeed);
data/zaz-1.0.0~dfsg1/src/game.cpp:285:9:  [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(randomSeed);
data/zaz-1.0.0~dfsg1/src/profile.cpp:176:15:  [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 *r = getenv(ENVUSERNAME);
data/zaz-1.0.0~dfsg1/src/settings.cpp:131:18:  [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 dir = getenv(ENVVAR);
data/zaz-1.0.0~dfsg1/src/settings.cpp:158:18:  [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 dir = getenv(ENVVAR);
data/zaz-1.0.0~dfsg1/src/settings.cpp:204:22:  [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 *cenvLang = getenv(LANGENVVAR);
data/zaz-1.0.0~dfsg1/src/ballpath.cpp:939:17:  [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 scoretxt[256];
data/zaz-1.0.0~dfsg1/src/ballpath.cpp:940:17:  [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(scoretxt, "%d", psi->points);
data/zaz-1.0.0~dfsg1/src/directorylister.cpp:81:5:  [2] (buffer) wchar_t:
  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.
    wchar_t ff[1024];
data/zaz-1.0.0~dfsg1/src/directorylister.cpp:95:5:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, ff, MAX_PATH);
data/zaz-1.0.0~dfsg1/src/directorylister.cpp:101: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 utf8name[1024];
data/zaz-1.0.0~dfsg1/src/editor.cpp:316:12:  [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 char sline[256];
data/zaz-1.0.0~dfsg1/src/game.cpp:217:14:  [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).
    sfxVol = atoi(settings.get("sfxVolume", "50").c_str());
data/zaz-1.0.0~dfsg1/src/game.cpp:218:16:  [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).
    musicVol = atoi(settings.get("musicVolume", "50").c_str());
data/zaz-1.0.0~dfsg1/src/game.cpp:234: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 phname[1024];
data/zaz-1.0.0~dfsg1/src/game.cpp:241:9:  [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(phname, "mus%d.ogg", f);
data/zaz-1.0.0~dfsg1/src/game.cpp:250:9:  [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(phname, "mus%d.ogg", (rand()%maxM) + 1);
data/zaz-1.0.0~dfsg1/src/game.cpp:330:21:  [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 tempbuff[256];
data/zaz-1.0.0~dfsg1/src/game.cpp:331:21:  [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 datebuff[256];
data/zaz-1.0.0~dfsg1/src/game.cpp:336:21:  [2] (buffer) wchar_t:
  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.
                    wchar_t path[MAX_PATH];
data/zaz-1.0.0~dfsg1/src/game.cpp:343:25:  [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 utfpath[MAX_PATH];
data/zaz-1.0.0~dfsg1/src/game.cpp:350:21:  [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(datebuff, "%04d-%02d-%02d", 1900 + t->tm_year, t->tm_mon + 1, t->tm_mday);
data/zaz-1.0.0~dfsg1/src/game.cpp:756: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 scoretxt[256];
data/zaz-1.0.0~dfsg1/src/game.cpp:757:9:  [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(scoretxt, "%06d", score);
data/zaz-1.0.0~dfsg1/src/game.cpp:806: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 extraLifeTxt[256];
data/zaz-1.0.0~dfsg1/src/game.cpp:858: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 tbuff[256];
data/zaz-1.0.0~dfsg1/src/game.cpp:861:9:  [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(tbuff, "%02d:%02d / %02d:%02d ", levelSeconds/60, levelSeconds%60, level.time/60, level.time%60);
data/zaz-1.0.0~dfsg1/src/game.cpp:865:9:  [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(tbuff, "%02d:%02d", levelSeconds/60, levelSeconds%60);
data/zaz-1.0.0~dfsg1/src/game.cpp:881: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 buff[256];
data/zaz-1.0.0~dfsg1/src/game.cpp:883:9:  [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(buff, _("Time Bonus ! (%d sec * %d = %d)"), timeBonusSecondsAdded, timeBonusScorePerSecond,
data/zaz-1.0.0~dfsg1/src/gameloop.cpp:187: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 tempbuff[256];
data/zaz-1.0.0~dfsg1/src/gameloop.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 datebuff[256];
data/zaz-1.0.0~dfsg1/src/gameloop.cpp:193:5:  [2] (buffer) wchar_t:
  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.
    wchar_t path[MAX_PATH];
data/zaz-1.0.0~dfsg1/src/gameloop.cpp:200: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 utfpath[MAX_PATH];
data/zaz-1.0.0~dfsg1/src/gameloop.cpp:207: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(datebuff, "%04d-%02d-%02d", 1900 + t->tm_year, t->tm_mon + 1, t->tm_mday);
data/zaz-1.0.0~dfsg1/src/gameloop.cpp:575: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 msgscore[256];
data/zaz-1.0.0~dfsg1/src/gameloop.cpp:576:9:  [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(msgscore, _("Lives left: %d"), livesLeft);
data/zaz-1.0.0~dfsg1/src/gameloop.cpp:579:9:  [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(msgscore, _("Current score: %06d"), score);
data/zaz-1.0.0~dfsg1/src/gameloop.cpp:611: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 msgscore[256];
data/zaz-1.0.0~dfsg1/src/gameloop.cpp:612:9:  [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(msgscore, _("Current score: %06d"), score);
data/zaz-1.0.0~dfsg1/src/gameloop.cpp:628: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 msgscore[256];
data/zaz-1.0.0~dfsg1/src/gameloop.cpp:629:9:  [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(msgscore, _("Score: %06d"), score);
data/zaz-1.0.0~dfsg1/src/gettext.h:201: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 msg_ctxt_id[msgctxt_len + msgid_len];
data/zaz-1.0.0~dfsg1/src/gettext.h:203: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[1024];
data/zaz-1.0.0~dfsg1/src/gettext.h:211: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 (msg_ctxt_id, msgctxt, msgctxt_len - 1);
data/zaz-1.0.0~dfsg1/src/gettext.h:213: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 (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
data/zaz-1.0.0~dfsg1/src/gettext.h:247: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 msg_ctxt_id[msgctxt_len + msgid_len];
data/zaz-1.0.0~dfsg1/src/gettext.h:249: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[1024];
data/zaz-1.0.0~dfsg1/src/gettext.h:257: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 (msg_ctxt_id, msgctxt, msgctxt_len - 1);
data/zaz-1.0.0~dfsg1/src/gettext.h:259: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 (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
data/zaz-1.0.0~dfsg1/src/hiscores.cpp:37: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).
    inph.open(Settings::W32_GetFileName(filename).c_str());
data/zaz-1.0.0~dfsg1/src/hiscores.cpp:39: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).
    inph.open(filename.c_str());
data/zaz-1.0.0~dfsg1/src/hiscores.cpp:109:9:  [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).
    oph.open(Settings::W32_CreateFile(filename).c_str());
data/zaz-1.0.0~dfsg1/src/hiscores.cpp:111:9:  [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).
    oph.open(filename.c_str());
data/zaz-1.0.0~dfsg1/src/hiscores.cpp:386:21:  [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 tm[256];
data/zaz-1.0.0~dfsg1/src/hiscores.cpp:389:21:  [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(tm, "%02d:%02d", s->score / 60, s->score%60);
data/zaz-1.0.0~dfsg1/src/lineeditor.cpp:162:17:  [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 uc[8];
data/zaz-1.0.0~dfsg1/src/lineeditor.cpp:163:17:  [2] (buffer) wchar_t:
  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.
                wchar_t wc[2];
data/zaz-1.0.0~dfsg1/src/main.cpp:94: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 err[256];
data/zaz-1.0.0~dfsg1/src/main.cpp:100:9:  [2] (buffer) wchar_t:
  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.
        wchar_t wd[PATH_MAX];
data/zaz-1.0.0~dfsg1/src/main.cpp:101:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        MultiByteToWideChar(CP_UTF8, 0, Settings::getDefaultDirectory().c_str(), -1, wd, MAX_PATH);
data/zaz-1.0.0~dfsg1/src/main.cpp:159:23:  [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).
            int vmx = atoi(res.c_str());
data/zaz-1.0.0~dfsg1/src/main.cpp:160:23:  [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).
            int vmy = atoi(res.substr(res.find_first_of("x") + 1).c_str());
data/zaz-1.0.0~dfsg1/src/main.cpp:281:18:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        int l1 = MultiByteToWideChar(CP_UTF8, 0, ss.str().c_str(), -1, 0, 0);
data/zaz-1.0.0~dfsg1/src/main.cpp:282:9:  [2] (buffer) wchar_t:
  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.
        wchar_t wmsg[l1];
data/zaz-1.0.0~dfsg1/src/main.cpp:284:18:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        int l2 = MultiByteToWideChar(CP_UTF8, 0, caption, -1, 0, 0);
data/zaz-1.0.0~dfsg1/src/main.cpp:285:9:  [2] (buffer) wchar_t:
  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.
        wchar_t wcap[l2];
data/zaz-1.0.0~dfsg1/src/main.cpp:287:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        MultiByteToWideChar(CP_UTF8, 0, ss.str().c_str(), -1, wmsg, l1);
data/zaz-1.0.0~dfsg1/src/main.cpp:288:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        MultiByteToWideChar(CP_UTF8, 0, caption, -1, wcap, l2);
data/zaz-1.0.0~dfsg1/src/mainmenu.cpp:33:61:  [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).
        oldRes(settings.get("resolution", "")), oldMusicVol(atoi(settings.get("musicVolume", "50").c_str())),
data/zaz-1.0.0~dfsg1/src/mainmenu.cpp:310:20:  [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).
    int musicVol = atoi(settings.get("musicVolume", "50").c_str());
data/zaz-1.0.0~dfsg1/src/mainmenu.cpp:418:27:  [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).
    if (p->oldMusicVol != atoi(settings.get("musicVolume", "50").c_str()))
data/zaz-1.0.0~dfsg1/src/mainmenu.cpp:471:37:  [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).
    ((MainMenu*)ptr)->oldMusicVol = atoi(settings.get("musicVolume", "50").c_str());
data/zaz-1.0.0~dfsg1/src/mainmenu.cpp:833:13:  [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 levelName[256];
data/zaz-1.0.0~dfsg1/src/mainmenu.cpp:963:13:  [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 levelName[256];
data/zaz-1.0.0~dfsg1/src/mainmenu.cpp:977:17:  [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 lockedTxt[256];
data/zaz-1.0.0~dfsg1/src/mainmenu.cpp:1158:39:  [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 *phile = fopen(ph.c_str(), "wb");
data/zaz-1.0.0~dfsg1/src/menu.h:192:55:  [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).
            settings(settings), option(option), value(atoi(settings->get(option, "").c_str())),
data/zaz-1.0.0~dfsg1/src/oggsample.cpp:27: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 pcmout[4096];
data/zaz-1.0.0~dfsg1/src/oggsample.cpp:34:15:  [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).
    inphile = fopen(settings.getCFilename(filename), "rb");
data/zaz-1.0.0~dfsg1/src/oggsample.cpp:75: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(((char *)buff) + offs, pcmout, ret);
data/zaz-1.0.0~dfsg1/src/ogvexport.cpp:187:14:  [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).
    ogg_fp = fopen(pathname.c_str(), "wb");
data/zaz-1.0.0~dfsg1/src/profile.cpp:47:11:  [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).
    phile.open(Scenes::Settings::W32_GetFileName(fileName).c_str());
data/zaz-1.0.0~dfsg1/src/profile.cpp:49:11:  [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).
    phile.open(fileName.c_str());
data/zaz-1.0.0~dfsg1/src/profile.cpp:101:11:  [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).
    phile.open(Scenes::Settings::W32_CreateFile(fileName).c_str());
data/zaz-1.0.0~dfsg1/src/profile.cpp:103:11:  [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).
    phile.open(fileName.c_str());
data/zaz-1.0.0~dfsg1/src/profile.cpp:149: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 buff[1024];
data/zaz-1.0.0~dfsg1/src/profile.cpp:189:5:  [2] (buffer) wchar_t:
  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.
    wchar_t wu[256];
data/zaz-1.0.0~dfsg1/src/profile.cpp:194: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 userName[n * 2];
data/zaz-1.0.0~dfsg1/src/scene.cpp:257:17:  [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 msg[256];
data/zaz-1.0.0~dfsg1/src/scene.cpp:419:22:  [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).
    uint rec_frame = atoi(nextEventLine.c_str());
data/zaz-1.0.0~dfsg1/src/scene.cpp:446:42:  [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).
            ev.keyDown.push_back((SDLKey)atoi(fields[1].substr(startpos, (endpos - startpos)).c_str()));
data/zaz-1.0.0~dfsg1/src/scene.cpp:451:42:  [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).
            ev.keyDown.push_back((SDLKey)atoi(fields[1].substr(startpos).c_str()));
data/zaz-1.0.0~dfsg1/src/scene.cpp:458:40:  [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).
            ev.keyUp.push_back((SDLKey)atoi(fields[2].substr(startpos, (endpos - startpos)).c_str()));
data/zaz-1.0.0~dfsg1/src/scene.cpp:463:40:  [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).
            ev.keyUp.push_back((SDLKey)atoi(fields[2].substr(startpos).c_str()));
data/zaz-1.0.0~dfsg1/src/scene.cpp:465:21:  [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).
        ev.mouseX = atoi(fields[3].c_str());
data/zaz-1.0.0~dfsg1/src/scene.cpp:466:21:  [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).
        ev.mouseY = atoi(fields[4].c_str());
data/zaz-1.0.0~dfsg1/src/scene.cpp:470: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).
        ev.relmouseX = atoi(fields[5].c_str());
data/zaz-1.0.0~dfsg1/src/scene.cpp:471: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).
        ev.relmouseY = atoi(fields[6].c_str());
data/zaz-1.0.0~dfsg1/src/scene.cpp:561: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(((char *) temp->pixels) + temp->pitch * i,
data/zaz-1.0.0~dfsg1/src/settings.cpp:108: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 mbpath[MAX_PATH *2];
data/zaz-1.0.0~dfsg1/src/settings.cpp:109:5:  [2] (buffer) wchar_t:
  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.
    wchar_t path[MAX_PATH *2];
data/zaz-1.0.0~dfsg1/src/settings.cpp:139:12:  [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 char envString[1024];
data/zaz-1.0.0~dfsg1/src/settings.cpp:206: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 envLang[1024];
data/zaz-1.0.0~dfsg1/src/settings.cpp:249:11:  [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).
    phile.open(W32_CreateFile(fileName).c_str());
data/zaz-1.0.0~dfsg1/src/settings.cpp:251:11:  [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).
    phile.open(fileName.c_str());
data/zaz-1.0.0~dfsg1/src/settings.cpp:278:5:  [2] (buffer) wchar_t:
  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.
    wchar_t wfn[MAX_PATH];
data/zaz-1.0.0~dfsg1/src/settings.cpp:279:5:  [2] (buffer) wchar_t:
  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.
    wchar_t pthname[MAX_PATH];
data/zaz-1.0.0~dfsg1/src/settings.cpp:280: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 shrt[MAX_PATH];
data/zaz-1.0.0~dfsg1/src/settings.cpp:282:5:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    MultiByteToWideChar(CP_UTF8, 0, phname.c_str(), -1, wfn, MAX_PATH);
data/zaz-1.0.0~dfsg1/src/settings.cpp:298:9:  [2] (buffer) wchar_t:
  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.
        wchar_t wfn[MAX_PATH];
data/zaz-1.0.0~dfsg1/src/settings.cpp:299:9:  [2] (buffer) wchar_t:
  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.
        wchar_t wb[16];
data/zaz-1.0.0~dfsg1/src/settings.cpp:301:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        MultiByteToWideChar(CP_UTF8, 0, phname.c_str(), -1, wfn, MAX_PATH);
data/zaz-1.0.0~dfsg1/src/settings.cpp:302:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        MultiByteToWideChar(CP_UTF8, 0, "wb", -1, wb, 16);
data/zaz-1.0.0~dfsg1/src/settings.cpp:318:11:  [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).
    phile.open(W32_GetFileName(fileNameInUse).c_str());
data/zaz-1.0.0~dfsg1/src/settings.cpp:320:11:  [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).
    phile.open(fileNameInUse.c_str());
data/zaz-1.0.0~dfsg1/src/settings.cpp:372: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 buff[1024];
data/zaz-1.0.0~dfsg1/src/settings.cpp:439:18:  [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 *inph = fopen(lphn.c_str(), "rb");
data/zaz-1.0.0~dfsg1/src/settings.cpp:451:12:  [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 char buff[1024];
data/zaz-1.0.0~dfsg1/src/splash.cpp:41:37:  [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).
        mixer->EnqueueSample(music, atoi(settings.get("musicVolume", "50").c_str()), 0, true);
data/zaz-1.0.0~dfsg1/src/streamingoggsample.cpp:35:15:  [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).
    inphile = fopen(settings.getCFilename (filename), "rb");
data/zaz-1.0.0~dfsg1/src/textureloader.cpp:47: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 phname[256];
data/zaz-1.0.0~dfsg1/src/textureloader.cpp:53:9:  [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(phname, "jpg");
data/zaz-1.0.0~dfsg1/src/gettext.h:197: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).
    size_t msgctxt_len = strlen (msgctxt) + 1;
data/zaz-1.0.0~dfsg1/src/gettext.h:198: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 msgid_len = strlen (msgid) + 1;
data/zaz-1.0.0~dfsg1/src/gettext.h:243: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).
    size_t msgctxt_len = strlen (msgctxt) + 1;
data/zaz-1.0.0~dfsg1/src/gettext.h:244: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 msgid_len = strlen (msgid) + 1;
data/zaz-1.0.0~dfsg1/src/lineeditor.cpp:182:29:  [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 l = strlen(illegal);
data/zaz-1.0.0~dfsg1/src/profile.cpp:152: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).
    int s = strlen(buff);
data/zaz-1.0.0~dfsg1/src/settings.cpp:211: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).
        for (uint f = 0; f < strlen(envLang); f++)
data/zaz-1.0.0~dfsg1/src/settings.cpp:214:18:  [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).
        uint l = strlen(envLang);
data/zaz-1.0.0~dfsg1/src/settings.cpp:375: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).
    int s = strlen(buff);
data/zaz-1.0.0~dfsg1/src/textureloader.cpp:40:9:  [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(filename) == 0)
data/zaz-1.0.0~dfsg1/src/textureloader.cpp:50:23:  [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).
        while (phname[strlen(phname) - 1] != '.')
data/zaz-1.0.0~dfsg1/src/textureloader.cpp:51:20:  [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).
            phname[strlen(phname) - 1] = 0;

ANALYSIS SUMMARY:

Hits = 153
Lines analyzed = 13480 in approximately 0.31 seconds (43735 lines/second)
Physical Source Lines of Code (SLOC) = 9965
Hits@level = [0]   1 [1]  12 [2] 117 [3]   6 [4]  18 [5]   0
Hits@level+ = [0+] 154 [1+] 153 [2+] 141 [3+]  24 [4+]  18 [5+]   0
Hits/KSLOC@level+ = [0+] 15.4541 [1+] 15.3537 [2+] 14.1495 [3+] 2.40843 [4+] 1.80632 [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.