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/gav-0.9.0/ResizeSurface.h
Examining data/gav-0.9.0/ResizeSurface.cpp
Examining data/gav-0.9.0/Configuration.h
Examining data/gav-0.9.0/Ball.h
Examining data/gav-0.9.0/ScreenFont.cpp
Examining data/gav-0.9.0/automa/StatePlaying.h
Examining data/gav-0.9.0/automa/StateClient.h
Examining data/gav-0.9.0/automa/StateWithInput.h
Examining data/gav-0.9.0/automa/AutomaMainLoop.h
Examining data/gav-0.9.0/automa/AutomaMainLoop.cpp
Examining data/gav-0.9.0/automa/StateMenu.h
Examining data/gav-0.9.0/automa/State.h
Examining data/gav-0.9.0/automa/StatePlaying.cpp
Examining data/gav-0.9.0/automa/Automa.h
Examining data/gav-0.9.0/automa/StateClient.cpp
Examining data/gav-0.9.0/GameRenderer.cpp
Examining data/gav-0.9.0/Sound.cpp
Examining data/gav-0.9.0/FrameSeq.h
Examining data/gav-0.9.0/PlayerAI.cpp
Examining data/gav-0.9.0/GameRenderer.h
Examining data/gav-0.9.0/PlayerAI.h
Examining data/gav-0.9.0/Theme.h
Examining data/gav-0.9.0/InputState.h
Examining data/gav-0.9.0/SoundMgr.cpp
Examining data/gav-0.9.0/LogicalFrameSeq.h
Examining data/gav-0.9.0/Player.cpp
Examining data/gav-0.9.0/PlayerHuman.h
Examining data/gav-0.9.0/Theme.cpp
Examining data/gav-0.9.0/Player.h
Examining data/gav-0.9.0/InputState.cpp
Examining data/gav-0.9.0/PlayerRemote.h
Examining data/gav-0.9.0/menu/MenuItemFullScreen.h
Examining data/gav-0.9.0/menu/MenuItemExit.h
Examining data/gav-0.9.0/menu/MenuItemMonitor.h
Examining data/gav-0.9.0/menu/MenuItemNotImplemented.h
Examining data/gav-0.9.0/menu/MenuItemPlay.h
Examining data/gav-0.9.0/menu/MenuKeys.h
Examining data/gav-0.9.0/menu/MenuItemJoystick.h
Examining data/gav-0.9.0/menu/MenuItemSubMenu.h
Examining data/gav-0.9.0/menu/MenuItemBack.h
Examining data/gav-0.9.0/menu/MenuItemServer.h
Examining data/gav-0.9.0/menu/MenuItemScore.h
Examining data/gav-0.9.0/menu/MenuItemNotCompiled.h
Examining data/gav-0.9.0/menu/MenuItemSave.h
Examining data/gav-0.9.0/menu/MenuRoot.h
Examining data/gav-0.9.0/menu/MenuItemTheme.h
Examining data/gav-0.9.0/menu/MenuItem.h
Examining data/gav-0.9.0/menu/MenuItemFPS.h
Examining data/gav-0.9.0/menu/MenuItemFrameSkip.h
Examining data/gav-0.9.0/menu/Menu.h
Examining data/gav-0.9.0/menu/Menu.cpp
Examining data/gav-0.9.0/menu/MenuItemBallSpeed.h
Examining data/gav-0.9.0/menu/MenuItemPlayer.h
Examining data/gav-0.9.0/menu/MenuItemSound.h
Examining data/gav-0.9.0/menu/MenuThemes.h
Examining data/gav-0.9.0/menu/MenuItemBigBackground.h
Examining data/gav-0.9.0/menu/MenuItemClient.h
Examining data/gav-0.9.0/LogicalFrameSeq.cpp
Examining data/gav-0.9.0/main.cpp
Examining data/gav-0.9.0/ControlsArray.h
Examining data/gav-0.9.0/ControlsArray.cpp
Examining data/gav-0.9.0/Ball.cpp
Examining data/gav-0.9.0/FrameSeq.cpp
Examining data/gav-0.9.0/Team.h
Examining data/gav-0.9.0/globals.cpp
Examining data/gav-0.9.0/Sound.h
Examining data/gav-0.9.0/globals.h
Examining data/gav-0.9.0/ScreenFont.h
Examining data/gav-0.9.0/SoundMgr.h
Examining data/gav-0.9.0/Configuration.cpp
Examining data/gav-0.9.0/net/Net.h
Examining data/gav-0.9.0/net/NetServer.cpp
Examining data/gav-0.9.0/net/NetServer.h
Examining data/gav-0.9.0/net/NetClient.h
Examining data/gav-0.9.0/net/NetClient.cpp
Examining data/gav-0.9.0/aarg.h

FINAL RESULTS:

data/gav-0.9.0/SoundMgr.cpp:61:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(fname, "%s/%s", actualdir, sound_fnames[sndidx]);
data/gav-0.9.0/Theme.cpp:48:10:  [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(_CCS(_background), R_OK) ) {
data/gav-0.9.0/Theme.cpp:53:12:  [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(_CCS(_background), R_OK) ) errorOn("background.{jpg,png}");
data/gav-0.9.0/Theme.cpp:55:10:  [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(_CCS(_font), R_OK) )        errorOn(TH_FONT);
data/gav-0.9.0/Theme.cpp:56:10:  [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(_CCS(_fontinv), R_OK) )     errorOn(TH_FONTINV);
data/gav-0.9.0/Theme.cpp:57:10:  [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(_CCS(_leftmale), R_OK) )    errorOn(TH_LEFTMALE);
data/gav-0.9.0/Theme.cpp:58:10:  [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(_CCS(_rightmale), R_OK) )   errorOn(TH_RIGHTMALE);
data/gav-0.9.0/Theme.cpp:59:10:  [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(_CCS(_leftfemale), R_OK) )  errorOn(TH_LEFTFEMALE);
data/gav-0.9.0/Theme.cpp:60:10:  [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(_CCS(_rightfemale), R_OK) ) errorOn(TH_RIGHTFEMALE);
data/gav-0.9.0/Theme.cpp:61:10:  [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(_CCS(_ball), R_OK) )        errorOn(TH_BALL);
data/gav-0.9.0/Theme.cpp:62:10:  [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(_CCS(_confFile), R_OK) )    _hasConfFile = false;
data/gav-0.9.0/Theme.cpp:64:10:  [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.
    r = (access(_CCS(_net), R_OK) == 0);
data/gav-0.9.0/Configuration.cpp:232: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.
  const char *home = getenv("HOME");
data/gav-0.9.0/Configuration.cpp:44:35:  [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).
    configuration.left_nplayers = atoi(value.c_str());
data/gav-0.9.0/Configuration.cpp:46:36:  [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).
    configuration.right_nplayers = atoi(value.c_str());
data/gav-0.9.0/Configuration.cpp:60:32:  [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).
    configuration.frame_skip = atoi(value.c_str());
data/gav-0.9.0/Configuration.cpp:62:26:  [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).
    configuration.setFps(atoi(value.c_str()));
data/gav-0.9.0/Configuration.cpp:85: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).
      ctrls.left_key = atoi(lval.c_str());
data/gav-0.9.0/Configuration.cpp:86:25:  [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).
      ctrls.right_key = atoi(rval.c_str());
data/gav-0.9.0/Configuration.cpp:87: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).
      ctrls.jump_key = atoi(jval.c_str());
data/gav-0.9.0/Configuration.cpp:113: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).
      ctrls.left_key = atoi(lval.c_str());
data/gav-0.9.0/Configuration.cpp:114:25:  [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).
      ctrls.right_key = atoi(rval.c_str());
data/gav-0.9.0/Configuration.cpp:115: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).
      ctrls.jump_key = atoi(jval.c_str());
data/gav-0.9.0/Configuration.cpp:139:35:  [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).
    configuration.winning_score = atoi(value.c_str());
data/gav-0.9.0/Configuration.cpp:153: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).
  if ( (fp = fopen(fname.c_str(), "w")) == NULL )
data/gav-0.9.0/Player.h:77:3:  [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 *_fileNames[NUM_TYPES];
data/gav-0.9.0/Sound.cpp:49:3:  [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(new_buf,sound->samples,sound->length);
data/gav-0.9.0/SoundMgr.cpp:56:3:  [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 fname[100];
data/gav-0.9.0/SoundMgr.cpp:62: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(fname, "r");
data/gav-0.9.0/Team.h:140: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[100];
data/gav-0.9.0/Team.h:141: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(s, "%d", _score);
data/gav-0.9.0/Theme.cpp:114:51:  [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).
    configuration.playerFrameConf.nPlayerFrames = atoi(value.c_str());
data/gav-0.9.0/Theme.cpp:116:50:  [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).
    configuration.playerFrameConf.playerStillB = atoi(value.c_str());
data/gav-0.9.0/Theme.cpp:118:50:  [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).
    configuration.playerFrameConf.playerStillE = atoi(value.c_str());
data/gav-0.9.0/Theme.cpp:120:50:  [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).
    configuration.playerFrameConf.playerStillP = atoi(value.c_str());
data/gav-0.9.0/Theme.cpp:122:48:  [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).
    configuration.playerFrameConf.playerRunB = atoi(value.c_str());
data/gav-0.9.0/Theme.cpp:124:48:  [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).
    configuration.playerFrameConf.playerRunE = atoi(value.c_str());
data/gav-0.9.0/Theme.cpp:126:48:  [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).
    configuration.playerFrameConf.playerRunP = atoi(value.c_str());
data/gav-0.9.0/Theme.cpp:128:48:  [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).
    configuration.playerFrameConf.playerJmpB = atoi(value.c_str());
data/gav-0.9.0/Theme.cpp:130:48:  [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).
    configuration.playerFrameConf.playerJmpE = atoi(value.c_str());
data/gav-0.9.0/Theme.cpp:132:48:  [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).
    configuration.playerFrameConf.playerJmpP = atoi(value.c_str());
data/gav-0.9.0/Theme.cpp:134:47:  [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).
    configuration.ballFrameConf.nBallFrames = atoi(value.c_str());
data/gav-0.9.0/Theme.cpp:136:46:  [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).
    configuration.ballFrameConf.ballPeriod = atoi(value.c_str());
data/gav-0.9.0/aarg.h:75: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 ln[128];
data/gav-0.9.0/aarg.h:77: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).
    if ((fp = fopen (filename, "r")) == NULL)
data/gav-0.9.0/automa/StateClient.cpp:60:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char w[2];
data/gav-0.9.0/automa/StateClient.cpp:68: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[100];
data/gav-0.9.0/automa/StateClient.cpp:69: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(msg, "Please type port number [%d]", SERVER_PORT);
data/gav-0.9.0/automa/StateClient.cpp:77:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char w[2];
data/gav-0.9.0/automa/StateClient.cpp:85:12:  [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).
    port = atoi(ports.c_str());
data/gav-0.9.0/automa/StateClient.cpp:96:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char w[2];
data/gav-0.9.0/automa/StatePlaying.cpp:51:3:  [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[100];
data/gav-0.9.0/automa/StatePlaying.cpp:54:3:  [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(msg, "What port to listen on? [%d]", SERVER_PORT);
data/gav-0.9.0/automa/StatePlaying.cpp:62:7:  [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 w[2];
data/gav-0.9.0/automa/StatePlaying.cpp:70:10:  [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).
  port = atoi(ports.c_str());
data/gav-0.9.0/automa/StatePlaying.cpp:81:7:  [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 w[2];
data/gav-0.9.0/automa/StatePlaying.cpp:89: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).
  nclients = atoi(clinumb.c_str());
data/gav-0.9.0/automa/StatePlaying.cpp:101: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[100];
data/gav-0.9.0/automa/StatePlaying.cpp:102: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(msg, "  %d connection(s) to go  ", remaining);
data/gav-0.9.0/automa/StateWithInput.h:38: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 s2[s.length()];
data/gav-0.9.0/main.cpp:203: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).
      resx = atoi(argv[++i]);
data/gav-0.9.0/main.cpp:205: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).
      resy = atoi(argv[++i]);
data/gav-0.9.0/menu/MenuItemBallSpeed.h:33:3:  [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 * _item[BALL_SPEED_ITEMS];
data/gav-0.9.0/menu/MenuItemFPS.h:37: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 fs[10];
data/gav-0.9.0/menu/MenuItemFPS.h:38: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(fs, "%d", configuration.fps);
data/gav-0.9.0/menu/MenuItemFrameSkip.h:37: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 fs[10];
data/gav-0.9.0/menu/MenuItemFrameSkip.h:38: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(fs, "%d", configuration.frame_skip);
data/gav-0.9.0/menu/MenuItemJoystick.h:33:3:  [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 nstr[10];
data/gav-0.9.0/menu/MenuItemJoystick.h:45: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(nstr, "%d", _plId/2 + 1);
data/gav-0.9.0/menu/MenuItemJoystick.h:55:7:  [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(nstr, "%d", _joyId);
data/gav-0.9.0/menu/MenuItemPlayer.h:43: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 numb[10];
data/gav-0.9.0/menu/MenuItemPlayer.h:44: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(numb, "%d", idx*2 + tm + 1);
data/gav-0.9.0/menu/MenuKeys.h:46: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 numb[20];
data/gav-0.9.0/menu/MenuKeys.h:55: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(numb, "Player %d ", 2*_base + ((state <= PL1J)?1:2));
data/gav-0.9.0/net/NetServer.cpp:63:7:  [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(ipa, &(packetRegister->address), sizeof(IPaddress));
data/gav-0.9.0/Player.h:88:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(_fileNames[PL_TYPE_MALE_LEFT], 
data/gav-0.9.0/Player.h:93:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(_fileNames[PL_TYPE_MALE_RIGHT], 
data/gav-0.9.0/Player.h:98:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(_fileNames[PL_TYPE_FEMALE_LEFT], 
data/gav-0.9.0/Player.h:103:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(_fileNames[PL_TYPE_FEMALE_RIGHT], 
data/gav-0.9.0/ScreenFont.cpp:65:40:  [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).
  rect.x = (configuration.env.w / 2) - strlen(str)*(charWidth())/2;
data/gav-0.9.0/automa/StateWithInput.h:40:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(s2, s.c_str(), s.length() - 1);
data/gav-0.9.0/automa/StateWithInput.h:58:12:  [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(kn) == 1 )
data/gav-0.9.0/menu/Menu.cpp:70:7:  [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).
      strlen(label)*(cga->charWidth())/2; // UGLY

ANALYSIS SUMMARY:

Hits = 83
Lines analyzed = 7281 in approximately 0.51 seconds (14357 lines/second)
Physical Source Lines of Code (SLOC) = 4401
Hits@level = [0]  10 [1]   8 [2]  62 [3]   1 [4]  12 [5]   0
Hits@level+ = [0+]  93 [1+]  83 [2+]  75 [3+]  13 [4+]  12 [5+]   0
Hits/KSLOC@level+ = [0+] 21.1316 [1+] 18.8594 [2+] 17.0416 [3+] 2.95387 [4+] 2.72665 [5+]   0
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.