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/audiofile-0.3.6/test/InvalidCompressionFormat.cpp Examining data/audiofile-0.3.6/test/Pipe.cpp Examining data/audiofile-0.3.6/test/PCMData.cpp Examining data/audiofile-0.3.6/test/Lossless.h Examining data/audiofile-0.3.6/test/Seek.cpp Examining data/audiofile-0.3.6/test/AES.cpp Examining data/audiofile-0.3.6/test/query2.c Examining data/audiofile-0.3.6/test/instparamwrite.c Examining data/audiofile-0.3.6/test/Miscellaneous.cpp Examining data/audiofile-0.3.6/test/SampleFormat.cpp Examining data/audiofile-0.3.6/test/ChannelMatrix.cpp Examining data/audiofile-0.3.6/test/Loop.cpp Examining data/audiofile-0.3.6/test/Query.cpp Examining data/audiofile-0.3.6/test/testaupv.c Examining data/audiofile-0.3.6/test/PCMMapping.cpp Examining data/audiofile-0.3.6/test/ADPCM.cpp Examining data/audiofile-0.3.6/test/Large.cpp Examining data/audiofile-0.3.6/test/VirtualFile.cpp Examining data/audiofile-0.3.6/test/instparamtest.c Examining data/audiofile-0.3.6/test/Instrument.cpp Examining data/audiofile-0.3.6/test/FLAC.cpp Examining data/audiofile-0.3.6/test/InvalidSampleFormat.cpp Examining data/audiofile-0.3.6/test/ALAC.cpp Examining data/audiofile-0.3.6/test/Error.cpp Examining data/audiofile-0.3.6/test/printmarkers.c Examining data/audiofile-0.3.6/test/Marker.cpp Examining data/audiofile-0.3.6/test/FloatToInt.cpp Examining data/audiofile-0.3.6/test/IntToFloat.cpp Examining data/audiofile-0.3.6/test/NeXT.cpp Examining data/audiofile-0.3.6/test/Sign.cpp Examining data/audiofile-0.3.6/test/TestUtilities.cpp Examining data/audiofile-0.3.6/test/TestUtilities.h Examining data/audiofile-0.3.6/test/floatto24.c Examining data/audiofile-0.3.6/test/sixteen-to-eight.c Examining data/audiofile-0.3.6/test/testchannelmatrix.c Examining data/audiofile-0.3.6/test/testdouble.c Examining data/audiofile-0.3.6/test/testfloat.c Examining data/audiofile-0.3.6/test/testmarkers.c Examining data/audiofile-0.3.6/test/twentyfour.c Examining data/audiofile-0.3.6/test/twentyfour2.c Examining data/audiofile-0.3.6/test/writealaw.c Examining data/audiofile-0.3.6/test/writeraw.c Examining data/audiofile-0.3.6/test/writeulaw.c Examining data/audiofile-0.3.6/test/sixteen-stereo-to-eight-mono.c Examining data/audiofile-0.3.6/gtest/gtest-all.cpp Examining data/audiofile-0.3.6/gtest/gtest.h Examining data/audiofile-0.3.6/libaudiofile/PacketTable.h Examining data/audiofile-0.3.6/libaudiofile/AVR.h Examining data/audiofile-0.3.6/libaudiofile/AVR.cpp Examining data/audiofile-0.3.6/libaudiofile/compression.h Examining data/audiofile-0.3.6/libaudiofile/Features.h Examining data/audiofile-0.3.6/libaudiofile/UUID.h Examining data/audiofile-0.3.6/libaudiofile/compression.cpp Examining data/audiofile-0.3.6/libaudiofile/aupv.c Examining data/audiofile-0.3.6/libaudiofile/g711.c Examining data/audiofile-0.3.6/libaudiofile/SampleVision.cpp Examining data/audiofile-0.3.6/libaudiofile/error.h Examining data/audiofile-0.3.6/libaudiofile/NIST.h Examining data/audiofile-0.3.6/libaudiofile/IFF.cpp Examining data/audiofile-0.3.6/libaudiofile/Setup.cpp Examining data/audiofile-0.3.6/libaudiofile/File.cpp Examining data/audiofile-0.3.6/libaudiofile/Raw.h Examining data/audiofile-0.3.6/libaudiofile/AudioFormat.h Examining data/audiofile-0.3.6/libaudiofile/query.cpp Examining data/audiofile-0.3.6/libaudiofile/FileHandle.h Examining data/audiofile-0.3.6/libaudiofile/VOC.cpp Examining data/audiofile-0.3.6/libaudiofile/NeXT.cpp Examining data/audiofile-0.3.6/libaudiofile/units.h Examining data/audiofile-0.3.6/libaudiofile/VOC.h Examining data/audiofile-0.3.6/libaudiofile/aupvinternal.h Examining data/audiofile-0.3.6/libaudiofile/NeXT.h Examining data/audiofile-0.3.6/libaudiofile/Marker.h Examining data/audiofile-0.3.6/libaudiofile/SampleVision.h Examining data/audiofile-0.3.6/libaudiofile/util.h Examining data/audiofile-0.3.6/libaudiofile/Tag.h Examining data/audiofile-0.3.6/libaudiofile/units.cpp Examining data/audiofile-0.3.6/libaudiofile/AIFF.h Examining data/audiofile-0.3.6/libaudiofile/pcm.h Examining data/audiofile-0.3.6/libaudiofile/extended.c Examining data/audiofile-0.3.6/libaudiofile/IRCAM.h Examining data/audiofile-0.3.6/libaudiofile/Compiler.h Examining data/audiofile-0.3.6/libaudiofile/Miscellaneous.cpp Examining data/audiofile-0.3.6/libaudiofile/extended.h Examining data/audiofile-0.3.6/libaudiofile/CAF.cpp Examining data/audiofile-0.3.6/libaudiofile/aupvlist.h Examining data/audiofile-0.3.6/libaudiofile/Track.cpp Examining data/audiofile-0.3.6/libaudiofile/error.c Examining data/audiofile-0.3.6/libaudiofile/g711.h Examining data/audiofile-0.3.6/libaudiofile/AudioFormat.cpp Examining data/audiofile-0.3.6/libaudiofile/CAF.h Examining data/audiofile-0.3.6/libaudiofile/util.cpp Examining data/audiofile-0.3.6/libaudiofile/af_vfs.cpp Examining data/audiofile-0.3.6/libaudiofile/af_vfs.h Examining data/audiofile-0.3.6/libaudiofile/WAVE.h Examining data/audiofile-0.3.6/libaudiofile/FLACFile.cpp Examining data/audiofile-0.3.6/libaudiofile/debug.h Examining data/audiofile-0.3.6/libaudiofile/Loop.cpp Examining data/audiofile-0.3.6/libaudiofile/format.cpp Examining data/audiofile-0.3.6/libaudiofile/Raw.cpp Examining data/audiofile-0.3.6/libaudiofile/byteorder.h Examining data/audiofile-0.3.6/libaudiofile/File.h Examining data/audiofile-0.3.6/libaudiofile/Setup.h Examining data/audiofile-0.3.6/libaudiofile/aes.cpp Examining data/audiofile-0.3.6/libaudiofile/afinternal.h Examining data/audiofile-0.3.6/libaudiofile/audiofile.h Examining data/audiofile-0.3.6/libaudiofile/PacketTable.cpp Examining data/audiofile-0.3.6/libaudiofile/Shared.h Examining data/audiofile-0.3.6/libaudiofile/Instrument.cpp Examining data/audiofile-0.3.6/libaudiofile/openclose.cpp Examining data/audiofile-0.3.6/libaudiofile/FileHandle.cpp Examining data/audiofile-0.3.6/libaudiofile/NIST.cpp Examining data/audiofile-0.3.6/libaudiofile/IRCAM.cpp Examining data/audiofile-0.3.6/libaudiofile/IFF.h Examining data/audiofile-0.3.6/libaudiofile/AIFF.cpp Examining data/audiofile-0.3.6/libaudiofile/data.cpp Examining data/audiofile-0.3.6/libaudiofile/pcm.cpp Examining data/audiofile-0.3.6/libaudiofile/FLACFile.h Examining data/audiofile-0.3.6/libaudiofile/Buffer.cpp Examining data/audiofile-0.3.6/libaudiofile/alac/ALACEncoder.h Examining data/audiofile-0.3.6/libaudiofile/alac/dp_dec.c Examining data/audiofile-0.3.6/libaudiofile/alac/dplib.h Examining data/audiofile-0.3.6/libaudiofile/alac/matrix_enc.c Examining data/audiofile-0.3.6/libaudiofile/alac/ag_dec.c Examining data/audiofile-0.3.6/libaudiofile/alac/ALACEncoder.cpp Examining data/audiofile-0.3.6/libaudiofile/alac/ALACDecoder.h Examining data/audiofile-0.3.6/libaudiofile/alac/matrixlib.h Examining data/audiofile-0.3.6/libaudiofile/alac/aglib.h Examining data/audiofile-0.3.6/libaudiofile/alac/ALACDecoder.cpp Examining data/audiofile-0.3.6/libaudiofile/alac/ALACBitUtilities.c Examining data/audiofile-0.3.6/libaudiofile/alac/EndianPortable.h Examining data/audiofile-0.3.6/libaudiofile/alac/EndianPortable.c Examining data/audiofile-0.3.6/libaudiofile/alac/ALACAudioTypes.h Examining data/audiofile-0.3.6/libaudiofile/alac/dp_enc.c Examining data/audiofile-0.3.6/libaudiofile/alac/matrix_dec.c Examining data/audiofile-0.3.6/libaudiofile/alac/ag_enc.c Examining data/audiofile-0.3.6/libaudiofile/alac/ALACBitUtilities.h Examining data/audiofile-0.3.6/libaudiofile/Buffer.h Examining data/audiofile-0.3.6/libaudiofile/Instrument.h Examining data/audiofile-0.3.6/libaudiofile/debug.cpp Examining data/audiofile-0.3.6/libaudiofile/Track.h Examining data/audiofile-0.3.6/libaudiofile/Marker.cpp Examining data/audiofile-0.3.6/libaudiofile/UUID.cpp Examining data/audiofile-0.3.6/libaudiofile/modules/FLAC.h Examining data/audiofile-0.3.6/libaudiofile/modules/ALAC.h Examining data/audiofile-0.3.6/libaudiofile/modules/FileModule.h Examining data/audiofile-0.3.6/libaudiofile/modules/PCM.cpp Examining data/audiofile-0.3.6/libaudiofile/modules/Module.h Examining data/audiofile-0.3.6/libaudiofile/modules/FileModule.cpp Examining data/audiofile-0.3.6/libaudiofile/modules/RebufferModule.cpp Examining data/audiofile-0.3.6/libaudiofile/modules/G711.h Examining data/audiofile-0.3.6/libaudiofile/modules/G711.cpp Examining data/audiofile-0.3.6/libaudiofile/modules/ModuleState.h Examining data/audiofile-0.3.6/libaudiofile/modules/UT_RebufferModule.cpp Examining data/audiofile-0.3.6/libaudiofile/modules/Module.cpp Examining data/audiofile-0.3.6/libaudiofile/modules/BlockCodec.h Examining data/audiofile-0.3.6/libaudiofile/modules/MSADPCM.h Examining data/audiofile-0.3.6/libaudiofile/modules/FLAC.cpp Examining data/audiofile-0.3.6/libaudiofile/modules/IMA.h Examining data/audiofile-0.3.6/libaudiofile/modules/PCM.h Examining data/audiofile-0.3.6/libaudiofile/modules/ALAC.cpp Examining data/audiofile-0.3.6/libaudiofile/modules/RebufferModule.h Examining data/audiofile-0.3.6/libaudiofile/modules/SimpleModule.h Examining data/audiofile-0.3.6/libaudiofile/modules/IMA.cpp Examining data/audiofile-0.3.6/libaudiofile/modules/MSADPCM.cpp Examining data/audiofile-0.3.6/libaudiofile/modules/BlockCodec.cpp Examining data/audiofile-0.3.6/libaudiofile/modules/ModuleState.cpp Examining data/audiofile-0.3.6/libaudiofile/modules/SimpleModule.cpp Examining data/audiofile-0.3.6/libaudiofile/WAVE.cpp Examining data/audiofile-0.3.6/sfcommands/printinfo.c Examining data/audiofile-0.3.6/sfcommands/sfinfo.c Examining data/audiofile-0.3.6/sfcommands/printinfo.h Examining data/audiofile-0.3.6/sfcommands/sfconvert.c Examining data/audiofile-0.3.6/examples/osxplay.c Examining data/audiofile-0.3.6/examples/sgi.c Examining data/audiofile-0.3.6/examples/irixread.c Examining data/audiofile-0.3.6/examples/irixtestloop.c Examining data/audiofile-0.3.6/examples/alsaplay.cpp Examining data/audiofile-0.3.6/examples/linuxtest.c Examining data/audiofile-0.3.6/examples/power.c Examining data/audiofile-0.3.6/examples/adddcoffset.c Examining data/audiofile-0.3.6/examples/sgi.h FINAL RESULTS: data/audiofile-0.3.6/gtest/gtest-all.cpp:1440:10: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define vsnprintf _vsnprintf data/audiofile-0.3.6/gtest/gtest-all.cpp:2144:12: [4] (buffer) StrNCpy: 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). posix::StrNCpy(clone, str, length); data/audiofile-0.3.6/gtest/gtest-all.cpp:2764:12: [4] (buffer) StrNCpy: 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). posix::StrNCpy( data/audiofile-0.3.6/gtest/gtest-all.cpp:3017:20: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. const int size = vsnprintf(buffer, kBufferSize, format, args); data/audiofile-0.3.6/gtest/gtest-all.cpp:3021:20: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. const int size = vsnprintf(buffer, kBufferSize, format, args); data/audiofile-0.3.6/gtest/gtest-all.cpp:3938:5: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(fmt, args); data/audiofile-0.3.6/gtest/gtest-all.cpp:3957:3: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(fmt, args); data/audiofile-0.3.6/gtest/gtest-all.cpp:3964:3: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(fmt, args); data/audiofile-0.3.6/gtest/gtest-all.cpp:8605:10: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf _snprintf data/audiofile-0.3.6/gtest/gtest-all.cpp:8605:19: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf _snprintf data/audiofile-0.3.6/gtest/gtest-all.cpp:8607:10: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf _snprintf_s data/audiofile-0.3.6/gtest/gtest-all.cpp:8609:10: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf _snprintf data/audiofile-0.3.6/gtest/gtest-all.cpp:8609:19: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf _snprintf data/audiofile-0.3.6/gtest/gtest.h:2671:20: [4] (buffer) StrNCpy: 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). inline const char* StrNCpy(char* dest, const char* src, size_t n) { data/audiofile-0.3.6/gtest/gtest.h:8110:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(\ data/audiofile-0.3.6/libaudiofile/Marker.cpp:152: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(track->markers[markno].comment, commstr); data/audiofile-0.3.6/libaudiofile/NIST.cpp:171:3: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. sscanf(cp, scanstring, val); data/audiofile-0.3.6/libaudiofile/NIST.cpp:188:3: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. sscanf(cp, scanstring, length, val); data/audiofile-0.3.6/libaudiofile/debug.cpp:258:3: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(formatstring, pcm); data/audiofile-0.3.6/libaudiofile/error.c:63:2: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buf, 1024, fmt, ap); data/audiofile-0.3.6/libaudiofile/error.h:33:24: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format(printf, 2, 3))); data/audiofile-0.3.6/libaudiofile/openclose.cpp:45:32: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. static status _afOpenFile (int access, File *f, const char *filename, data/audiofile-0.3.6/libaudiofile/openclose.cpp:126:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. int access; data/audiofile-0.3.6/libaudiofile/openclose.cpp:145:18: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (_afOpenFile(access, f, NULL, &filehandle, setup) != AF_SUCCEED) data/audiofile-0.3.6/libaudiofile/openclose.cpp:162:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. int access; data/audiofile-0.3.6/libaudiofile/openclose.cpp:177:18: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (_afOpenFile(access, f, filename, &filehandle, setup) != AF_SUCCEED) data/audiofile-0.3.6/libaudiofile/openclose.cpp:193:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. int access; data/audiofile-0.3.6/libaudiofile/openclose.cpp:217:18: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (_afOpenFile(access, f, filename, &filehandle, setup) != AF_SUCCEED) data/audiofile-0.3.6/libaudiofile/openclose.cpp:240:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. int access; data/audiofile-0.3.6/libaudiofile/openclose.cpp:264:18: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (_afOpenFile(access, f, NULL, &filehandle, setup) != AF_SUCCEED) data/audiofile-0.3.6/libaudiofile/openclose.cpp:272:32: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. static status _afOpenFile (int access, File *f, const char *filename, data/audiofile-0.3.6/libaudiofile/openclose.cpp:346:25: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. filehandle->m_access = access; data/audiofile-0.3.6/libaudiofile/util.cpp:117: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(p, s); data/audiofile-0.3.6/test/query2.c:42:14: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define DEBG printf data/audiofile-0.3.6/gtest/gtest-all.cpp:700:37: [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. void ShuffleRange(internal::Random* random, int begin, int end, data/audiofile-0.3.6/gtest/gtest-all.cpp:721:39: [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. inline void Shuffle(internal::Random* random, std::vector<E>* v) { data/audiofile-0.3.6/gtest/gtest-all.cpp:722:16: [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. ShuffleRange(random, 0, static_cast<int>(v->size()), v); data/audiofile-0.3.6/gtest/gtest-all.cpp:1172:21: [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. internal::Random* random() { return &random_; } data/audiofile-0.3.6/gtest/gtest-all.cpp:3767:47: [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. void TestCase::ShuffleTests(internal::Random* random) { data/audiofile-0.3.6/gtest/gtest-all.cpp:3768:11: [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. Shuffle(random, &test_indices_); data/audiofile-0.3.6/gtest/gtest-all.cpp:5519:7: [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. random()->Reseed(random_seed_); data/audiofile-0.3.6/gtest/gtest-all.cpp:5790:16: [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. ShuffleRange(random(), 0, last_death_test_case_ + 1, &test_case_indices_); data/audiofile-0.3.6/gtest/gtest-all.cpp:5793:16: [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. ShuffleRange(random(), last_death_test_case_ + 1, data/audiofile-0.3.6/gtest/gtest-all.cpp:5798:34: [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. test_cases_[i]->ShuffleTests(random()); data/audiofile-0.3.6/gtest/gtest.h:2709:27: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char* const env = getenv(name); data/audiofile-0.3.6/gtest/gtest.h:2712:10: [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. return getenv(name); data/audiofile-0.3.6/gtest/gtest.h:17891:39: [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. void ShuffleTests(internal::Random* random); data/audiofile-0.3.6/sfcommands/sfinfo.c:89:19: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((result = getopt_long(argc, argv, "srhv", long_options, data/audiofile-0.3.6/examples/linuxtest.c:100:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int audiofd = open("/dev/dsp", O_WRONLY); data/audiofile-0.3.6/gtest/gtest-all.cpp:2167:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_ACP, 0, ansi, length, data/audiofile-0.3.6/gtest/gtest-all.cpp:2170:3: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_ACP, 0, ansi, length, data/audiofile-0.3.6/gtest/gtest-all.cpp:2658: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 error_text[kBufSize] = { '\0' }; data/audiofile-0.3.6/gtest/gtest-all.cpp:2826: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 buffer[32]; // CodePointToUtf8 requires a buffer this big. data/audiofile-0.3.6/gtest/gtest-all.cpp:3008: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 buffer[4096]; data/audiofile-0.3.6/gtest/gtest-all.cpp:6471: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 buffer[256]; data/audiofile-0.3.6/gtest/gtest-all.cpp:6890: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 executable_path[_MAX_PATH + 1]; // NOLINT data/audiofile-0.3.6/gtest/gtest-all.cpp:7534: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 cwd[GTEST_PATH_MAX_ + 1] = { '\0' }; data/audiofile-0.3.6/gtest/gtest-all.cpp:7537: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 cwd[GTEST_PATH_MAX_ + 1] = { '\0' }; data/audiofile-0.3.6/gtest/gtest-all.cpp:8218: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(buffer, regex, len); data/audiofile-0.3.6/gtest/gtest-all.cpp:8296:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp_dir_path[MAX_PATH + 1] = { '\0' }; // NOLINT data/audiofile-0.3.6/gtest/gtest-all.cpp:8297:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp_file_path[MAX_PATH + 1] = { '\0' }; // NOLINT data/audiofile-0.3.6/gtest/gtest-all.cpp:8315:29: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). const int captured_fd = mkstemp(name_template); data/audiofile-0.3.6/gtest/gtest-all.cpp:8615: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 text[5] = ""; data/audiofile-0.3.6/gtest/gtest.h:2683:10: [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). return fopen(path, mode); data/audiofile-0.3.6/gtest/gtest.h:3154: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(str, buffer, a_length); data/audiofile-0.3.6/libaudiofile/AIFF.cpp:133:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char aesChannelStatusData[24]; data/audiofile-0.3.6/libaudiofile/AIFF.cpp:149: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(track->aesData, aesChannelStatusData, 24); data/audiofile-0.3.6/libaudiofile/AIFF.cpp:328:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char sampleRate[10]; data/audiofile-0.3.6/libaudiofile/AIFF.cpp:358: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 compressionName[256]; data/audiofile-0.3.6/libaudiofile/AIFF.cpp:827: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 compressionName[256]; data/audiofile-0.3.6/libaudiofile/AIFF.cpp:836:5: [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(compressionName, "not compressed"); data/audiofile-0.3.6/libaudiofile/AIFF.cpp:841:5: [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(compressionName, "32-bit Floating Point"); data/audiofile-0.3.6/libaudiofile/AIFF.cpp:846:5: [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(compressionName, "64-bit Floating Point"); data/audiofile-0.3.6/libaudiofile/AIFF.cpp:865:4: [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(compressionName, "CCITT G.711 u-law"); data/audiofile-0.3.6/libaudiofile/AIFF.cpp:870:4: [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(compressionName, "CCITT G.711 A-law"); data/audiofile-0.3.6/libaudiofile/AIFF.cpp:875:4: [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(compressionName, "IMA 4:1 compression"); data/audiofile-0.3.6/libaudiofile/AIFF.cpp:1187:28: [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. bool AIFFFile::readPString(char s[256]) data/audiofile-0.3.6/libaudiofile/AIFF.h:88:19: [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. bool readPString(char s[256]); data/audiofile-0.3.6/libaudiofile/AVR.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 name[8]; data/audiofile-0.3.6/libaudiofile/AVR.cpp:82: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[26]; data/audiofile-0.3.6/libaudiofile/AVR.cpp:83: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 user[64]; data/audiofile-0.3.6/libaudiofile/AVR.cpp:290: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[8]; data/audiofile-0.3.6/libaudiofile/AVR.cpp:293: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[26]; data/audiofile-0.3.6/libaudiofile/AVR.cpp:294: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 user[64]; data/audiofile-0.3.6/libaudiofile/AudioFormat.cpp:108: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[1024]; data/audiofile-0.3.6/libaudiofile/AudioFormat.cpp:110:2: [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, "{ %7.2f Hz %d ch ", sampleRate, channelCount); data/audiofile-0.3.6/libaudiofile/AudioFormat.cpp:117: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(s, "%db 2 ", sampleWidth); data/audiofile-0.3.6/libaudiofile/AudioFormat.cpp:120: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(s, "%db u ", sampleWidth); data/audiofile-0.3.6/libaudiofile/AudioFormat.cpp:123: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(s, "flt "); data/audiofile-0.3.6/libaudiofile/AudioFormat.cpp:126: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(s, "dbl "); data/audiofile-0.3.6/libaudiofile/AudioFormat.cpp:136:2: [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, "(%.30g+-%.30g [%.30g,%.30g]) ", data/audiofile-0.3.6/libaudiofile/Buffer.cpp:46: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_data, data, m_size); data/audiofile-0.3.6/libaudiofile/File.cpp:78:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). File *File::open(const char *path, File::AccessMode mode) data/audiofile-0.3.6/libaudiofile/File.cpp:88:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = ::open(path, flags, 0666); data/audiofile-0.3.6/libaudiofile/File.h:54:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). static File *open(const char *path, AccessMode mode); data/audiofile-0.3.6/libaudiofile/Miscellaneous.cpp:160: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((char *) miscellaneous->buffer + miscellaneous->position, data/audiofile-0.3.6/libaudiofile/Miscellaneous.cpp:186: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, (char *) miscellaneous->buffer + miscellaneous->position, data/audiofile-0.3.6/libaudiofile/NIST.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 keystring[256], scanstring[256]; data/audiofile-0.3.6/libaudiofile/NIST.cpp:181: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 keystring[256], scanstring[256]; data/audiofile-0.3.6/libaudiofile/NIST.cpp:197: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[NIST_SPHERE_HEADER_LENGTH + 1]; data/audiofile-0.3.6/libaudiofile/NIST.cpp:199: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 strval[NIST_SPHERE_MAX_FIELD_LENGTH]; data/audiofile-0.3.6/libaudiofile/NIST.cpp:417: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[NIST_SPHERE_HEADER_LENGTH]; data/audiofile-0.3.6/libaudiofile/SampleVision.cpp:80: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 magic[kSMPMagicLength]; data/audiofile-0.3.6/libaudiofile/SampleVision.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 magic[kSMPMagicLength]; data/audiofile-0.3.6/libaudiofile/SampleVision.cpp:147: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 version[kSMPVersionLength]; data/audiofile-0.3.6/libaudiofile/SampleVision.cpp:155: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[kSMPNameLength + 1]; data/audiofile-0.3.6/libaudiofile/SampleVision.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 comment[kSMPCommentLength + 1]; data/audiofile-0.3.6/libaudiofile/SampleVision.cpp:223: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 name[kSMPMarkerNameLength + 1]; data/audiofile-0.3.6/libaudiofile/SampleVision.cpp:244: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.buffer, data, m.size); data/audiofile-0.3.6/libaudiofile/SampleVision.cpp:255: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[kSMPNameLength + 1]; data/audiofile-0.3.6/libaudiofile/SampleVision.cpp:256: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 comment[kSMPCommentLength + 1]; data/audiofile-0.3.6/libaudiofile/SampleVision.cpp:325: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 name[kSMPMarkerNameLength + 1]; data/audiofile-0.3.6/libaudiofile/Setup.cpp:436: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((var), (copyfrom), (n) * sizeof (type)); \ data/audiofile-0.3.6/libaudiofile/Tag.h:37: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_value, s, 4); data/audiofile-0.3.6/libaudiofile/Tag.h:47: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[5]; data/audiofile-0.3.6/libaudiofile/Tag.h:48: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, &m_value, 4); data/audiofile-0.3.6/libaudiofile/Track.h:71:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char aesData[24]; /* AES nonaudio data */ data/audiofile-0.3.6/libaudiofile/UUID.cpp:48: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[37]; data/audiofile-0.3.6/libaudiofile/VOC.cpp:40:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char kVOCMagic[kVOCMagicLength + 1] = "Creative Voice File\x1a"; data/audiofile-0.3.6/libaudiofile/VOC.cpp:92: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 buffer[kVOCMagicLength]; data/audiofile-0.3.6/libaudiofile/WAVE.cpp:1590: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_msadpcmCoefficients, coefficients, sizeof (int16_t) * 7 * 2); data/audiofile-0.3.6/libaudiofile/aes.cpp:64:67: [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. int afGetAESChannelData (AFfilehandle file, int trackid, unsigned char buf[24]) data/audiofile-0.3.6/libaudiofile/aes.cpp:81: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, track->aesData, 24); data/audiofile-0.3.6/libaudiofile/aes.cpp:86:68: [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. void afSetAESChannelData (AFfilehandle file, int trackid, unsigned char buf[24]) data/audiofile-0.3.6/libaudiofile/aes.cpp:100: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(track->aesData, buf, 24); data/audiofile-0.3.6/libaudiofile/alac/ALACDecoder.cpp:118:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&theConfig, theActualCookie, sizeof(ALACSpecificConfig)); data/audiofile-0.3.6/libaudiofile/alac/ALACEncoder.cpp:1226:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(theCookiePointer, &theConfig, sizeof(ALACSpecificConfig)); data/audiofile-0.3.6/libaudiofile/alac/ALACEncoder.cpp:1231:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(theCookiePointer, theChannelAtom, kChannelAtomSize); data/audiofile-0.3.6/libaudiofile/alac/ALACEncoder.cpp:1233:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(theCookiePointer, &theChannelLayout, sizeof(ALACAudioChannelLayout)); data/audiofile-0.3.6/libaudiofile/alac/dp_dec.c:71: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( &out[1], &pc1[1], (num - 1) * sizeof(int32_t) ); data/audiofile-0.3.6/libaudiofile/alac/dp_enc.c:92: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( &pc1[1], &in[1], (num - 1) * sizeof(int32_t) ); data/audiofile-0.3.6/libaudiofile/audiofile.h:470:66: [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. AFAPI int afGetAESChannelData (AFfilehandle, int track, unsigned char buf[24]); data/audiofile-0.3.6/libaudiofile/audiofile.h:471:67: [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. AFAPI void afSetAESChannelData (AFfilehandle, int track, unsigned char buf[24]); data/audiofile-0.3.6/libaudiofile/debug.cpp:244: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 linebuf[81]; data/audiofile-0.3.6/libaudiofile/error.c:58: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[1024]; data/audiofile-0.3.6/libaudiofile/g711.c:41:23: [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 unsigned char _u2a[128] = { /* u- to A-law conversions */ data/audiofile-0.3.6/libaudiofile/g711.c:59:23: [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 unsigned char _a2u[128] = { /* A- to u-law conversions */ data/audiofile-0.3.6/libaudiofile/modules/ALAC.cpp:132: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(v, m_codecData->data(), cookieSize); data/audiofile-0.3.6/libaudiofile/modules/ALAC.cpp:191: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(codecData->data(), data, codecDataSize); data/audiofile-0.3.6/libaudiofile/modules/ALAC.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(codecData->data(), data, codecDataSize); data/audiofile-0.3.6/libaudiofile/modules/FLAC.cpp:133: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_buffer[c], buffer[c], frame->header.blocksize * sizeof (int32_t)); data/audiofile-0.3.6/libaudiofile/modules/MSADPCM.cpp:408: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_coefficients, v, m_numCoefficients * 2 * sizeof (int16_t)); data/audiofile-0.3.6/libaudiofile/modules/RebufferModule.cpp:103: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(outBuffer, m_buffer + m_offset * m_bytesPerFrame, data/audiofile-0.3.6/libaudiofile/modules/RebufferModule.cpp:129: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(outBuffer, inBuffer, data/audiofile-0.3.6/libaudiofile/modules/RebufferModule.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_buffer + m_offset * m_bytesPerFrame, data/audiofile-0.3.6/libaudiofile/modules/RebufferModule.cpp:196: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_outChunk->buffer, m_buffer, m_offset * m_bytesPerFrame); data/audiofile-0.3.6/libaudiofile/modules/RebufferModule.cpp:204: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(outBuffer + m_offset * m_bytesPerFrame, data/audiofile-0.3.6/libaudiofile/modules/RebufferModule.cpp:220: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(outBuffer + m_offset * m_bytesPerFrame, data/audiofile-0.3.6/libaudiofile/modules/RebufferModule.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_buffer + m_offset * m_bytesPerFrame, data/audiofile-0.3.6/libaudiofile/modules/RebufferModule.cpp:255: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_savedBuffer, m_buffer, m_numFrames * m_bytesPerFrame); data/audiofile-0.3.6/libaudiofile/modules/RebufferModule.cpp:263: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_outChunk->buffer, m_buffer, m_offset * m_bytesPerFrame); data/audiofile-0.3.6/libaudiofile/modules/RebufferModule.cpp:267: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_buffer, m_savedBuffer, m_numFrames * m_bytesPerFrame); data/audiofile-0.3.6/libaudiofile/openclose.cpp:208:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). File *f = File::open(filename, data/audiofile-0.3.6/sfcommands/sfconvert.c:146:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). outChannelCount = atoi(argv[i+1]); data/audiofile-0.3.6/sfcommands/sfconvert.c:173:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). outSampleWidth = atoi(argv[i+1]); data/audiofile-0.3.6/test/AES.cpp:53:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char aesData[24]; data/audiofile-0.3.6/test/AES.cpp:63:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char readAESData[24]; data/audiofile-0.3.6/test/Loop.cpp:56: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. const char * const markerNames[numMarkers] = data/audiofile-0.3.6/test/Marker.cpp:39: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. const char * const markerNames[numMarkers] = data/audiofile-0.3.6/test/Marker.cpp:47: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. const char * const markerComments[numMarkers] = data/audiofile-0.3.6/test/Marker.cpp:136: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. const char * const markerNames[numMarkers] = { "name" }; data/audiofile-0.3.6/test/Marker.cpp:137: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. const char * const markerComments[numMarkers] = { "comment" }; data/audiofile-0.3.6/test/NeXT.cpp:88:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = ::open(testFileName.c_str(), O_RDWR | O_CREAT | O_TRUNC, 0644); data/audiofile-0.3.6/test/NeXT.cpp:123:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = ::open(testFileName.c_str(), O_RDWR | O_CREAT | O_TRUNC, 0644); data/audiofile-0.3.6/test/NeXT.cpp:173:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = ::open(testFileName.c_str(), O_RDWR | O_CREAT | O_TRUNC, 0644); data/audiofile-0.3.6/test/TestUtilities.cpp:31:13: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). int fd = ::mkstemp(const_cast<char *>(path->c_str())); data/audiofile-0.3.6/test/VirtualFile.cpp:123:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen(testFileName.c_str(), "r"); data/audiofile-0.3.6/test/VirtualFile.cpp:146:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen(testFileName.c_str(), "w"); data/audiofile-0.3.6/test/query2.c:123: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 *) afQueryPointer(AF_QUERYTYPE_INSTPARAM, data/audiofile-0.3.6/test/testdouble.c:79: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 *) afQueryPointer(AF_QUERYTYPE_FILEFMT, AF_QUERY_NAME, fileFormats[i], 0, 0)); data/audiofile-0.3.6/test/twentyfour.c:145: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(z, x, 4); data/audiofile-0.3.6/test/twentyfour.c:211: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(z, x, 4); data/audiofile-0.3.6/examples/osxplay.c:249:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(250000); data/audiofile-0.3.6/gtest/gtest-all.cpp:2155:47: [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). NULL : CloneString(c_str, strlen(c_str)); data/audiofile-0.3.6/gtest/gtest-all.cpp:2165: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). const int length = strlen(ansi); data/audiofile-0.3.6/gtest/gtest-all.cpp:2810:34: [1] (buffer) wcslen: 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). num_chars = static_cast<int>(wcslen(str)); data/audiofile-0.3.6/gtest/gtest-all.cpp:2975: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). const size_t this_len = strlen(c_str()); data/audiofile-0.3.6/gtest/gtest-all.cpp:2976: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). const size_t suffix_len = strlen(suffix); data/audiofile-0.3.6/gtest/gtest-all.cpp:2988: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). const size_t this_len = strlen(c_str()); data/audiofile-0.3.6/gtest/gtest-all.cpp:2989: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). const size_t suffix_len = strlen(suffix); data/audiofile-0.3.6/gtest/gtest-all.cpp:4517:32: [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). segment = next_segment + strlen("]]>"); data/audiofile-0.3.6/gtest/gtest-all.cpp:4746:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). result.reserve(strlen(str) + 1); data/audiofile-0.3.6/gtest/gtest-all.cpp:5851: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). const size_t prefix_len = strlen(prefix); data/audiofile-0.3.6/gtest/gtest-all.cpp:7952: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). const size_t full_regex_len = strlen(regex) + 10; data/audiofile-0.3.6/gtest/gtest-all.cpp:8206: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). const size_t len = strlen(regex); data/audiofile-0.3.6/gtest/gtest-all.cpp:8854: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). PrintCharsAsStringTo(s, strlen(s), os); data/audiofile-0.3.6/gtest/gtest-all.cpp:8871:33: [1] (buffer) wcslen: 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). PrintWideCharsAsStringTo(s, wcslen(s), os); data/audiofile-0.3.6/gtest/gtest.h:2672:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). return strncpy(dest, src, n); data/audiofile-0.3.6/gtest/gtest.h:2694:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return static_cast<int>(read(fd, buf, count)); data/audiofile-0.3.6/gtest/gtest.h:3050: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). ConstructNonNull(a_c_str, strlen(a_c_str)); data/audiofile-0.3.6/libaudiofile/AIFF.cpp:146:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (m_fh->read(aesChannelStatusData, 24) != 24) data/audiofile-0.3.6/libaudiofile/AIFF.cpp:195:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m_fh->read(m_miscellaneous[m_miscellaneousCount - 1].buffer, size); data/audiofile-0.3.6/libaudiofile/AIFF.cpp:290:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m_fh->read(&sizeByte, 1); data/audiofile-0.3.6/libaudiofile/AIFF.cpp:292:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m_fh->read(markerName, sizeByte); data/audiofile-0.3.6/libaudiofile/AIFF.cpp:345:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m_fh->read(sampleRate, 10); data/audiofile-0.3.6/libaudiofile/AIFF.cpp:477:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m_fh->read(&type, 4); data/audiofile-0.3.6/libaudiofile/AIFF.cpp:479:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m_fh->read(&formtype, 4); data/audiofile-0.3.6/libaudiofile/AIFF.cpp:577:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fh->read(buffer, 8) != 8 || memcmp(buffer, "FORM", 4) != 0) data/audiofile-0.3.6/libaudiofile/AIFF.cpp:579:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fh->read(buffer, 4) != 4 || memcmp(buffer, "AIFF", 4) != 0) data/audiofile-0.3.6/libaudiofile/AIFF.cpp:591:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fh->read(buffer, 8) != 8 || memcmp(buffer, "FORM", 4) != 0) data/audiofile-0.3.6/libaudiofile/AIFF.cpp:593:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fh->read(buffer, 4) != 4 || memcmp(buffer, "AIFC", 4) != 0) data/audiofile-0.3.6/libaudiofile/AIFF.cpp:890:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). chunkSize = 22 + strlen(compressionName) + 1; data/audiofile-0.3.6/libaudiofile/AIFF.cpp:1190:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (m_fh->read(&length, 1) != 1) data/audiofile-0.3.6/libaudiofile/AIFF.cpp:1192:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (m_fh->read(s, length) != static_cast<ssize_t>(length)) data/audiofile-0.3.6/libaudiofile/AIFF.cpp:1201:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t length = strlen(s); data/audiofile-0.3.6/libaudiofile/AVR.cpp:70:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fh->read(&magic, 4) != 4 || memcmp(&magic, "2BIT", 4) != 0) data/audiofile-0.3.6/libaudiofile/AVR.cpp:87:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (m_fh->read(&magic, 4) != 4) data/audiofile-0.3.6/libaudiofile/AVR.cpp:100:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m_fh->read(name, 8); data/audiofile-0.3.6/libaudiofile/AVR.cpp:113:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m_fh->read(reserved, 26); data/audiofile-0.3.6/libaudiofile/AVR.cpp:114:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m_fh->read(user, 64); data/audiofile-0.3.6/libaudiofile/AVR.cpp:299:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, af_basename(m_fileName), 8); data/audiofile-0.3.6/libaudiofile/CAF.cpp:92:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (file->read(buffer, 8) != 8 || memcmp(buffer, "caff", 4) != 0) data/audiofile-0.3.6/libaudiofile/CAF.cpp:456:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (m_fh->read(buffer->data(), tableLength) != tableLength) data/audiofile-0.3.6/libaudiofile/CAF.cpp:486:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (m_fh->read(m_codecData->data(), length) != length) data/audiofile-0.3.6/libaudiofile/FLACFile.cpp:56:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (file->read(buffer, 4) != 4 || memcmp(buffer, "fLaC", 4) != 0) data/audiofile-0.3.6/libaudiofile/FLACFile.cpp:203:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t result = flac->m_fh->read(buffer, *bytes); data/audiofile-0.3.6/libaudiofile/File.cpp:51:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual ssize_t read(void *data, size_t nbytes) OVERRIDE; data/audiofile-0.3.6/libaudiofile/File.cpp:68:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual ssize_t read(void *data, size_t nbytes) OVERRIDE; data/audiofile-0.3.6/libaudiofile/File.cpp:124:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t FilePOSIX::read(void *data, size_t nbytes) data/audiofile-0.3.6/libaudiofile/File.cpp:126:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return ::read(m_fd, data, nbytes); data/audiofile-0.3.6/libaudiofile/File.cpp:172:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t FileVF::read(void *data, size_t nbytes) data/audiofile-0.3.6/libaudiofile/File.cpp:174:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return m_vf->read(m_vf, data, nbytes); data/audiofile-0.3.6/libaudiofile/File.h:60:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual ssize_t read(void *data, size_t nbytes) = 0; data/audiofile-0.3.6/libaudiofile/FileHandle.cpp:353:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return f->read(value, sizeof (*value)) == sizeof (*value); data/audiofile-0.3.6/libaudiofile/FileHandle.cpp:476:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (m_fh->read(&v, sizeof (v)) == sizeof (v)) data/audiofile-0.3.6/libaudiofile/IFF.cpp:67:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fh->read(buffer, 8) != 8 || memcmp(buffer, "FORM", 4) != 0) data/audiofile-0.3.6/libaudiofile/IFF.cpp:69:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fh->read(buffer, 4) != 4 || memcmp(buffer, "8SVX", 4) != 0) data/audiofile-0.3.6/libaudiofile/IFF.cpp:117:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m_fh->read(m_miscellaneous[m_miscellaneousCount - 1].buffer, size); data/audiofile-0.3.6/libaudiofile/IRCAM.cpp:106:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fh->read(buffer, 4) != 4) data/audiofile-0.3.6/libaudiofile/IRCAM.cpp:220:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (m_fh->read(magic, 4) != 4) data/audiofile-0.3.6/libaudiofile/Marker.cpp:101: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). length = strlen(namestr); data/audiofile-0.3.6/libaudiofile/Marker.cpp:113:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(track->markers[markno].name, namestr, length); data/audiofile-0.3.6/libaudiofile/Marker.cpp:146: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). length = strlen(commstr); data/audiofile-0.3.6/libaudiofile/NIST.cpp:68:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fh->read(buffer, 16) != 16) data/audiofile-0.3.6/libaudiofile/NIST.cpp:204:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (m_fh->read(header, NIST_SPHERE_HEADER_LENGTH) != NIST_SPHERE_HEADER_LENGTH) data/audiofile-0.3.6/libaudiofile/NIST.cpp:434: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). (int) strlen(sample_coding(&track->f)), sample_coding(&track->f)); data/audiofile-0.3.6/libaudiofile/NeXT.cpp:111:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m_fh->read(&id, 4); data/audiofile-0.3.6/libaudiofile/NeXT.cpp:211:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fh->read(buffer, 4) != 4 || memcmp(buffer, ".snd", 4) != 0) data/audiofile-0.3.6/libaudiofile/SampleVision.cpp:59: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/audiofile-0.3.6/libaudiofile/SampleVision.cpp:81:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fh->read(magic, kSMPMagicLength) != (ssize_t) kSMPMagicLength) data/audiofile-0.3.6/libaudiofile/SampleVision.cpp:142:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (m_fh->read(magic, kSMPMagicLength) != (ssize_t) kSMPMagicLength) data/audiofile-0.3.6/libaudiofile/SampleVision.cpp:148:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (m_fh->read(version, kSMPVersionLength) != (ssize_t) kSMPVersionLength) data/audiofile-0.3.6/libaudiofile/SampleVision.cpp:156:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m_fh->read(name, kSMPNameLength); data/audiofile-0.3.6/libaudiofile/SampleVision.cpp:159: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(name) > 0) data/audiofile-0.3.6/libaudiofile/SampleVision.cpp:163:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m_fh->read(comment, kSMPCommentLength); data/audiofile-0.3.6/libaudiofile/SampleVision.cpp:166: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(comment) > 0) data/audiofile-0.3.6/libaudiofile/SampleVision.cpp:224:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m_fh->read(name, kSMPMarkerNameLength); data/audiofile-0.3.6/libaudiofile/SampleVision.cpp:241: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). m.size = strlen(data); data/audiofile-0.3.6/libaudiofile/Tag.h:36: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). assert(strlen(s) == 4); data/audiofile-0.3.6/libaudiofile/VOC.cpp:93:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (f->read(buffer, kVOCMagicLength) != kVOCMagicLength) data/audiofile-0.3.6/libaudiofile/WAVE.cpp:556:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m_fh->read(p, length); data/audiofile-0.3.6/libaudiofile/WAVE.cpp:625:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m_fh->read(string, miscsize); data/audiofile-0.3.6/libaudiofile/WAVE.cpp:698:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fh->read(buffer, 8) != 8 || memcmp(buffer, "RIFF", 4) != 0) data/audiofile-0.3.6/libaudiofile/WAVE.cpp:700:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fh->read(buffer, 4) != 4 || memcmp(buffer, "WAVE", 4) != 0) data/audiofile-0.3.6/libaudiofile/WAVE.cpp:1502: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). ssize_t lengthPlusNull = strlen(s) + 1; data/audiofile-0.3.6/libaudiofile/WAVE.cpp:1516:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t lengthPlusNull = strlen(s) + 1; data/audiofile-0.3.6/libaudiofile/WAVE.cpp:1545:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return m_fh->read(u->data, 16) == 16; data/audiofile-0.3.6/libaudiofile/af_vfs.h:45:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t (*read) (AFvirtualfile *vfile, void *data, size_t nbytes); data/audiofile-0.3.6/libaudiofile/modules/ALAC.cpp:240:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(m_inChunk->buffer, bytesPerPacket) < bytesPerPacket) data/audiofile-0.3.6/libaudiofile/modules/BlockCodec.cpp:49:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t bytesRead = read(m_inChunk->buffer, m_bytesPerPacket * blockCount); data/audiofile-0.3.6/libaudiofile/modules/FLAC.cpp:67:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t result = flac->read(buffer, *bytes); data/audiofile-0.3.6/libaudiofile/modules/FileModule.cpp:40:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t FileModule::read(void *data, size_t nbytes) data/audiofile-0.3.6/libaudiofile/modules/FileModule.cpp:42:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t bytesRead = m_fh->read(data, nbytes); data/audiofile-0.3.6/libaudiofile/modules/FileModule.h:40:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t read(void *data, size_t nbytes); data/audiofile-0.3.6/libaudiofile/modules/G711.cpp:200:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t bytesRead = read(m_inChunk->buffer, framesize * framesToRead); data/audiofile-0.3.6/libaudiofile/modules/PCM.cpp:166:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t bytesRead = read(m_outChunk->buffer, m_bytesPerFrame * framesToRead); data/audiofile-0.3.6/libaudiofile/util.cpp:114:28: [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 *p = (char *) malloc(strlen(s) + 1); data/audiofile-0.3.6/test/Miscellaneous.cpp:68:47: [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). afInitMiscSize(setup, kMiscellaneous[i].id, strlen(kMiscellaneous[i].data)); data/audiofile-0.3.6/test/Miscellaneous.cpp:78:4: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(kMiscellaneous[i].data)); data/audiofile-0.3.6/test/Miscellaneous.cpp:79: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). EXPECT_EQ(result, strlen(kMiscellaneous[i].data)); data/audiofile-0.3.6/test/Miscellaneous.cpp:104: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). EXPECT_EQ(datasize, strlen(kMiscellaneous[i].data)); ANALYSIS SUMMARY: Hits = 271 Lines analyzed = 64606 in approximately 1.63 seconds (39679 lines/second) Physical Source Lines of Code (SLOC) = 42577 Hits@level = [0] 372 [1] 99 [2] 124 [3] 14 [4] 34 [5] 0 Hits@level+ = [0+] 643 [1+] 271 [2+] 172 [3+] 48 [4+] 34 [5+] 0 Hits/KSLOC@level+ = [0+] 15.1021 [1+] 6.36494 [2+] 4.03974 [3+] 1.12737 [4+] 0.798553 [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.