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/sidplay-2.0.9/include/config.h
Examining data/sidplay-2.0.9/win/VC/config.h
Examining data/sidplay-2.0.9/src/keyboard.h
Examining data/sidplay-2.0.9/src/player.cpp
Examining data/sidplay-2.0.9/src/audio/directx/directx.cpp
Examining data/sidplay-2.0.9/src/audio/directx/directx.h
Examining data/sidplay-2.0.9/src/audio/AudioConfig.h
Examining data/sidplay-2.0.9/src/audio/AudioDrv.h
Examining data/sidplay-2.0.9/src/audio/alsa/audiodrv.cpp
Examining data/sidplay-2.0.9/src/audio/alsa/audiodrv.h
Examining data/sidplay-2.0.9/src/audio/hpux/audiodrv.cpp
Examining data/sidplay-2.0.9/src/audio/hpux/audiodrv.h
Examining data/sidplay-2.0.9/src/audio/irix/audiodrv.cpp
Examining data/sidplay-2.0.9/src/audio/irix/audiodrv.h
Examining data/sidplay-2.0.9/src/audio/mmsystem/mmsystem.cpp
Examining data/sidplay-2.0.9/src/audio/mmsystem/mmsystem.h
Examining data/sidplay-2.0.9/src/audio/null/null.cpp
Examining data/sidplay-2.0.9/src/audio/null/null.h
Examining data/sidplay-2.0.9/src/audio/oss/audiodrv.cpp
Examining data/sidplay-2.0.9/src/audio/oss/audiodrv.h
Examining data/sidplay-2.0.9/src/audio/sunos/audiodrv.cpp
Examining data/sidplay-2.0.9/src/audio/sunos/audiodrv.h
Examining data/sidplay-2.0.9/src/audio/wav/WavFile.cpp
Examining data/sidplay-2.0.9/src/audio/wav/WavFile.h
Examining data/sidplay-2.0.9/src/audio/wav/WavFileDefs.h
Examining data/sidplay-2.0.9/src/audio/AudioBase.h
Examining data/sidplay-2.0.9/src/IniConfig.cpp
Examining data/sidplay-2.0.9/src/IniConfig.h
Examining data/sidplay-2.0.9/src/args.cpp
Examining data/sidplay-2.0.9/src/keyboard.cpp
Examining data/sidplay-2.0.9/src/main.cpp
Examining data/sidplay-2.0.9/src/menu.cpp
Examining data/sidplay-2.0.9/src/player.h

FINAL RESULTS:

data/sidplay-2.0.9/src/IniConfig.cpp:415:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (configPath, "%s/%s", path, DIR_NAME);
data/sidplay-2.0.9/src/IniConfig.cpp:421:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (configPath, "%s/%s", configPath, FILE_NAME);
data/sidplay-2.0.9/src/IniConfig.cpp:423:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (configPath, "%s/%s", path, FILE_NAME);
data/sidplay-2.0.9/src/audio/oss/audiodrv.cpp:96:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access (AUDIODEVICE, W_OK) == -1)
data/sidplay-2.0.9/src/player.cpp:280: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 (name, title);
data/sidplay-2.0.9/src/player.cpp:287: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 (&name[i], m_driver.device->extension ());
data/sidplay-2.0.9/src/IniConfig.cpp:388:29:  [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   *path = (char *) getenv ("HOME");
data/sidplay-2.0.9/src/IniConfig.cpp:394:25:  [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.
        path = (char *) getenv ("windir");
data/sidplay-2.0.9/src/IniConfig.cpp:198: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).
        c = (char) atoi (str);
data/sidplay-2.0.9/src/IniConfig.cpp:223: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).
        time = atoi (str);
data/sidplay-2.0.9/src/IniConfig.cpp:229: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).
        val  = atoi (str);
data/sidplay-2.0.9/src/IniConfig.cpp:233: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).
        val  = atoi (sep + 1);
data/sidplay-2.0.9/src/args.cpp:108:17:  [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).
        _time = atoi (str);
data/sidplay-2.0.9/src/args.cpp:114: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).
        val  = atoi (str);
data/sidplay-2.0.9/src/args.cpp:118:17:  [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).
        val   = atoi (sep + 1);
data/sidplay-2.0.9/src/args.cpp:180: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).
                m_engCfg.frequency = (uint_least32_t) atoi (argv[i]+2);
data/sidplay-2.0.9/src/args.cpp:242:34:  [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).
                m_track.first  = atoi(&argv[i][4]);
data/sidplay-2.0.9/src/args.cpp:247:33:  [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).
                m_track.first = atoi(&argv[i][3]);
data/sidplay-2.0.9/src/args.cpp:252:34:  [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).
                m_track.first  = atoi(&argv[i][3]);
data/sidplay-2.0.9/src/args.cpp:258:33:  [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).
                m_track.first = atoi(&argv[i][2]);
data/sidplay-2.0.9/src/args.cpp:264:45:  [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).
                    m_engCfg.optimisation = atoi(&argv[i][2]);
data/sidplay-2.0.9/src/args.cpp:272: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).
                    uint_least8_t precision = atoi(&argv[i][2]);
data/sidplay-2.0.9/src/args.cpp:291: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).
                    m_quietLevel = atoi(&argv[i][2]);
data/sidplay-2.0.9/src/args.cpp:343:38:  [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).
                    m_verboseLevel = atoi(&argv[i][2]);
data/sidplay-2.0.9/src/args.cpp:349: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).
                    m_crc = (uint_least32_t) atoi(&argv[i][6]);
data/sidplay-2.0.9/src/args.cpp:353:58:  [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).
                m_engCfg.powerOnDelay = (uint_least16_t) atoi(&argv[i][8]);
data/sidplay-2.0.9/src/args.cpp:480:32:  [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).
                if (m_database.open (database) < 0)
data/sidplay-2.0.9/src/audio/AudioBase.h:58:19:  [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).
    virtual void *open  (AudioConfig &cfg, const char *name) = 0;
data/sidplay-2.0.9/src/audio/alsa/audiodrv.cpp:57:19:  [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).
void *Audio_ALSA::open (AudioConfig &cfg, const char *)
data/sidplay-2.0.9/src/audio/alsa/audiodrv.h:54: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).
    void *open  (AudioConfig &cfg, const char *name);
data/sidplay-2.0.9/src/audio/directx/directx.cpp:72: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 pszNewWindowTitle[MY_bufSize]; // contains fabricated WindowTitle
data/sidplay-2.0.9/src/audio/directx/directx.cpp:73: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 pszOldWindowTitle[MY_bufSize]; // contains original WindowTitle
data/sidplay-2.0.9/src/audio/directx/directx.cpp:96:22:  [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).
void *Audio_DirectX::open (AudioConfig &cfg, const char *name)
data/sidplay-2.0.9/src/audio/directx/directx.cpp:102:12:  [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).
    return open (cfg, name, hwnd);
data/sidplay-2.0.9/src/audio/directx/directx.cpp:105:22:  [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).
void *Audio_DirectX::open (AudioConfig &cfg, const char *, HWND hwnd)
data/sidplay-2.0.9/src/audio/directx/directx.h:85: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).
    void *open  (AudioConfig &cfg, const char *name);
data/sidplay-2.0.9/src/audio/directx/directx.h:86: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).
    void *open  (AudioConfig &cfg, const char *name, HWND hwnd);
data/sidplay-2.0.9/src/audio/hpux/audiodrv.cpp:69:19:  [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).
void *Audio_HPUX::open (AudioConfig& cfg, const char *)
data/sidplay-2.0.9/src/audio/hpux/audiodrv.cpp:74:22:  [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).
    if ((_audiofd =::open (AUDIODEVICE,O_WRONLY,0)) == (-1))
data/sidplay-2.0.9/src/audio/hpux/audiodrv.h:48: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).
    void *open (AudioConfig &cfg, const char *name);
data/sidplay-2.0.9/src/audio/irix/audiodrv.cpp:63:19:  [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).
void *Audio_Irix::open (AudioConfig& cfg, const char *)
data/sidplay-2.0.9/src/audio/irix/audiodrv.h:60: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).
    void *open (AudioConfig &cfg, const char *name);
data/sidplay-2.0.9/src/audio/mmsystem/mmsystem.cpp:70:23:  [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).
void *Audio_MMSystem::open (AudioConfig &cfg, const char *)
data/sidplay-2.0.9/src/audio/mmsystem/mmsystem.h:73: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).
    void *open  (AudioConfig &cfg, const char *name);
data/sidplay-2.0.9/src/audio/null/null.cpp:63:19:  [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).
void *Audio_Null::open (AudioConfig &cfg, const char *)
data/sidplay-2.0.9/src/audio/null/null.h:56: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).
    void *open  (AudioConfig &cfg, const char *);
data/sidplay-2.0.9/src/audio/oss/audiodrv.cpp:84:18:  [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).
void *Audio_OSS::open (AudioConfig &cfg, const char *)
data/sidplay-2.0.9/src/audio/oss/audiodrv.cpp:102:23:  [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).
    if ((_audiofd = ::open (AUDIODEVICE, O_WRONLY, 0)) == (-1))
data/sidplay-2.0.9/src/audio/oss/audiodrv.h:88: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).
    void *open  (AudioConfig &cfg, const char *name);
data/sidplay-2.0.9/src/audio/sunos/audiodrv.cpp:91:20:  [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).
void *Audio_SunOS::open (AudioConfig& cfg, const char *)
data/sidplay-2.0.9/src/audio/sunos/audiodrv.cpp:93:22:  [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).
    if ((_audiofd =::open (AUDIODEVICE,O_WRONLY,0)) == (-1))
data/sidplay-2.0.9/src/audio/sunos/audiodrv.h:68: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).
    void *open (AudioConfig &cfg, const char *name);
data/sidplay-2.0.9/src/audio/wav/WavFile.cpp:89:16:  [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).
void* WavFile::open(AudioConfig &cfg, const char* name,
data/sidplay-2.0.9/src/audio/wav/WavFile.cpp:143:14:  [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).
        file.open( name, createAttr|std::ios::trunc );
data/sidplay-2.0.9/src/audio/wav/WavFile.cpp:145:14:  [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).
        file.open( name, createAttr|std::ios::app );
data/sidplay-2.0.9/src/audio/wav/WavFile.h:54: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 mainChunkID[4];                // 'RIFF' (ASCII)
data/sidplay-2.0.9/src/audio/wav/WavFile.h:56:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char length[4];            // file length
data/sidplay-2.0.9/src/audio/wav/WavFile.h:58: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 chunkID[4];                    // 'WAVE' (ASCII)
data/sidplay-2.0.9/src/audio/wav/WavFile.h:59: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 subChunkID[4];                    // 'fmt ' (ASCII)
data/sidplay-2.0.9/src/audio/wav/WavFile.h:60: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 subChunkLen[4];                // length of subChunk, always 16 bytes
data/sidplay-2.0.9/src/audio/wav/WavFile.h:61: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 format[2];                        // currently always = 1 = PCM-Code
data/sidplay-2.0.9/src/audio/wav/WavFile.h:63:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char channels[2];            // 1 = mono, 2 = stereo
data/sidplay-2.0.9/src/audio/wav/WavFile.h:64:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sampleFreq[4];        // sample-frequency
data/sidplay-2.0.9/src/audio/wav/WavFile.h:65:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char bytesPerSec[4];        // sampleFreq * blockAlign
data/sidplay-2.0.9/src/audio/wav/WavFile.h:66:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char blockAlign[2];        // bytes per sample * channels
data/sidplay-2.0.9/src/audio/wav/WavFile.h:67:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char bitsPerSample[2];
data/sidplay-2.0.9/src/audio/wav/WavFile.h:69: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 dataChunkID[4];                // keyword, begin of data chunk; = 'data' (ASCII)
data/sidplay-2.0.9/src/audio/wav/WavFile.h:71:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char dataChunkLen[4];        // length of data
data/sidplay-2.0.9/src/audio/wav/WavFile.h:96: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).
    void *open(AudioConfig &cfg, const char *name)
data/sidplay-2.0.9/src/audio/wav/WavFile.h:97:14:  [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).
    { return open (cfg, name, true); }
data/sidplay-2.0.9/src/audio/wav/WavFile.h:98: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).
    void *open(AudioConfig &cfg, const char *name,
data/sidplay-2.0.9/src/keyboard.cpp: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 cmd[MAX_CMDLEN+1];
data/sidplay-2.0.9/src/keyboard.cpp:286:16:  [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).
        infd = open("/dev/tty", O_RDONLY);
data/sidplay-2.0.9/src/main.cpp:148:17:  [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).
    if (!player.open ())
data/sidplay-2.0.9/src/player.cpp:286:13:  [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 (&name[i], "[%u]", tuneInfo->currentSong);
data/sidplay-2.0.9/src/player.cpp:301:30:  [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).
        if (m_driver.device->open (m_driver.cfg, title) == NULL)
data/sidplay-2.0.9/src/player.cpp:306:31:  [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).
            if (m_driver.null.open (m_driver.cfg, title) == NULL)
data/sidplay-2.0.9/src/player.cpp:430:21:  [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).
bool ConsolePlayer::open (void)
data/sidplay-2.0.9/src/player.cpp:610: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 md5[SIDTUNE_MD5_LENGTH + 1];
data/sidplay-2.0.9/src/player.h:215:20:  [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).
    bool           open  (void);
data/sidplay-2.0.9/src/IniConfig.cpp:362:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        filter6581.read (ini, emulation_s.filter6581);
data/sidplay-2.0.9/src/IniConfig.cpp:365:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            filter6581.read (emulation_s.filter6581);
data/sidplay-2.0.9/src/IniConfig.cpp:373:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        filter8580.read (ini, emulation_s.filter8580);
data/sidplay-2.0.9/src/IniConfig.cpp:376:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            filter8580.read (emulation_s.filter8580);
data/sidplay-2.0.9/src/IniConfig.cpp:386:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void IniConfig::read ()
data/sidplay-2.0.9/src/IniConfig.cpp:399: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).
    length     = strlen (path) + strlen (DIR_NAME) + strlen (FILE_NAME) + 3;
data/sidplay-2.0.9/src/IniConfig.cpp:399:34:  [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).
    length     = strlen (path) + strlen (DIR_NAME) + strlen (FILE_NAME) + 3;
data/sidplay-2.0.9/src/IniConfig.cpp:399:54:  [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).
    length     = strlen (path) + strlen (DIR_NAME) + strlen (FILE_NAME) + 3;
data/sidplay-2.0.9/src/IniConfig.h:116:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read ();
data/sidplay-2.0.9/src/args.cpp:210:41:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    m_filter.definition.read (&(argv[i][3]));
data/sidplay-2.0.9/src/keyboard.cpp:264:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        read (infd, &ch, 1);
data/sidplay-2.0.9/src/player.cpp:170:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    m_iniCfg.read ();
data/sidplay-2.0.9/src/player.cpp:260: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).
        length = strlen (title);

ANALYSIS SUMMARY:

Hits = 93
Lines analyzed = 6299 in approximately 0.17 seconds (37392 lines/second)
Physical Source Lines of Code (SLOC) = 3794
Hits@level = [0]   0 [1]  13 [2]  72 [3]   2 [4]   6 [5]   0
Hits@level+ = [0+]  93 [1+]  93 [2+]  80 [3+]   8 [4+]   6 [5+]   0
Hits/KSLOC@level+ = [0+] 24.5124 [1+] 24.5124 [2+] 21.0859 [3+] 2.10859 [4+] 1.58144 [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.