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/sidplayfp-2.0.3/src/stilview.cpp
Examining data/sidplayfp-2.0.3/src/main.cpp
Examining data/sidplayfp-2.0.3/src/utils.h
Examining data/sidplayfp-2.0.3/src/sidcxx11.h
Examining data/sidplayfp-2.0.3/src/ini/iniHandler.h
Examining data/sidplayfp-2.0.3/src/ini/sidfstream.h
Examining data/sidplayfp-2.0.3/src/ini/iniHandler.cpp
Examining data/sidplayfp-2.0.3/src/ini/types.h
Examining data/sidplayfp-2.0.3/src/ini/dataParser.h
Examining data/sidplayfp-2.0.3/src/audio/AudioDrv.h
Examining data/sidplayfp-2.0.3/src/audio/null/null.h
Examining data/sidplayfp-2.0.3/src/audio/null/null.cpp
Examining data/sidplayfp-2.0.3/src/audio/pulse/audiodrv.h
Examining data/sidplayfp-2.0.3/src/audio/pulse/audiodrv.cpp
Examining data/sidplayfp-2.0.3/src/audio/out123/audiodrv.h
Examining data/sidplayfp-2.0.3/src/audio/out123/audiodrv.cpp
Examining data/sidplayfp-2.0.3/src/audio/au/auFile.cpp
Examining data/sidplayfp-2.0.3/src/audio/au/auFile.h
Examining data/sidplayfp-2.0.3/src/audio/IAudio.h
Examining data/sidplayfp-2.0.3/src/audio/alsa/audiodrv.h
Examining data/sidplayfp-2.0.3/src/audio/alsa/audiodrv.cpp
Examining data/sidplayfp-2.0.3/src/audio/AudioDrv.cpp
Examining data/sidplayfp-2.0.3/src/audio/wav/WavFile.cpp
Examining data/sidplayfp-2.0.3/src/audio/wav/WavFile.h
Examining data/sidplayfp-2.0.3/src/audio/directx/audiodrv.h
Examining data/sidplayfp-2.0.3/src/audio/directx/audiodrv.cpp
Examining data/sidplayfp-2.0.3/src/audio/oss/audiodrv.h
Examining data/sidplayfp-2.0.3/src/audio/oss/audiodrv.cpp
Examining data/sidplayfp-2.0.3/src/audio/AudioBase.h
Examining data/sidplayfp-2.0.3/src/audio/mmsystem/audiodrv.h
Examining data/sidplayfp-2.0.3/src/audio/mmsystem/audiodrv.cpp
Examining data/sidplayfp-2.0.3/src/audio/AudioConfig.h
Examining data/sidplayfp-2.0.3/src/player.cpp
Examining data/sidplayfp-2.0.3/src/args.cpp
Examining data/sidplayfp-2.0.3/src/IniConfig.cpp
Examining data/sidplayfp-2.0.3/src/menu.cpp
Examining data/sidplayfp-2.0.3/src/utils.cpp
Examining data/sidplayfp-2.0.3/src/keyboard.cpp
Examining data/sidplayfp-2.0.3/src/player.h
Examining data/sidplayfp-2.0.3/src/keyboard.h
Examining data/sidplayfp-2.0.3/src/IniConfig.h

FINAL RESULTS:

data/sidplayfp-2.0.3/src/IniConfig.cpp:301:15:  [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(buffer, R_OK) == 0)
data/sidplayfp-2.0.3/src/audio/oss/audiodrv.cpp:67:13:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        if (access (AUDIODEVICE, W_OK) == -1)
data/sidplayfp-2.0.3/src/player.cpp:132:15:  [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(dataPath.c_str(), R_OK) != 0)
data/sidplayfp-2.0.3/src/stilview.cpp:522:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(temp, hvscLoc);
data/sidplayfp-2.0.3/src/stilview.cpp:530:13:  [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(temp, entryStr);
data/sidplayfp-2.0.3/src/args.cpp:453:28:  [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* hvscBase = getenv("HVSC_BASE");
data/sidplayfp-2.0.3/src/stilview.cpp:314: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.
    hvscLoc = getenv("HVSC_BASE");
data/sidplayfp-2.0.3/src/utils.cpp:33:20:  [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.
#  define _tgetenv getenv
data/sidplayfp-2.0.3/src/utils.cpp:76: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.
    char *path = getenv(id);
data/sidplayfp-2.0.3/src/utils.cpp:79:16:  [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 = getenv("HOME");
data/sidplayfp-2.0.3/src/IniConfig.cpp:299: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 buffer[PATH_MAX];
data/sidplayfp-2.0.3/src/IniConfig.cpp:497: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 (ini.open(execPath.c_str()))
data/sidplayfp-2.0.3/src/IniConfig.cpp:517: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 (!ini.open(configPath.c_str()))
data/sidplayfp-2.0.3/src/args.cpp:76: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).
    return m_database.open(newFileName.c_str());
data/sidplayfp-2.0.3/src/args.cpp:91: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/sidplayfp-2.0.3/src/args.cpp:98: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/sidplayfp-2.0.3/src/args.cpp:102: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/sidplayfp-2.0.3/src/args.cpp:196: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/sidplayfp-2.0.3/src/args.cpp:211: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/sidplayfp-2.0.3/src/args.cpp:216: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/sidplayfp-2.0.3/src/args.cpp:221: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/sidplayfp-2.0.3/src/args.cpp:227: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/sidplayfp-2.0.3/src/args.cpp:237:39:  [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).
                    const int voice = atoi(&argv[i][2]);
data/sidplayfp-2.0.3/src/args.cpp:248: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/sidplayfp-2.0.3/src/args.cpp:261: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/sidplayfp-2.0.3/src/args.cpp:348: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/sidplayfp-2.0.3/src/args.cpp:352: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/sidplayfp-2.0.3/src/args.cpp:531: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 database[MAX_PATH];
data/sidplayfp-2.0.3/src/args.cpp:540:37:  [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))
data/sidplayfp-2.0.3/src/audio/AudioDrv.cpp:50: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).
bool audioDrv::open(AudioConfig &cfg)
data/sidplayfp-2.0.3/src/audio/AudioDrv.cpp:57: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).
        res = audio->open(cfg);
data/sidplayfp-2.0.3/src/audio/AudioDrv.cpp:64: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).
        res = audio->open(cfg);
data/sidplayfp-2.0.3/src/audio/AudioDrv.cpp:71: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).
        res = audio->open(cfg);
data/sidplayfp-2.0.3/src/audio/AudioDrv.cpp:78: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).
        res = audio->open(cfg);
data/sidplayfp-2.0.3/src/audio/AudioDrv.cpp:85: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).
        res = audio->open(cfg);
data/sidplayfp-2.0.3/src/audio/AudioDrv.cpp:92: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).
        res = audio->open(cfg);
data/sidplayfp-2.0.3/src/audio/AudioDrv.cpp:99: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).
        res = audio->open(cfg);
data/sidplayfp-2.0.3/src/audio/AudioDrv.h:38: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).
    bool open(AudioConfig &cfg);
data/sidplayfp-2.0.3/src/audio/IAudio.h:32: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).
    virtual bool open(AudioConfig &cfg) = 0;
data/sidplayfp-2.0.3/src/audio/alsa/audiodrv.cpp:55: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).
bool Audio_ALSA::open(AudioConfig &cfg)
data/sidplayfp-2.0.3/src/audio/alsa/audiodrv.h:52: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).
    bool open  (AudioConfig &cfg) override;
data/sidplayfp-2.0.3/src/audio/au/auFile.cpp:86:24:  [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.
inline void endian_16 (char ptr[2], uint_least16_t word)
data/sidplayfp-2.0.3/src/audio/au/auFile.cpp:192: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).
bool auFile::open(AudioConfig &cfg)
data/sidplayfp-2.0.3/src/audio/au/auFile.h:34: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];                // '.snd' (ASCII)
data/sidplayfp-2.0.3/src/audio/au/auFile.h:36: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 dataOffset[4];        // data offset
data/sidplayfp-2.0.3/src/audio/au/auFile.h:38: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 dataSize[4];          // data size
data/sidplayfp-2.0.3/src/audio/au/auFile.h:39: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 encoding[4];          // 3 = 16-bit linear PCM, 6 = 32-bit IEEE floating point
data/sidplayfp-2.0.3/src/audio/au/auFile.h:41: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 sampleRate[4];        // sample rate
data/sidplayfp-2.0.3/src/audio/au/auFile.h:42: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[4];          // 1 = mono, 2 = stereo
data/sidplayfp-2.0.3/src/audio/au/auFile.h:71: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).
    bool open(AudioConfig &cfg) override;
data/sidplayfp-2.0.3/src/audio/directx/audiodrv.cpp:48:5:  [2] (buffer) TCHAR:
  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.
    TCHAR  pszNewWindowTitle[MY_bufSize]; // contains fabricated WindowTitle
data/sidplayfp-2.0.3/src/audio/directx/audiodrv.cpp:49:5:  [2] (buffer) TCHAR:
  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.
    TCHAR  pszOldWindowTitle[MY_bufSize]; // contains original WindowTitle
data/sidplayfp-2.0.3/src/audio/directx/audiodrv.cpp:72: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 Audio_DirectX::open (AudioConfig &cfg)
data/sidplayfp-2.0.3/src/audio/directx/audiodrv.cpp:77: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, hwnd);
data/sidplayfp-2.0.3/src/audio/directx/audiodrv.cpp:80: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 Audio_DirectX::open (AudioConfig &cfg, HWND hwnd)
data/sidplayfp-2.0.3/src/audio/directx/audiodrv.h:73: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).
    bool open  (AudioConfig &cfg) override;
data/sidplayfp-2.0.3/src/audio/directx/audiodrv.h:74: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).
    bool open  (AudioConfig &cfg, HWND hwnd);
data/sidplayfp-2.0.3/src/audio/mmsystem/audiodrv.cpp:89: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).
bool Audio_MMSystem::open(AudioConfig &cfg)
data/sidplayfp-2.0.3/src/audio/mmsystem/audiodrv.h:66: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).
    bool open  (AudioConfig &cfg) override;
data/sidplayfp-2.0.3/src/audio/null/null.cpp:32: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).
bool Audio_Null::open(AudioConfig &cfg)
data/sidplayfp-2.0.3/src/audio/null/null.h:50: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).
    bool open  (AudioConfig &cfg) override;
data/sidplayfp-2.0.3/src/audio/oss/audiodrv.cpp:57: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).
bool Audio_OSS::open (AudioConfig &cfg)
data/sidplayfp-2.0.3/src/audio/oss/audiodrv.cpp:72:27:  [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/sidplayfp-2.0.3/src/audio/oss/audiodrv.h:68: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).
    bool open  (AudioConfig &cfg) override;
data/sidplayfp-2.0.3/src/audio/out123/audiodrv.cpp:44: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 Audio_OUT123::open(AudioConfig &cfg)
data/sidplayfp-2.0.3/src/audio/out123/audiodrv.h:46: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).
    bool open  (AudioConfig &cfg) override;
data/sidplayfp-2.0.3/src/audio/pulse/audiodrv.cpp:46: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).
bool Audio_Pulse::open(AudioConfig &cfg)
data/sidplayfp-2.0.3/src/audio/pulse/audiodrv.h:48: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).
    bool open  (AudioConfig &cfg) override;
data/sidplayfp-2.0.3/src/audio/wav/WavFile.cpp:132:15:  [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 WavFile::open(AudioConfig &cfg)
data/sidplayfp-2.0.3/src/audio/wav/WavFile.cpp:249:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(listHdr.name, title, 32);
data/sidplayfp-2.0.3/src/audio/wav/WavFile.cpp:250:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(listHdr.artist, author, 32);
data/sidplayfp-2.0.3/src/audio/wav/WavFile.cpp:251:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(listHdr.released, released, 32);
data/sidplayfp-2.0.3/src/audio/wav/WavFile.h:34: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/sidplayfp-2.0.3/src/audio/wav/WavFile.h:35: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/sidplayfp-2.0.3/src/audio/wav/WavFile.h:36: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/sidplayfp-2.0.3/src/audio/wav/WavFile.h:41:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char subChunkID[4];                 // 'fmt ' (ASCII)
data/sidplayfp-2.0.3/src/audio/wav/WavFile.h:42: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/sidplayfp-2.0.3/src/audio/wav/WavFile.h:43: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 format[2];            // 1 = PCM, 3 = IEEE float
data/sidplayfp-2.0.3/src/audio/wav/WavFile.h:45: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/sidplayfp-2.0.3/src/audio/wav/WavFile.h:46: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/sidplayfp-2.0.3/src/audio/wav/WavFile.h:47: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/sidplayfp-2.0.3/src/audio/wav/WavFile.h:48: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/sidplayfp-2.0.3/src/audio/wav/WavFile.h:49: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/sidplayfp-2.0.3/src/audio/wav/WavFile.h:51: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/sidplayfp-2.0.3/src/audio/wav/WavFile.h:53: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/sidplayfp-2.0.3/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 mainChunkID[4];                // 'LIST' (ASCII)
data/sidplayfp-2.0.3/src/audio/wav/WavFile.h:60: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];            // chunk length
data/sidplayfp-2.0.3/src/audio/wav/WavFile.h:62: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];                    // 'INFO' (ASCII)
data/sidplayfp-2.0.3/src/audio/wav/WavFile.h:63: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 namChunkID[4];                 // 'INAM' (ASCII)
data/sidplayfp-2.0.3/src/audio/wav/WavFile.h:64: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 namChunkLen[4];                // length of subChunk, always 32 bytes
data/sidplayfp-2.0.3/src/audio/wav/WavFile.h:65: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 name[32];
data/sidplayfp-2.0.3/src/audio/wav/WavFile.h:67: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 artChunkID[4];                 // 'IART' (ASCII)
data/sidplayfp-2.0.3/src/audio/wav/WavFile.h: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 artChunkLen[4];                // length of subChunk, always 32 bytes
data/sidplayfp-2.0.3/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 artist[32];
data/sidplayfp-2.0.3/src/audio/wav/WavFile.h:71: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 copChunkID[4];                 // 'ICOP' (ASCII)
data/sidplayfp-2.0.3/src/audio/wav/WavFile.h: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 copChunkLen[4];                // length of subChunk, always 32 bytes
data/sidplayfp-2.0.3/src/audio/wav/WavFile.h: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 released[32];
data/sidplayfp-2.0.3/src/audio/wav/WavFile.h:113: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).
    bool open(AudioConfig &cfg) override;
data/sidplayfp-2.0.3/src/ini/iniHandler.cpp:67: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).
bool iniHandler::open(const TCHAR *fName)
data/sidplayfp-2.0.3/src/ini/iniHandler.h:69: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).
    bool open(const TCHAR *fName);
data/sidplayfp-2.0.3/src/keyboard.cpp:186: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/sidplayfp-2.0.3/src/keyboard.cpp:268: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/sidplayfp-2.0.3/src/main.cpp:53: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/sidplayfp-2.0.3/src/player.cpp:349: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.device->open(m_driver.cfg))
data/sidplayfp-2.0.3/src/player.cpp:355: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_driver.null.open(m_driver.cfg))
data/sidplayfp-2.0.3/src/player.cpp:509: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/sidplayfp-2.0.3/src/player.cpp:691: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/sidplayfp-2.0.3/src/player.h:215: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).
    bool open  (void);
data/sidplayfp-2.0.3/src/stilview.cpp:304:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char temp[STIL_MAX_PATH_SIZE];
data/sidplayfp-2.0.3/src/utils.cpp:39:5:  [2] (buffer) TCHAR:
  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.
    TCHAR path[MAX_PATH];
data/sidplayfp-2.0.3/src/utils.cpp:49:5:  [2] (buffer) TCHAR:
  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.
    TCHAR szPath[MAX_PATH];
data/sidplayfp-2.0.3/src/IniConfig.cpp:504:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void IniConfig::read()
data/sidplayfp-2.0.3/src/IniConfig.h:104:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read ();
data/sidplayfp-2.0.3/src/args.cpp:538:21:  [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(database) != 0)
data/sidplayfp-2.0.3/src/keyboard.cpp:246:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        read (infd, &ch, 1);
data/sidplayfp-2.0.3/src/menu.cpp:388: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(romDesc) == 0)
data/sidplayfp-2.0.3/src/menu.cpp:405: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(romDesc) == 0)
data/sidplayfp-2.0.3/src/menu.cpp:422: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(romDesc) == 0)
data/sidplayfp-2.0.3/src/player.cpp:89:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            is.read((char*)buffer, size);
data/sidplayfp-2.0.3/src/player.cpp:174:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    m_iniCfg.read ();
data/sidplayfp-2.0.3/src/stilview.cpp:525: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).
            char *tmp = temp+strlen(temp)-1;

ANALYSIS SUMMARY:

Hits = 121
Lines analyzed = 7613 in approximately 0.20 seconds (38195 lines/second)
Physical Source Lines of Code (SLOC) = 5366
Hits@level = [0]   2 [1]  10 [2] 101 [3]   5 [4]   5 [5]   0
Hits@level+ = [0+] 123 [1+] 121 [2+] 111 [3+]  10 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 22.9221 [1+] 22.5494 [2+] 20.6858 [3+] 1.86359 [4+] 0.931793 [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.