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/libmodplug-0.8.9.0/src/load_mt2.cpp Examining data/libmodplug-0.8.9.0/src/fastmix.cpp Examining data/libmodplug-0.8.9.0/src/load_okt.cpp Examining data/libmodplug-0.8.9.0/src/snd_flt.cpp Examining data/libmodplug-0.8.9.0/src/load_pat.h Examining data/libmodplug-0.8.9.0/src/load_mod.cpp Examining data/libmodplug-0.8.9.0/src/load_mid.cpp Examining data/libmodplug-0.8.9.0/src/load_umx.cpp Examining data/libmodplug-0.8.9.0/src/load_far.cpp Examining data/libmodplug-0.8.9.0/src/load_669.cpp Examining data/libmodplug-0.8.9.0/src/tables.h Examining data/libmodplug-0.8.9.0/src/load_wav.cpp Examining data/libmodplug-0.8.9.0/src/load_mtm.cpp Examining data/libmodplug-0.8.9.0/src/load_med.cpp Examining data/libmodplug-0.8.9.0/src/load_amf.cpp Examining data/libmodplug-0.8.9.0/src/load_dbm.cpp Examining data/libmodplug-0.8.9.0/src/load_mdl.cpp Examining data/libmodplug-0.8.9.0/src/load_abc.cpp Examining data/libmodplug-0.8.9.0/src/load_psm.cpp Examining data/libmodplug-0.8.9.0/src/snd_fx.cpp Examining data/libmodplug-0.8.9.0/src/modplug.h Examining data/libmodplug-0.8.9.0/src/load_ams.cpp Examining data/libmodplug-0.8.9.0/src/sndfile.cpp Examining data/libmodplug-0.8.9.0/src/load_stm.cpp Examining data/libmodplug-0.8.9.0/src/load_dmf.cpp Examining data/libmodplug-0.8.9.0/src/libmodplug/sndfile.h Examining data/libmodplug-0.8.9.0/src/libmodplug/stdafx.h Examining data/libmodplug-0.8.9.0/src/libmodplug/it_defs.h Examining data/libmodplug-0.8.9.0/src/load_ptm.cpp Examining data/libmodplug-0.8.9.0/src/load_pat.cpp Examining data/libmodplug-0.8.9.0/src/modplug.cpp Examining data/libmodplug-0.8.9.0/src/snd_dsp.cpp Examining data/libmodplug-0.8.9.0/src/mmcmp.cpp Examining data/libmodplug-0.8.9.0/src/load_s3m.cpp Examining data/libmodplug-0.8.9.0/src/load_dsm.cpp Examining data/libmodplug-0.8.9.0/src/sndmix.cpp Examining data/libmodplug-0.8.9.0/src/load_j2b.cpp Examining data/libmodplug-0.8.9.0/src/load_it.cpp Examining data/libmodplug-0.8.9.0/src/load_ult.cpp Examining data/libmodplug-0.8.9.0/src/load_xm.cpp FINAL RESULTS: data/libmodplug-0.8.9.0/src/libmodplug/stdafx.h:99:9: [4] (buffer) lstrcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. #define lstrcpy strcpy data/libmodplug-0.8.9.0/src/libmodplug/stdafx.h:99:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). #define lstrcpy strcpy data/libmodplug-0.8.9.0/src/libmodplug/stdafx.h:101:18: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #define wsprintf sprintf data/libmodplug-0.8.9.0/src/load_abc.cpp:264:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "%s=%s", name, value); data/libmodplug-0.8.9.0/src/load_abc.cpp:318:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(txt, s1, s2); data/libmodplug-0.8.9.0/src/load_abc.cpp:2220:4: [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(p,s); data/libmodplug-0.8.9.0/src/load_abc.cpp:2233:4: [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(t, m->name); data/libmodplug-0.8.9.0/src/load_abc.cpp:2721:3: [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(chordname[chordsnamed], s); data/libmodplug-0.8.9.0/src/load_abc.cpp:3556:3: [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(p2,p1); data/libmodplug-0.8.9.0/src/load_abc.cpp:3557:3: [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(p2,pm); data/libmodplug-0.8.9.0/src/load_abc.cpp:3775:7: [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(buf,m_szNames[0]); data/libmodplug-0.8.9.0/src/load_abc.cpp:3780:7: [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(m_szNames[0], buf); data/libmodplug-0.8.9.0/src/load_abc.cpp:3800:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(barsig, "%s%s", sig[abckey], sig[abckey]); // reset the key signature data/libmodplug-0.8.9.0/src/load_abc.cpp:3882:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(barsig, "%s%s", sig[abckey], sig[abckey]); // reset the key signature data/libmodplug-0.8.9.0/src/load_abc.cpp:3893:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(barsig, "%s%s", sig[abckey], sig[abckey]); // reset the key signature data/libmodplug-0.8.9.0/src/load_abc.cpp:3922:7: [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(buf,m_szNames[0]); data/libmodplug-0.8.9.0/src/load_abc.cpp:3925:7: [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(buf, p+t); data/libmodplug-0.8.9.0/src/load_abc.cpp:3927:7: [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(m_szNames[0], buf); data/libmodplug-0.8.9.0/src/load_abc.cpp:4089:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(barsig, "%s%s", sig[abckey], sig[abckey]); // reset the key signature data/libmodplug-0.8.9.0/src/load_abc.cpp:4099:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(barsig, "%s%s", sig[abckey], sig[abckey]); // reset the key signature data/libmodplug-0.8.9.0/src/load_abc.cpp:4361:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(barsig, "%s%s", sig[abckey], sig[abckey]); // reset the key signature data/libmodplug-0.8.9.0/src/load_abc.cpp:4732:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(barsig, "%s%s", sig[abckey], sig[abckey]); // reset the key signature data/libmodplug-0.8.9.0/src/load_mid.cpp:213:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(txt, s1, s2); data/libmodplug-0.8.9.0/src/load_mid.cpp:1430:11: [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(m_szNames[0], buf); data/libmodplug-0.8.9.0/src/load_pat.cpp:166:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(txt, s1, s2); data/libmodplug-0.8.9.0/src/load_pat.cpp:446:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(midipat[i], q); data/libmodplug-0.8.9.0/src/load_pat.cpp:454:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(midipat[i], q); data/libmodplug-0.8.9.0/src/load_pat.cpp:467:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fname, "%s%c%s", isabspath ? "" : pathforpat, DIRDELIM, patfile); data/libmodplug-0.8.9.0/src/load_pat.cpp:471:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fname, "%s%c%s.pat", isabspath ? "" : pathforpat, DIRDELIM, patfile); data/libmodplug-0.8.9.0/src/load_pat.cpp:1031:2: [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((char *)d->name, s); data/libmodplug-0.8.9.0/src/load_pat.cpp:1035:2: [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((char *)d->filename, s); data/libmodplug-0.8.9.0/src/load_pat.cpp:1063:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%d:%s", smp-1, midipat[gm-1]); data/libmodplug-0.8.9.0/src/load_pat.cpp:1157:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf,"%s canon %d-v (Fr. Jacques)", h->patname, h->samples); data/libmodplug-0.8.9.0/src/load_pat.cpp:1161:2: [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(m_szNames[0], buf); data/libmodplug-0.8.9.0/src/load_pat.cpp:1188:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s", h->patname); data/libmodplug-0.8.9.0/src/load_pat.cpp:1191:3: [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((char *)d->name, s); data/libmodplug-0.8.9.0/src/load_pat.cpp:1194:3: [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((char *)d->filename, s); data/libmodplug-0.8.9.0/src/load_pat.cpp:1210:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%d:%s", t, hw.wave_name); data/libmodplug-0.8.9.0/src/load_pat.cpp:1213:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%d:%s", t, h->patname); data/libmodplug-0.8.9.0/src/load_pat.cpp:1219:3: [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(m_szNames[t], s); data/libmodplug-0.8.9.0/src/load_umx.cpp:179:2: [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(out, (hdr->file_version >= 64)? &buf[1] : buf); data/libmodplug-0.8.9.0/src/load_xm.cpp:607:2: [4] (buffer) lstrcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. lstrcpy((LPSTR)&s[1], (nPacking) ? "MOD Plugin packed " : "FastTracker v2.00 "); data/libmodplug-0.8.9.0/src/sndfile.cpp:798: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). if (s) strcpy(s, sztmp); data/libmodplug-0.8.9.0/src/sndfile.cpp:815: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). if (s) strcpy(s, sztmp); data/libmodplug-0.8.9.0/src/libmodplug/stdafx.h:43:9: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define srandom(_seed) srand(_seed) data/libmodplug-0.8.9.0/src/libmodplug/stdafx.h:43:25: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define srandom(_seed) srand(_seed) data/libmodplug-0.8.9.0/src/libmodplug/stdafx.h:44:9: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define random() rand() data/libmodplug-0.8.9.0/src/load_abc.cpp:2362:6: [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. p = getenv(ABC_ENV_NORANDOMPICK); data/libmodplug-0.8.9.0/src/load_abc.cpp:2373:3: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom((uint32_t)time(0)); // initialize random generator with seed data/libmodplug-0.8.9.0/src/load_abc.cpp:2374:40: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. retval->pickrandom = 1+(int)(10000.0*random()/(RAND_MAX+1.0)); data/libmodplug-0.8.9.0/src/load_abc.cpp:4807:9: [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. if( (p=getenv(ABC_ENV_DUMPTRACKS)) ) { data/libmodplug-0.8.9.0/src/load_mid.cpp:1188:13: [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. h->debug = getenv(ENV_MMMID_DEBUG); data/libmodplug-0.8.9.0/src/load_mid.cpp:1189: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. h->verbose = getenv(ENV_MMMID_VERBOSE); data/libmodplug-0.8.9.0/src/load_mid.cpp:1213:14: [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. p = (BYTE *)getenv(ENV_MMMID_SPEED); data/libmodplug-0.8.9.0/src/load_pat.cpp:366:6: [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. p = getenv(PAT_ENV_PATH2CFG); data/libmodplug-0.8.9.0/src/libmodplug/sndfile.h:441: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 szName[MAX_CHANNELNAME]; // changed from CHAR data/libmodplug-0.8.9.0/src/libmodplug/sndfile.h:526: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 szMidiGlb[9*32]; // changed from CHAR data/libmodplug-0.8.9.0/src/libmodplug/sndfile.h:527: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 szMidiSFXExt[16*32]; // changed from CHAR data/libmodplug-0.8.9.0/src/libmodplug/sndfile.h:528: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 szMidiZXXExt[128*32]; // changed from CHAR data/libmodplug-0.8.9.0/src/libmodplug/sndfile.h:590: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 m_szNames[MAX_INSTRUMENTS][32]; // changed from CHAR data/libmodplug-0.8.9.0/src/load_669.cpp:20:16: [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. signed char songmessage[108]; // Song Message data/libmodplug-0.8.9.0/src/load_669.cpp:77:2: [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(m_szNames[0], pfh->songmessage, 16); data/libmodplug-0.8.9.0/src/load_669.cpp:92: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(m_szNames[nins], psmp->filename, 13); data/libmodplug-0.8.9.0/src/load_669.cpp:99:2: [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(m_lpszSongComments, pfh->songmessage, 108); data/libmodplug-0.8.9.0/src/load_669.cpp:102:2: [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(Order, pfh->orders, 128); data/libmodplug-0.8.9.0/src/load_abc.cpp:162: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 v[22]; // first twenty characters are significant data/libmodplug-0.8.9.0/src/load_abc.cpp:184: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 gchord[80]; // last setting for gchord data/libmodplug-0.8.9.0/src/load_abc.cpp:185: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 drum[80]; // last setting for drum data/libmodplug-0.8.9.0/src/load_abc.cpp:186: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 drumins[80]; // last setting for drum data/libmodplug-0.8.9.0/src/load_abc.cpp:187: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 drumvol[80]; // last setting for drum data/libmodplug-0.8.9.0/src/load_abc.cpp:206:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char chordname[MAXCHORDNAMES][8]; data/libmodplug-0.8.9.0/src/load_abc.cpp:316: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 txt[256]; data/libmodplug-0.8.9.0/src/load_abc.cpp:345: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 nn[3]; data/libmodplug-0.8.9.0/src/load_abc.cpp:396:10: [2] (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). Risk is low because the source is a constant string. else strcpy(nn,"--"); data/libmodplug-0.8.9.0/src/load_abc.cpp:411:31: [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). #define _mm_fopen(name,mode) fopen(name,mode) data/libmodplug-0.8.9.0/src/load_abc.cpp:436:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(name, mode); data/libmodplug-0.8.9.0/src/load_abc.cpp:549: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 key[256], value[256]; data/libmodplug-0.8.9.0/src/load_abc.cpp:565: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 key[256], value[256]; data/libmodplug-0.8.9.0/src/load_abc.cpp:826: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 vc[21]; data/libmodplug-0.8.9.0/src/load_abc.cpp:904: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 d[6]; data/libmodplug-0.8.9.0/src/load_abc.cpp:916: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 d[6]; data/libmodplug-0.8.9.0/src/load_abc.cpp:927: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 d[6]; data/libmodplug-0.8.9.0/src/load_abc.cpp:938: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 d[6]; data/libmodplug-0.8.9.0/src/load_abc.cpp:949: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 d[6]; data/libmodplug-0.8.9.0/src/load_abc.cpp:1127: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 d[6]; data/libmodplug-0.8.9.0/src/load_abc.cpp:1138: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 d[6]; data/libmodplug-0.8.9.0/src/load_abc.cpp:1150: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 d[6]; data/libmodplug-0.8.9.0/src/load_abc.cpp:1251: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 d[6]; data/libmodplug-0.8.9.0/src/load_abc.cpp:1413: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 d[6]; data/libmodplug-0.8.9.0/src/load_abc.cpp:1457: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 d[6]; data/libmodplug-0.8.9.0/src/load_abc.cpp:1474: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 d[6]; data/libmodplug-0.8.9.0/src/load_abc.cpp:1475: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 s[8]; data/libmodplug-0.8.9.0/src/load_abc.cpp:1537: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 d[6]; data/libmodplug-0.8.9.0/src/load_abc.cpp:1557: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 d[8]; data/libmodplug-0.8.9.0/src/load_abc.cpp:1569: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 d[6]; data/libmodplug-0.8.9.0/src/load_abc.cpp:1985:47: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static uint32_t abc_fade_tracks(ABCHANDLE *h, char *abcparts, uint32_t ptt[27]) data/libmodplug-0.8.9.0/src/load_abc.cpp:2020:45: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static void abc_song_to_parts(ABCHANDLE *h, char **abcparts, BYTE partp[27][2]) data/libmodplug-0.8.9.0/src/load_abc.cpp:2027: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 buf[256]; // must be enough, mod's cannot handle more than 240 patterns data/libmodplug-0.8.9.0/src/load_abc.cpp:2318: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 id[128]; data/libmodplug-0.8.9.0/src/load_abc.cpp:2350: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 buf[10]; data/libmodplug-0.8.9.0/src/load_abc.cpp:2365: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). retval->pickrandom = atoi(p); data/libmodplug-0.8.9.0/src/load_abc.cpp:2367: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). retval->pickrandom = atoi(p+1)-1; // xmms preloads the file data/libmodplug-0.8.9.0/src/load_abc.cpp:2368:4: [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(buf,"-%ld",retval->pickrandom+2); data/libmodplug-0.8.9.0/src/load_abc.cpp:2376: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(buf,"-%ld",retval->pickrandom); // xmms preloads the file data/libmodplug-0.8.9.0/src/load_abc.cpp:2646: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 c[8] = {}; // initialize all to zero. data/libmodplug-0.8.9.0/src/load_abc.cpp:2660:3: [2] (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). Risk is low because the source is a constant string. strcpy(c,"Bm"); // two sharps at c and f data/libmodplug-0.8.9.0/src/load_abc.cpp:2941: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 name[20]; data/libmodplug-0.8.9.0/src/load_abc.cpp:3573: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 barsig[52]; // for propagated accidental key signature within bar data/libmodplug-0.8.9.0/src/load_abc.cpp:3690:4: [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 blankline[3] = "%%"; data/libmodplug-0.8.9.0/src/load_abc.cpp:3704: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). abcxnumber = atoi(p); data/libmodplug-0.8.9.0/src/load_abc.cpp:3770: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 buf[200]; data/libmodplug-0.8.9.0/src/load_abc.cpp:3917: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 buf[200]; data/libmodplug-0.8.9.0/src/load_abc.cpp:4763: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 buf[10]; data/libmodplug-0.8.9.0/src/load_abc.cpp:4764: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(buf,"%u",abcxnumber); data/libmodplug-0.8.9.0/src/load_amf.cpp:80:48: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if ((rowsrc >= 0) && (rowsrc < (int)nRows)) memcpy(m, &pPat[rowsrc*nChannels],sizeof(pPat[rowsrc*nChannels])); data/libmodplug-0.8.9.0/src/load_amf.cpp:199:4: [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(m_szNames[iSmp+1], lpStream+dwMemPos, 22); data/libmodplug-0.8.9.0/src/load_amf.cpp:273:2: [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(m_szNames[0], pfh->title, 32); data/libmodplug-0.8.9.0/src/load_amf.cpp:336: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(m_szNames[iIns+1], psh->samplename, 32); data/libmodplug-0.8.9.0/src/load_amf.cpp:338: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(pins->name, psh->filename, 13); data/libmodplug-0.8.9.0/src/load_ams.cpp:19: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 szHeader[7]; // "Extreme" // changed from CHAR data/libmodplug-0.8.9.0/src/load_ams.cpp:87:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (tmp2) memcpy(m_szNames[0], lpStream+dwMemPos, tmp2); data/libmodplug-0.8.9.0/src/load_ams.cpp:96:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (tmp2) memcpy(m_szNames[sNam], lpStream+dwMemPos, tmp2); data/libmodplug-0.8.9.0/src/load_ams.cpp:116:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (tmp2) memcpy(m_lpszPatternNames+pNam*32, lpStream+dwMemPos, tmp2); data/libmodplug-0.8.9.0/src/load_ams.cpp:128: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(m_lpszSongComments, lpStream + dwMemPos, tmp); data/libmodplug-0.8.9.0/src/load_ams.cpp:328: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(m_szNames, pfh->szTitle, pfh->titlelen); data/libmodplug-0.8.9.0/src/load_ams.cpp:370:4: [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(penv->name, pinsname, insnamelen); data/libmodplug-0.8.9.0/src/load_ams.cpp:405: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(m_szNames[smpmap[ismp]], lpStream+dwMemPos+1, smpnamelen); data/libmodplug-0.8.9.0/src/load_ams.cpp:436: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(m_lpszSongComments, lpStream+dwMemPos+1, composernamelen); data/libmodplug-0.8.9.0/src/load_ams.cpp:447: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(ChnSettings[i].szName, lpStream+dwMemPos+1, chnnamlen); data/libmodplug-0.8.9.0/src/load_ams.cpp:484: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[MAX_PATTERNNAME]; // changed from CHAR data/libmodplug-0.8.9.0/src/load_ams.cpp:485: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(s, lpStream+dwMemPos+3, patnamlen); data/libmodplug-0.8.9.0/src/load_dbm.cpp:118:2: [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(m_szNames[0], (pfh->songname[0]) ? pfh->songname : pfh->songname2, 32); data/libmodplug-0.8.9.0/src/load_dbm.cpp:153: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(penv->name, pih->name, 30); data/libmodplug-0.8.9.0/src/load_dbm.cpp:156:6: [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(m_szNames[nsmp], pih->name, 30); data/libmodplug-0.8.9.0/src/load_dmf.cpp:99:2: [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(m_szNames[0], pfh->songname, 30); data/libmodplug-0.8.9.0/src/load_dmf.cpp:396:8: [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(m_szNames[iSmp], lpStream+dwPos+1, rlen); data/libmodplug-0.8.9.0/src/load_dsm.cpp:122:2: [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(m_szNames[0], psong->songname, 28); data/libmodplug-0.8.9.0/src/load_dsm.cpp:215:4: [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(m_szNames[nSmp], pins->samplename, 28); data/libmodplug-0.8.9.0/src/load_dsm.cpp:217:4: [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(psmp->name, pins->filename, 13); data/libmodplug-0.8.9.0/src/load_far.cpp:82:2: [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(m_szNames[0], pmh1->songname, 32); data/libmodplug-0.8.9.0/src/load_far.cpp:97:4: [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(m_lpszSongComments, lpStream+dwMemPos, szLen); data/libmodplug-0.8.9.0/src/load_far.cpp:229:2: [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(samplemap, lpStream+dwMemPos, 8); data/libmodplug-0.8.9.0/src/load_far.cpp:238: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(m_szNames[ismp+1], pfs->samplename, 32); data/libmodplug-0.8.9.0/src/load_it.cpp:44: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(penv->name, pis->name, 26); data/libmodplug-0.8.9.0/src/load_it.cpp:45: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(penv->filename, pis->filename, 12); data/libmodplug-0.8.9.0/src/load_it.cpp:79: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(penv->name, pis->name, 26); data/libmodplug-0.8.9.0/src/load_it.cpp:80: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(penv->filename, pis->filename, 12); data/libmodplug-0.8.9.0/src/load_it.cpp:196:2: [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(m_szNames[0], pifh.songname, 26); data/libmodplug-0.8.9.0/src/load_it.cpp:225:4: [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(m_lpszSongComments, lpStream+pifh.msgoffset, pifh.msglength); data/libmodplug-0.8.9.0/src/load_it.cpp:232:2: [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(Order, lpStream+dwMemPos, nordsize); data/libmodplug-0.8.9.0/src/load_it.cpp:239:2: [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(inspos, lpStream+dwMemPos, inspossize); data/libmodplug-0.8.9.0/src/load_it.cpp:250:2: [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(smppos, lpStream+dwMemPos, smppossize); data/libmodplug-0.8.9.0/src/load_it.cpp:261:2: [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(patpos, lpStream+dwMemPos, patpossize); data/libmodplug-0.8.9.0/src/load_it.cpp:279:4: [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(&m_MidiCfg, lpStream+dwMemPos, sizeof(MODMIDICFG)); data/libmodplug-0.8.9.0/src/load_it.cpp:294: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(m_lpszPatternNames, lpStream+dwMemPos, len); data/libmodplug-0.8.9.0/src/load_it.cpp:312: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(ChnSettings[i].szName, (lpStream+dwMemPos+i*MAX_CHANNELNAME), MAX_CHANNELNAME); data/libmodplug-0.8.9.0/src/load_it.cpp:403:4: [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(pins->name, pis.filename, 12); data/libmodplug-0.8.9.0/src/load_it.cpp:450: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(m_szNames[nsmp+1], pis.name, 26); data/libmodplug-0.8.9.0/src/load_it.cpp:620:31: [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 ((!lpszFileName) || ((f = fopen(lpszFileName, "wb")) == NULL)) return FALSE; data/libmodplug-0.8.9.0/src/load_it.cpp:698:2: [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(&writeheader, &header, sizeof(header)); data/libmodplug-0.8.9.0/src/load_it.cpp:785:4: [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(iti.filename, penv->filename, 12); data/libmodplug-0.8.9.0/src/load_it.cpp:786:4: [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(iti.name, penv->name, 26); data/libmodplug-0.8.9.0/src/load_it.cpp:873: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(&writeiti, &iti, sizeof(ITINSTRUMENT)); data/libmodplug-0.8.9.0/src/load_it.cpp:1050: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(itss.filename, psmp->name, 12); data/libmodplug-0.8.9.0/src/load_it.cpp:1051: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(itss.name, m_szNames[nsmp], 26); data/libmodplug-0.8.9.0/src/load_it.cpp:1417: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(&writePluginInfo, &p->Info, sizeof(SNDMIXPLUGININFO)); data/libmodplug-0.8.9.0/src/load_it.cpp:1512: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(m_MixPlugins[nPlugin].pPluginData, p+nPos+8+sizeof(SNDMIXPLUGININFO)+4, dwExtra); data/libmodplug-0.8.9.0/src/load_mdl.cpp:216:4: [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(m_szNames[0], pmib->songname, 32); data/libmodplug-0.8.9.0/src/load_mdl.cpp:244:6: [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(m_lpszSongComments, lpStream+dwMemPos, blocklen); data/libmodplug-0.8.9.0/src/load_mdl.cpp:301:6: [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(penv->name, lpStream+dwPos+2, 32); data/libmodplug-0.8.9.0/src/load_mdl.cpp:374: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(m_szNames[nins], lpStream+dwPos+1, 32); data/libmodplug-0.8.9.0/src/load_mdl.cpp:376: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(pins->name, lpStream+dwPos+33, 8); data/libmodplug-0.8.9.0/src/load_med.cpp:637: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(Order, pmsh->playseq, nbo); data/libmodplug-0.8.9.0/src/load_med.cpp:673:27: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (!m_szNames[0][0]) memcpy(m_szNames[0], pmps->name, 31); data/libmodplug-0.8.9.0/src/load_med.cpp:709:4: [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(m_lpszSongComments, lpStream+annotxt, annolen); data/libmodplug-0.8.9.0/src/load_med.cpp:719:4: [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(m_szNames[0], lpStream+songname, songnamelen); data/libmodplug-0.8.9.0/src/load_mid.cpp:140:2: [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(buf, &mmfile->mm[mmfile->pos], sz); data/libmodplug-0.8.9.0/src/load_mid.cpp:146:2: [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(buf, &mmfile->mm[mmfile->pos], sz); data/libmodplug-0.8.9.0/src/load_mid.cpp:211: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 txt[256]; data/libmodplug-0.8.9.0/src/load_mid.cpp:748: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 id[5]; data/libmodplug-0.8.9.0/src/load_mid.cpp:1077: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 info[32]; data/libmodplug-0.8.9.0/src/load_mid.cpp:1078: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(info,"%ld > %ld note %d", (long)ton, (long)toff, n); data/libmodplug-0.8.9.0/src/load_mid.cpp:1131: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 info[40]; data/libmodplug-0.8.9.0/src/load_mid.cpp:1132: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(info,"channel %d, %ld > %ld note %d", tp->chan + 1, (long)ton, (long)toff, n); data/libmodplug-0.8.9.0/src/load_mid.cpp:1166: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 buf[256]; data/libmodplug-0.8.9.0/src/load_mid.cpp:1449:11: [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(buf, "%u", miditracklen); data/libmodplug-0.8.9.0/src/load_mod.cpp:166: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 Magic[4]; // changed from CHAR data/libmodplug-0.8.9.0/src/load_mod.cpp:196: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 s[1024]; // changed from CHAR data/libmodplug-0.8.9.0/src/load_mod.cpp:207:2: [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(s, pMagic->Magic, 4); data/libmodplug-0.8.9.0/src/load_mod.cpp:241: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(m_szNames[i], pms->name, 22); data/libmodplug-0.8.9.0/src/load_mod.cpp:288:2: [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(Order, pMagic->Orders, 128); data/libmodplug-0.8.9.0/src/load_mod.cpp:336:2: [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(m_szNames, lpStream, 20); data/libmodplug-0.8.9.0/src/load_mod.cpp:413:11: [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 ((f = fopen(lpszFileName, "wb")) == NULL) return FALSE; data/libmodplug-0.8.9.0/src/load_mod.cpp:437: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(bTab, m_szNames[iins],22); data/libmodplug-0.8.9.0/src/load_mod.cpp:467:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (norders) memcpy(ord, Order, norders); data/libmodplug-0.8.9.0/src/load_mod.cpp:471:3: [2] (buffer) lstrcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. lstrcpy((LPSTR)&bTab, "M.K."); data/libmodplug-0.8.9.0/src/load_mt2.cpp:211:2: [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(m_szNames[0], pfh->szSongName, 32); data/libmodplug-0.8.9.0/src/load_mt2.cpp:242: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(s, &dwId, 4); data/libmodplug-0.8.9.0/src/load_mt2.cpp:257:6: [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(m_lpszSongComments, lpStream+dwMemPos+1, nTxtLen-1); data/libmodplug-0.8.9.0/src/load_mt2.cpp:410: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(penv->name, pmi->szName, 32); data/libmodplug-0.8.9.0/src/load_mt2.cpp:541:4: [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(m_szNames[iSmp], pms->szName, 32); data/libmodplug-0.8.9.0/src/load_mtm.cpp:20: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 samplename[22]; // changed from CHAR data/libmodplug-0.8.9.0/src/load_mtm.cpp:32: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 id[4]; // MTM file marker + version // changed from CHAR data/libmodplug-0.8.9.0/src/load_mtm.cpp:33: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 songname[20]; // ASCIIZ songname // changed from CHAR data/libmodplug-0.8.9.0/src/load_mtm.cpp:107:2: [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(Order, lpStream + dwMemPos, pmh->lastorder+1); data/libmodplug-0.8.9.0/src/load_mtm.cpp:145:4: [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(m_lpszSongComments, lpStream+dwMemPos, n); data/libmodplug-0.8.9.0/src/load_okt.cpp:68:4: [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(m_szNames[smp], psmp->name, 20); data/libmodplug-0.8.9.0/src/load_pat.cpp:63:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char midipat[MAXSMP][PATH_MAX]; data/libmodplug-0.8.9.0/src/load_pat.cpp:64:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char pathforpat[PATH_MAX] = {}; data/libmodplug-0.8.9.0/src/load_pat.cpp:65:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char timiditycfg[PATH_MAX] = {}; data/libmodplug-0.8.9.0/src/load_pat.cpp:70: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 header[12]; // ascizz GF1PATCH110 data/libmodplug-0.8.9.0/src/load_pat.cpp:71: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 gravis_id[10]; // allways ID#000002 data/libmodplug-0.8.9.0/src/load_pat.cpp:72: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 description[60]; data/libmodplug-0.8.9.0/src/load_pat.cpp:79: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 reserved[36]; data/libmodplug-0.8.9.0/src/load_pat.cpp:84: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 instrument_name[16]; data/libmodplug-0.8.9.0/src/load_pat.cpp:87: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 reserved[40]; data/libmodplug-0.8.9.0/src/load_pat.cpp:95: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 reserved[40]; data/libmodplug-0.8.9.0/src/load_pat.cpp:99: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 wave_name[7]; data/libmodplug-0.8.9.0/src/load_pat.cpp:121: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 reserved[32]; data/libmodplug-0.8.9.0/src/load_pat.cpp:148: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 patname[16]; data/libmodplug-0.8.9.0/src/load_pat.cpp:164: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 txt[256]; data/libmodplug-0.8.9.0/src/load_pat.cpp:217: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. static char buf[40]; data/libmodplug-0.8.9.0/src/load_pat.cpp:219: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(buf, "invalid gm %d", gm); data/libmodplug-0.8.9.0/src/load_pat.cpp:280:32: [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). #define _mm_fopen(name,mode) fopen(name,mode) data/libmodplug-0.8.9.0/src/load_pat.cpp:333:2: [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(buf, &mmfile->mm[mmfile->pos], sztr); data/libmodplug-0.8.9.0/src/load_pat.cpp:345:2: [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(buf, &mmfile->mm[mmfile->pos], sz); data/libmodplug-0.8.9.0/src/load_pat.cpp:361: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 line[PATH_MAX]; data/libmodplug-0.8.9.0/src/load_pat.cpp:362: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 cfgsources[5][PATH_MAX] = {{0}, {0}, {0}, {0}, {0}}; data/libmodplug-0.8.9.0/src/load_pat.cpp:370:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(timiditycfg, "/timidity.cfg"); data/libmodplug-0.8.9.0/src/load_pat.cpp:371:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(pathforpat, "/instruments"); data/libmodplug-0.8.9.0/src/load_pat.cpp:393:9: [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). i = atoi(p); data/libmodplug-0.8.9.0/src/load_pat.cpp:468:3: [2] (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). Risk is low because the source is a constant string. strcpy(strrchr(fname, ':'), ".pat"); data/libmodplug-0.8.9.0/src/load_pat.cpp:604: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 fname[128]; data/libmodplug-0.8.9.0/src/load_pat.cpp:676:9: [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). return atoi(strchr(p,'=')+1); data/libmodplug-0.8.9.0/src/load_pat.cpp:685: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 fname[128]; data/libmodplug-0.8.9.0/src/load_pat.cpp:759:2: [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((BYTE *)&ph, lpStream, sizeof(PatchHeader)); data/libmodplug-0.8.9.0/src/load_pat.cpp:998: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 s[32]; data/libmodplug-0.8.9.0/src/load_pat.cpp:1062: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 s[256]; data/libmodplug-0.8.9.0/src/load_pat.cpp:1125:2: [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(of->Headers[0], of->Headers[t], sizeof(INSTRUMENTHEADER)); data/libmodplug-0.8.9.0/src/load_pat.cpp:1129:2: [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(&of->Ins[0], &of->Ins[t], sizeof(MODINSTRUMENT)); data/libmodplug-0.8.9.0/src/load_pat.cpp:1137: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 buf[60]; data/libmodplug-0.8.9.0/src/load_pat.cpp:1159: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(buf,"%d-voice canon (Fr. Jacques)", h->samples); data/libmodplug-0.8.9.0/src/load_pat.cpp:1181: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 s[32]; data/libmodplug-0.8.9.0/src/load_pat.cpp:1200: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 s[32]; data/libmodplug-0.8.9.0/src/load_pat.cpp:1215: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:Untitled GM patch", t); data/libmodplug-0.8.9.0/src/load_pat.cpp:1241:2: [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(Headers[0], Headers[t], sizeof(INSTRUMENTHEADER)); data/libmodplug-0.8.9.0/src/load_pat.cpp:1244:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. strncpy((char *)Headers[0]->name, h->patname, 32); data/libmodplug-0.8.9.0/src/load_pat.cpp:1246:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. strncpy((char *)Headers[0]->name, "Timidity GM patch", 32); data/libmodplug-0.8.9.0/src/load_pat.cpp:1248:2: [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(&Ins[0], &Ins[t], sizeof(MODINSTRUMENT)); data/libmodplug-0.8.9.0/src/load_psm.cpp:146:4: [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(m_szNames[0], pdata, (len>31) ? 31 : len); data/libmodplug-0.8.9.0/src/load_psm.cpp:172: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(m_szNames[m_nSamples], psmp->samplename, 31); data/libmodplug-0.8.9.0/src/load_ptm.cpp:53: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 samplename[28]; // name of sample, asciiz // changed from CHAR data/libmodplug-0.8.9.0/src/load_ptm.cpp:94:2: [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(m_szNames[0], pfh.songname, 28); data/libmodplug-0.8.9.0/src/load_ptm.cpp:101:2: [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(Order, pfh.orders, nOrders); data/libmodplug-0.8.9.0/src/load_ptm.cpp:113: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(pins->name, psmp->filename, 12); data/libmodplug-0.8.9.0/src/load_s3m.cpp:220:2: [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(m_szNames[0], psfh.name, 28); data/libmodplug-0.8.9.0/src/load_s3m.cpp:257: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(Order, lpStream+dwMemPos, iord); data/libmodplug-0.8.9.0/src/load_s3m.cpp:274: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(ptr, lpStream+dwMemPos, 2*(nins+npat)); data/libmodplug-0.8.9.0/src/load_s3m.cpp:301: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(&pSmp, lpStream+nInd, 0x50); data/libmodplug-0.8.9.0/src/load_s3m.cpp:302: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(Ins[iSmp].name, &pSmp.dosname, 12); data/libmodplug-0.8.9.0/src/load_s3m.cpp:305: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(m_szNames[iSmp], pSmp.name, 28); data/libmodplug-0.8.9.0/src/load_s3m.cpp:440:11: [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 ((f = fopen(lpszFileName, "wb")) == NULL) return FALSE; data/libmodplug-0.8.9.0/src/load_s3m.cpp:444:2: [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(header, m_szNames[0], 0x1C); data/libmodplug-0.8.9.0/src/load_s3m.cpp:604: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(insex[i-1].dosname, pins->name, 12); data/libmodplug-0.8.9.0/src/load_s3m.cpp:605: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(insex[i-1].name, m_szNames[i], 28); data/libmodplug-0.8.9.0/src/load_s3m.cpp:606: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(insex[i-1].scrs, "SCRS", 4); data/libmodplug-0.8.9.0/src/load_stm.cpp:41: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 songname[20]; // changed from CHAR data/libmodplug-0.8.9.0/src/load_stm.cpp:42: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 trackername[8]; // !SCREAM! for ST 2.xx // changed from CHAR data/libmodplug-0.8.9.0/src/load_stm.cpp:69:2: [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(m_szNames[0], phdr->songname, 20); data/libmodplug-0.8.9.0/src/load_stm.cpp:82:2: [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(Order, phdr->patorder, 128); data/libmodplug-0.8.9.0/src/load_stm.cpp:95: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(pIns->name, pStm->filename, 13); data/libmodplug-0.8.9.0/src/load_stm.cpp:96: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(m_szNames[nIns+1], pStm->filename, 12); data/libmodplug-0.8.9.0/src/load_ult.cpp:21: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 id[15]; // changed from CHAR data/libmodplug-0.8.9.0/src/load_ult.cpp:22: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 songtitle[32]; // changed from CHAR data/libmodplug-0.8.9.0/src/load_ult.cpp:60:2: [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(m_szNames[0], pmh->songtitle, 32); data/libmodplug-0.8.9.0/src/load_ult.cpp:72: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(m_lpszSongComments+l*33, lpStream+dwMemPos+l*32, 32); data/libmodplug-0.8.9.0/src/load_ult.cpp:90: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(m_szNames[ins], pus->samplename, 32); data/libmodplug-0.8.9.0/src/load_ult.cpp:92: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(pins->name, pus->dosname, 12); data/libmodplug-0.8.9.0/src/load_ult.cpp:112:2: [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(Order, lpStream+dwMemPos, 256); data/libmodplug-0.8.9.0/src/load_umx.cpp:141: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 buf[40]; data/libmodplug-0.8.9.0/src/load_umx.cpp:144:2: [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(buf, membase + *ofs, 40); data/libmodplug-0.8.9.0/src/load_umx.cpp:163: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 buf[64]; data/libmodplug-0.8.9.0/src/load_umx.cpp:168: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(buf, membase + hdr->name_offset + l, 63); data/libmodplug-0.8.9.0/src/load_umx.cpp:189: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 buf[64]; data/libmodplug-0.8.9.0/src/load_umx.cpp:198:2: [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(buf, membase + hdr->export_offset, s); data/libmodplug-0.8.9.0/src/load_umx.cpp:283: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 header[UPKG_HDR_SIZE]; data/libmodplug-0.8.9.0/src/load_umx.cpp:285:2: [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(header, membase, UPKG_HDR_SIZE); data/libmodplug-0.8.9.0/src/load_xm.cpp:70: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 name[22]; data/libmodplug-0.8.9.0/src/load_xm.cpp:94:2: [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(m_szNames[0], lpStream+17, 20); data/libmodplug-0.8.9.0/src/load_xm.cpp:122:2: [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(Order, lpStream+80, norders); data/libmodplug-0.8.9.0/src/load_xm.cpp:290: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(Headers[iIns]->name, pih->name, 22); data/libmodplug-0.8.9.0/src/load_xm.cpp:294:4: [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(&xmsh, lpStream+dwMemPos+sizeof(XMINSTRUMENTHEADER), sizeof(XMSAMPLEHEADER)); data/libmodplug-0.8.9.0/src/load_xm.cpp:470:4: [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(m_szNames[imapsmp], xmss.name, 22); data/libmodplug-0.8.9.0/src/load_xm.cpp:499:4: [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(pins->name, xmss.name, 22); data/libmodplug-0.8.9.0/src/load_xm.cpp:528: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(m_lpszSongComments, lpStream+dwMemPos, len); data/libmodplug-0.8.9.0/src/load_xm.cpp:541:4: [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(&m_MidiCfg, lpStream+dwMemPos, len); data/libmodplug-0.8.9.0/src/load_xm.cpp:557: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(m_lpszPatternNames, lpStream+dwMemPos, len); data/libmodplug-0.8.9.0/src/load_xm.cpp:572: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(ChnSettings[i].szName, (lpStream+dwMemPos+i*MAX_CHANNELNAME), MAX_CHANNELNAME); data/libmodplug-0.8.9.0/src/load_xm.cpp:603:11: [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 ((f = fopen(lpszFileName, "wb")) == NULL) return FALSE; data/libmodplug-0.8.9.0/src/load_xm.cpp:630:2: [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(header.order, Order, header.norder); data/libmodplug-0.8.9.0/src/load_xm.cpp:715: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(xmih.name, m_szNames[i], 22); data/libmodplug-0.8.9.0/src/load_xm.cpp:723: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(xmih.name, penv->name, 22); data/libmodplug-0.8.9.0/src/load_xm.cpp:783:23: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (smptable[ins]) memcpy(xmss.name, m_szNames[smptable[ins]], 22); data/libmodplug-0.8.9.0/src/mmcmp.cpp:16: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 id[8]; // "ziRCONia" data/libmodplug-0.8.9.0/src/mmcmp.cpp:168:2: [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(tmp0, lpMemFile, 24); data/libmodplug-0.8.9.0/src/mmcmp.cpp:188: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(tmp1, lpMemFile+dwMemPos, 28); data/libmodplug-0.8.9.0/src/mmcmp.cpp:214: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(pBuffer+psubblk->unpk_pos, lpMemFile+dwMemPos, psubblk->unpk_size); data/libmodplug-0.8.9.0/src/mmcmp.cpp:216: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(tmp1+20,lpMemFile+dwSubPos+i*8,8); data/libmodplug-0.8.9.0/src/mmcmp.cpp:296:6: [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(tmp1+20,lpMemFile+dwSubPos+subblk*8,8); data/libmodplug-0.8.9.0/src/mmcmp.cpp:373:6: [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(tmp1+20,lpMemFile+dwSubPos+subblk*8,8); data/libmodplug-0.8.9.0/src/modplug.cpp:270:2: [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(settings, &ModPlug::gSettings, sizeof(ModPlug_Settings)); data/libmodplug-0.8.9.0/src/modplug.cpp:275:2: [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(&ModPlug::gSettings, settings, sizeof(ModPlug_Settings)); data/libmodplug-0.8.9.0/src/sndfile.cpp:31:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const signed char UnpackTable[MAX_PACK_TABLES][16] = data/libmodplug-0.8.9.0/src/sndfile.cpp:381:2: [2] (buffer) lstrcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. lstrcpy(&m_MidiCfg.szMidiGlb[MIDIOUT_START*32], "FF"); data/libmodplug-0.8.9.0/src/sndfile.cpp:382:2: [2] (buffer) lstrcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. lstrcpy(&m_MidiCfg.szMidiGlb[MIDIOUT_STOP*32], "FC"); data/libmodplug-0.8.9.0/src/sndfile.cpp:383:2: [2] (buffer) lstrcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. lstrcpy(&m_MidiCfg.szMidiGlb[MIDIOUT_NOTEON*32], "9c n v"); data/libmodplug-0.8.9.0/src/sndfile.cpp:384:2: [2] (buffer) lstrcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. lstrcpy(&m_MidiCfg.szMidiGlb[MIDIOUT_NOTEOFF*32], "9c n 0"); data/libmodplug-0.8.9.0/src/sndfile.cpp:385:2: [2] (buffer) lstrcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. lstrcpy(&m_MidiCfg.szMidiGlb[MIDIOUT_PROGRAM*32], "Cc p"); data/libmodplug-0.8.9.0/src/sndfile.cpp:386:2: [2] (buffer) lstrcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. lstrcpy(&m_MidiCfg.szMidiSFXExt[0], "F0F000z"); data/libmodplug-0.8.9.0/src/sndfile.cpp:794: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 sztmp[40] = ""; // changed from CHAR data/libmodplug-0.8.9.0/src/sndfile.cpp:796: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(sztmp, m_szNames[nSample], 32); data/libmodplug-0.8.9.0/src/sndfile.cpp:806:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sztmp[40] = ""; // changed from CHAR data/libmodplug-0.8.9.0/src/sndfile.cpp:813:2: [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(sztmp, penv->name, 32); data/libmodplug-0.8.9.0/src/sndfile.cpp:851: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(CompressionTable, UnpackTable[j], 16); data/libmodplug-0.8.9.0/src/sndfile.cpp:871:2: [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(CompressionTable, UnpackTable[besttable], 16); data/libmodplug-0.8.9.0/src/sndfile.cpp:886: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. signed char buffer[4096]; data/libmodplug-0.8.9.0/src/sndfile.cpp:1157:4: [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(CompressionTable, lpMemFile, 16); data/libmodplug-0.8.9.0/src/sndfile.cpp:1195:27: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (len <= dwMemLength) memcpy(pIns->pSample, lpMemFile, len); data/libmodplug-0.8.9.0/src/sndfile.cpp:1540: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(pIns->pSample, lpMemFile, len); data/libmodplug-0.8.9.0/src/sndfile.cpp:1772: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 szName[MAX_PATTERNNAME] = ""; data/libmodplug-0.8.9.0/src/sndfile.cpp:1789:4: [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(p, m_lpszPatternNames, m_nPatternNames * MAX_PATTERNNAME); data/libmodplug-0.8.9.0/src/sndfile.cpp:1796:2: [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(m_lpszPatternNames + nPat * MAX_PATTERNNAME, szName, MAX_PATTERNNAME); data/libmodplug-0.8.9.0/src/sndfile.cpp:1809: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(lpszName, m_lpszPatternNames + nPat * MAX_PATTERNNAME, cbSize); data/libmodplug-0.8.9.0/src/libmodplug/sndfile.h:616:33: [1] (buffer) lstrcpyn: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). void GetTitle(LPSTR s) const { lstrcpyn(s,m_szNames[0],32); } data/libmodplug-0.8.9.0/src/libmodplug/stdafx.h:98:9: [1] (buffer) lstrcpyn: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). #define lstrcpyn strncpy data/libmodplug-0.8.9.0/src/libmodplug/stdafx.h:98:18: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). #define lstrcpyn strncpy data/libmodplug-0.8.9.0/src/load_abc.cpp:262: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). int len = strlen(name)+1+strlen(value)+1; data/libmodplug-0.8.9.0/src/load_abc.cpp:262:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(name)+1+strlen(value)+1; data/libmodplug-0.8.9.0/src/load_abc.cpp:317:6: [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(s1) + strlen(s2) > 255 ) return; data/libmodplug-0.8.9.0/src/load_abc.cpp:317:19: [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(s1) + strlen(s2) > 255 ) return; data/libmodplug-0.8.9.0/src/load_abc.cpp:553:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). retval->name = DupStr(h->macrohandle, key, strlen(key)); data/libmodplug-0.8.9.0/src/load_abc.cpp:555:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). retval->subst = DupStr(h->macrohandle, value, strlen(value)); data/libmodplug-0.8.9.0/src/load_abc.cpp:567:6: [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(key) > 1 || strchr("~HIJKLMNOPQRSTUVWXY",toupper(key[0])) == 0 ) return; data/libmodplug-0.8.9.0/src/load_abc.cpp:585:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). retval->subst = DupStr(h->macrohandle, value, strlen(value)); data/libmodplug-0.8.9.0/src/load_abc.cpp:603:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(retval->v, voice, 20); data/libmodplug-0.8.9.0/src/load_abc.cpp:814:6: [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(mv) > 0 ) // someone set the middle note data/libmodplug-0.8.9.0/src/load_abc.cpp:867:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tr->v, vc, 20); data/libmodplug-0.8.9.0/src/load_abc.cpp:2030:2: [1] (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). Risk is low because the source is a constant character. strcpy(buf,"A"); // initialize our temporary array data/libmodplug-0.8.9.0/src/load_abc.cpp:2203:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int l = strlen(target); data/libmodplug-0.8.9.0/src/load_abc.cpp:2204:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int n = strlen(s); data/libmodplug-0.8.9.0/src/load_abc.cpp:2208:10: [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( (i=strlen(h->line)) + n - l >= (int)h->len ) { data/libmodplug-0.8.9.0/src/load_abc.cpp:2232:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *t = new char[strlen(m->name) + 1]; data/libmodplug-0.8.9.0/src/load_abc.cpp:2235:8: [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). l = strlen(m->subst); data/libmodplug-0.8.9.0/src/load_abc.cpp:2270:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). while( (i=strlen(h->line)) > (int)(h->len - 3) ) { data/libmodplug-0.8.9.0/src/load_abc.cpp:2360:2: [1] (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). Risk is low because the source is a constant character. strcpy(retval->gchord, ""); data/libmodplug-0.8.9.0/src/load_abc.cpp:2702:5: [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(s) > 7) { data/libmodplug-0.8.9.0/src/load_abc.cpp:3144:11: [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). gsteps = strlen(h->drum)/2; data/libmodplug-0.8.9.0/src/load_abc.cpp:3212:11: [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). gsteps = strlen(h->gchord); data/libmodplug-0.8.9.0/src/load_abc.cpp:3329:6: [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(p) ) data/libmodplug-0.8.9.0/src/load_abc.cpp:3330:43: [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). h->beatstring = DupStr(h->allochandle,p,strlen(p)+1); data/libmodplug-0.8.9.0/src/load_abc.cpp:3340: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( barpos < (int)strlen(h->beatstring) ) { data/libmodplug-0.8.9.0/src/load_abc.cpp:3527: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). while( pm[strlen(pm)-1]=='\\' ) { data/libmodplug-0.8.9.0/src/load_abc.cpp:3550:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p2 = (char *)malloc(strlen(p1)+strlen(pm)); data/libmodplug-0.8.9.0/src/load_abc.cpp:3550: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). p2 = (char *)malloc(strlen(p1)+strlen(pm)); data/libmodplug-0.8.9.0/src/load_abc.cpp:3555:6: [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). p1[strlen(p1)-1] = '\0'; // strip off the backslash data/libmodplug-0.8.9.0/src/load_abc.cpp:3729:7: [1] (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). Risk is low because the source is a constant character. strcpy(h->gchord, ""); // reset gchord string data/libmodplug-0.8.9.0/src/load_abc.cpp:3737:7: [1] (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). Risk is low because the source is a constant character. strcpy(h->gchord, ""); data/libmodplug-0.8.9.0/src/load_abc.cpp:3772:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for( t=strlen(p)-1; isspace(p[t]); t-- ) data/libmodplug-0.8.9.0/src/load_abc.cpp:3776:11: [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(buf) ) strcat(buf," "); // add a space data/libmodplug-0.8.9.0/src/load_abc.cpp:3776:25: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. if( strlen(buf) ) strcat(buf," "); // add a space data/libmodplug-0.8.9.0/src/load_abc.cpp:3778:7: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(buf, p+t, 200-strlen(buf)-1); data/libmodplug-0.8.9.0/src/load_abc.cpp:3778:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(buf, p+t, 200-strlen(buf)-1); data/libmodplug-0.8.9.0/src/load_abc.cpp:3779:11: [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(buf) > 31 ) buf[31] = '\0'; // chop it of data/libmodplug-0.8.9.0/src/load_abc.cpp:3824: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(h->gchord) ) abc_metric_gchord(h, mnotelen, mnotediv); data/libmodplug-0.8.9.0/src/load_abc.cpp:3843:11: [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(p) ) data/libmodplug-0.8.9.0/src/load_abc.cpp:3854:11: [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(p) && h->track ) { // end of this song data/libmodplug-0.8.9.0/src/load_abc.cpp:3919:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for( t=strlen(p)-1; isspace(p[t]); t-- ) data/libmodplug-0.8.9.0/src/load_abc.cpp:3923:11: [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(buf) + strlen(p+t) > 198 ) p[t+198-strlen(buf)] = '\0'; // chop it of data/libmodplug-0.8.9.0/src/load_abc.cpp:3923:25: [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(buf) + strlen(p+t) > 198 ) p[t+198-strlen(buf)] = '\0'; // chop it of data/libmodplug-0.8.9.0/src/load_abc.cpp:3923:53: [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(buf) + strlen(p+t) > 198 ) p[t+198-strlen(buf)] = '\0'; // chop it of data/libmodplug-0.8.9.0/src/load_abc.cpp:3924:11: [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(buf) ) strcat(buf," "); // add a space data/libmodplug-0.8.9.0/src/load_abc.cpp:3924:25: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. if( strlen(buf) ) strcat(buf," "); // add a space data/libmodplug-0.8.9.0/src/load_abc.cpp:3926:11: [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(buf) > 31 ) buf[31] = '\0'; // chop it of data/libmodplug-0.8.9.0/src/load_it.cpp:629:2: [1] (buffer) lstrcpyn: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). lstrcpyn((char *)header.songname, m_szNames[0], 27); data/libmodplug-0.8.9.0/src/load_it.cpp:694:22: [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). header.msglength = strlen(m_lpszSongComments)+1; data/libmodplug-0.8.9.0/src/load_it.cpp:772: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). dwPos += strlen(m_lpszSongComments) + 1; data/libmodplug-0.8.9.0/src/load_it.cpp:773:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fwrite(m_lpszSongComments, 1, strlen(m_lpszSongComments)+1, f); data/libmodplug-0.8.9.0/src/load_med.cpp:740:6: [1] (buffer) lstrcpyn: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). lstrcpyn(m_szNames[i+1], psznames + i*ientrysz, maxnamelen); data/libmodplug-0.8.9.0/src/load_med.cpp:771:7: [1] (buffer) lstrcpyn: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). lstrcpyn(ChnSettings[i].szName, (LPCSTR)(lpStream+trknameofs), MAX_CHANNELNAME); data/libmodplug-0.8.9.0/src/load_mid.cpp:212:6: [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(s1) + strlen(s2) > 255 ) return; data/libmodplug-0.8.9.0/src/load_mid.cpp:212:19: [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(s1) + strlen(s2) > 255 ) return; data/libmodplug-0.8.9.0/src/load_mid.cpp:1234:2: [1] (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). Risk is low because the source is a constant character. strcpy(m_szNames[0], ""); data/libmodplug-0.8.9.0/src/load_mtm.cpp:61:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(m_szNames[0], pmh->songname, 20); data/libmodplug-0.8.9.0/src/load_mtm.cpp:73:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(m_szNames[i], pms->samplename, 22); data/libmodplug-0.8.9.0/src/load_pat.cpp:165:6: [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(s1) + strlen(s2) > 255 ) return; data/libmodplug-0.8.9.0/src/load_pat.cpp:165:19: [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(s1) + strlen(s2) > 255 ) return; data/libmodplug-0.8.9.0/src/load_pat.cpp:181: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). return strlen((const char *)pat_gm_used); data/libmodplug-0.8.9.0/src/load_pat.cpp:186: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). return strlen((const char *)pat_gm_used); data/libmodplug-0.8.9.0/src/load_pat.cpp:364:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pathforpat, PATHFORPAT, PATH_MAX); data/libmodplug-0.8.9.0/src/load_pat.cpp:365:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(timiditycfg, TIMIDITYCFG, PATH_MAX); data/libmodplug-0.8.9.0/src/load_pat.cpp:368:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(timiditycfg, p, PATH_MAX - 14); data/libmodplug-0.8.9.0/src/load_pat.cpp:369:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pathforpat, p, PATH_MAX - 13); data/libmodplug-0.8.9.0/src/load_pat.cpp:373:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cfgsources[0], timiditycfg, PATH_MAX - 1); data/libmodplug-0.8.9.0/src/load_pat.cpp:479:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(h->patname, ih.instrument_name, 16); data/libmodplug-0.8.9.0/src/load_pat.cpp:495:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(hl->reserved, ih.instrument_name, 40); data/libmodplug-0.8.9.0/src/load_pat.cpp:543:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(hw->reserved, hl.reserved, 32); data/libmodplug-0.8.9.0/src/load_pat.cpp:1021:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(hw.reserved, midipat[gm-1], sizeof(hw.reserved)); data/libmodplug-0.8.9.0/src/load_pat.cpp:1026:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(s, hw.reserved, 32); data/libmodplug-0.8.9.0/src/load_pat.cpp:1028:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(s, midipat[gm-1], 32); data/libmodplug-0.8.9.0/src/load_pat.cpp:1032:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(s, midipat[gm-1], 12); data/libmodplug-0.8.9.0/src/load_pat.cpp:1066:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cs->m_szNames[smp], s, 32-1); data/libmodplug-0.8.9.0/src/load_pat.cpp:1127:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy((char *)of->Headers[0]->name, "Timidity GM patches", 32); data/libmodplug-0.8.9.0/src/load_pat.cpp:1156:6: [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(h->patname) ) data/libmodplug-0.8.9.0/src/load_pat.cpp:1160:6: [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(buf) > 31 ) buf[31] = '\0'; // chop it of data/libmodplug-0.8.9.0/src/load_pat.cpp:1244:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)Headers[0]->name, h->patname, 32); data/libmodplug-0.8.9.0/src/load_pat.cpp:1246:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy((char *)Headers[0]->name, "Timidity GM patch", 32); data/libmodplug-0.8.9.0/src/load_ptm.cpp:112:3: [1] (buffer) lstrcpyn: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). lstrcpyn(m_szNames[ismp+1], psmp->samplename, 28); data/libmodplug-0.8.9.0/src/load_umx.cpp:174:15: [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). l += (long)strlen(buf); data/libmodplug-0.8.9.0/src/load_xm.cpp:844: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). d = strlen(m_lpszSongComments); data/libmodplug-0.8.9.0/src/sndfile.cpp:799: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). return strlen(sztmp); data/libmodplug-0.8.9.0/src/sndfile.cpp:816: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). return strlen(sztmp); data/libmodplug-0.8.9.0/src/sndfile.cpp:1777:16: [1] (buffer) lstrcpyn: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). if (lpszName) lstrcpyn(szName, lpszName, MAX_PATTERNNAME); ANALYSIS SUMMARY: Hits = 422 Lines analyzed = 29743 in approximately 0.77 seconds (38613 lines/second) Physical Source Lines of Code (SLOC) = 25437 Hits@level = [0] 84 [1] 89 [2] 278 [3] 11 [4] 44 [5] 0 Hits@level+ = [0+] 506 [1+] 422 [2+] 333 [3+] 55 [4+] 44 [5+] 0 Hits/KSLOC@level+ = [0+] 19.8923 [1+] 16.59 [2+] 13.0912 [3+] 2.1622 [4+] 1.72976 [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.