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/libambix-0.1.1/libambix/ambix/ambix.h Examining data/libambix-0.1.1/libambix/ambix/exportdefs.h Examining data/libambix-0.1.1/libambix/src/adaptor.c Examining data/libambix-0.1.1/libambix/src/adaptor_acn.c Examining data/libambix-0.1.1/libambix/src/adaptor_fuma.c Examining data/libambix-0.1.1/libambix/src/libambix.c Examining data/libambix-0.1.1/libambix/src/marker_region_chunk.c Examining data/libambix-0.1.1/libambix/src/matrix.c Examining data/libambix-0.1.1/libambix/src/matrix_invert.c Examining data/libambix-0.1.1/libambix/src/null.c Examining data/libambix-0.1.1/libambix/src/private.h Examining data/libambix-0.1.1/libambix/src/sndfile.c Examining data/libambix-0.1.1/libambix/src/utils.c Examining data/libambix-0.1.1/libambix/src/uuid_chunk.c Examining data/libambix-0.1.1/libambix/tests/ambix_close.c Examining data/libambix-0.1.1/libambix/tests/ambix_get_sndfile.c Examining data/libambix-0.1.1/libambix/tests/ambix_open.c Examining data/libambix-0.1.1/libambix/tests/ambix_readf_int16.c Examining data/libambix-0.1.1/libambix/tests/ambix_seek.c Examining data/libambix-0.1.1/libambix/tests/ambix_seek_read.c Examining data/libambix-0.1.1/libambix/tests/ambix_writef_int16.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_FUMA4x4_3extra_float32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_FUMA4x4_3extra_float64.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_FUMA4x4_3extra_pcm16.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_FUMA4x4_3extra_pcm32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_FUMA4x4_float32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_FUMA4x4_float64.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_FUMA4x4_pcm16.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_FUMA4x4_pcm32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_N3D4x4_3extra_float32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_N3D4x4_3extra_float64.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_N3D4x4_3extra_pcm16.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_N3D4x4_3extra_pcm32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_N3D4x4_float32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_N3D4x4_float64.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_N3D4x4_pcm16.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_N3D4x4_pcm32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_SID4x4_3extra_float32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_SID4x4_3extra_float64.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_SID4x4_3extra_pcm16.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_SID4x4_3extra_pcm32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_SID4x4_float32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_SID4x4_float64.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_SID4x4_pcm16.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_SID4x4_pcm32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_identity4x4_3extra_float32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_identity4x4_3extra_float64.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_identity4x4_3extra_pcm16.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_identity4x4_3extra_pcm32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_identity4x4_float32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_identity4x4_float32__f64.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_identity4x4_float32__i16.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_identity4x4_float32__i32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_identity4x4_float64.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_identity4x4_pcm16.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_identity4x4_pcm32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_rand4x7_3extra_float32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_rand4x7_3extra_float64.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_rand4x7_3extra_pcm16.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_rand4x7_3extra_pcm32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_rand4x7_float32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_rand4x7_float64.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_rand4x7_pcm16.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_rand4x7_pcm32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_rand4x9_3extra_float32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_rand4x9_3extra_float64.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_rand4x9_3extra_pcm16.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_rand4x9_3extra_pcm32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_rand4x9_float32.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_rand4x9_float64.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_rand4x9_pcm16.c Examining data/libambix-0.1.1/libambix/tests/basic2extended_rand4x9_pcm32.c Examining data/libambix-0.1.1/libambix/tests/basic_float32.c Examining data/libambix-0.1.1/libambix/tests/basic_float64.c Examining data/libambix-0.1.1/libambix/tests/basic_pcm16.c Examining data/libambix-0.1.1/libambix/tests/basic_pcm32.c Examining data/libambix-0.1.1/libambix/tests/common.c Examining data/libambix-0.1.1/libambix/tests/common_basic.c Examining data/libambix-0.1.1/libambix/tests/common_basic2extended.c Examining data/libambix-0.1.1/libambix/tests/common_basic2extended.h Examining data/libambix-0.1.1/libambix/tests/common_extended.c Examining data/libambix-0.1.1/libambix/tests/common_none.c Examining data/libambix-0.1.1/libambix/tests/const_matrix.c Examining data/libambix-0.1.1/libambix/tests/data.h Examining data/libambix-0.1.1/libambix/tests/datatest.c Examining data/libambix-0.1.1/libambix/tests/debug_utils.c Examining data/libambix-0.1.1/libambix/tests/extended_float32_0.c Examining data/libambix-0.1.1/libambix/tests/extended_float32_1024.c Examining data/libambix-0.1.1/libambix/tests/extended_float64_0.c Examining data/libambix-0.1.1/libambix/tests/extended_float64_1024.c Examining data/libambix-0.1.1/libambix/tests/extended_pcm16_0.c Examining data/libambix-0.1.1/libambix/tests/extended_pcm16_1024.c Examining data/libambix-0.1.1/libambix/tests/extended_pcm32_0.c Examining data/libambix-0.1.1/libambix/tests/extended_pcm32_1024.c Examining data/libambix-0.1.1/libambix/tests/fail.c Examining data/libambix-0.1.1/libambix/tests/fail_if0.c Examining data/libambix-0.1.1/libambix/tests/fail_if1.c Examining data/libambix-0.1.1/libambix/tests/markers_regions.c Examining data/libambix-0.1.1/libambix/tests/matrices.c Examining data/libambix-0.1.1/libambix/tests/matrixtests.c Examining data/libambix-0.1.1/libambix/tests/none_float32.c Examining data/libambix-0.1.1/libambix/tests/none_float64.c Examining data/libambix-0.1.1/libambix/tests/pass.c Examining data/libambix-0.1.1/libambix/tests/pass_if0.c Examining data/libambix-0.1.1/libambix/tests/pass_if1.c Examining data/libambix-0.1.1/libambix/tests/skip.c Examining data/libambix-0.1.1/libambix/tests/skip_if0.c Examining data/libambix-0.1.1/libambix/tests/skip_if1.c Examining data/libambix-0.1.1/libambix/tests/common.h Examining data/libambix-0.1.1/replacement/strndup.h Examining data/libambix-0.1.1/samples/pd/ambix_info.c Examining data/libambix-0.1.1/samples/pd/ambix_read~.c Examining data/libambix-0.1.1/samples/pd/ambix_write~.c Examining data/libambix-0.1.1/samples/pd/winhacks.c Examining data/libambix-0.1.1/samples/pd/winhacks.h Examining data/libambix-0.1.1/utils/ambix-deinterleave.c Examining data/libambix-0.1.1/utils/ambix-dump.c Examining data/libambix-0.1.1/utils/ambix-info.c Examining data/libambix-0.1.1/utils/ambix-jplay.c Examining data/libambix-0.1.1/utils/ambix-jrecord.c Examining data/libambix-0.1.1/utils/ambix-matrix.c Examining data/libambix-0.1.1/utils/ambix-test.c Examining data/libambix-0.1.1/utils/jcommon/common.c Examining data/libambix-0.1.1/utils/jcommon/common.h Examining data/libambix-0.1.1/utils/jcommon/jack-ringbuffer.c Examining data/libambix-0.1.1/utils/jcommon/jack-ringbuffer.h Examining data/libambix-0.1.1/utils/jcommon/observe-signal.c Examining data/libambix-0.1.1/utils/jcommon/observe-signal.h Examining data/libambix-0.1.1/utils/ambix-interleave.c FINAL RESULTS: data/libambix-0.1.1/libambix/src/sndfile.c:43: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/libambix-0.1.1/libambix/src/sndfile.c:43: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/libambix-0.1.1/libambix/tests/common.h:50: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 (format, argptr) ; data/libambix-0.1.1/libambix/tests/common.h:63: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 (format, argptr) ; data/libambix-0.1.1/libambix/tests/common.h:76: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 (format, argptr) ; data/libambix-0.1.1/libambix/tests/common.h:89: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 (format, argptr) ; data/libambix-0.1.1/libambix/tests/common.h:133:96: [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 STARTTEST printf("<<< running TEST %s[%04d]:%s\t", __FILE__, __LINE__, __FUNCTION__),printf data/libambix-0.1.1/libambix/tests/common.h:134:96: [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 STOPTEST printf(">>> test SUCCESS %s[%04d]:%s\t", __FILE__, __LINE__, __FUNCTION__),printf data/libambix-0.1.1/samples/pd/ambix_info.c:25:72: [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 MARK printf("%s[%d]:%s\t", __FILE__, __LINE__, __FUNCTION__), printf data/libambix-0.1.1/samples/pd/ambix_read~.c:30:72: [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 MARK printf("%s[%d]:%s\t", __FILE__, __LINE__, __FUNCTION__), printf data/libambix-0.1.1/samples/pd/winhacks.h:34: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/libambix-0.1.1/samples/pd/winhacks.h:34: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/libambix-0.1.1/utils/ambix-deinterleave.c:52: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/libambix-0.1.1/utils/ambix-deinterleave.c:52: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/libambix-0.1.1/utils/jcommon/common.c:93:3: [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. snprintf(name, 64, format, n); data/libambix-0.1.1/utils/jcommon/common.h:38:22: [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. #define eprintf(...) fprintf(stderr,__VA_ARGS__) data/libambix-0.1.1/libambix/tests/common.c:307:12: [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(NULL==getenv("AMBIXTEST_KEEPFILES"))return unlink(path); data/libambix-0.1.1/utils/ambix-jplay.c:473:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *dst_pattern = getenv("AMBIX_PLAY_CONNECT_ACN_TO"); data/libambix-0.1.1/utils/ambix-jplay.c:479:17: [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. dst_pattern = getenv("AMBIX_PLAY_CONNECT_EXTRA_TO"); data/libambix-0.1.1/utils/ambix-jplay.c:531:14: [3] (buffer) getopt: 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((c = getopt(argc, argv, "b:c:hVi:m:n:q:r:tu")) != -1) { data/libambix-0.1.1/utils/ambix-jrecord.c:317:14: [3] (buffer) getopt: 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((c = getopt(argc, argv, "hVx:X:O:b:fhm:n:t:")) != -1) { data/libambix-0.1.1/libambix/ambix/ambix.h:235: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[256]; data/libambix-0.1.1/libambix/ambix/ambix.h:245: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[256]; data/libambix-0.1.1/libambix/src/libambix.c:192: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(ambixinfo, &ambix->info, sizeof(ambix->info)); data/libambix-0.1.1/libambix/src/libambix.c:270: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(&ambix->markers[ambix->num_markers], marker, sizeof(ambix_marker_t)); data/libambix-0.1.1/libambix/src/libambix.c:291: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(&ambix->regions[ambix->num_regions], region, sizeof(ambix_region_t)); data/libambix-0.1.1/libambix/src/marker_region_chunk.c:149: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 b[4]; data/libambix-0.1.1/libambix/src/marker_region_chunk.c:246: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(mystrings.strings[mystrings.num_strings], mString, mString_len*sizeof(unsigned char)); data/libambix-0.1.1/libambix/src/marker_region_chunk.c:376: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(byte_ptr_strings, name, name_len*sizeof(char)); data/libambix-0.1.1/libambix/src/private.h:201:33: [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. uint32_t _ambix_checkUUID(const char UUID[16]); data/libambix-0.1.1/libambix/src/sndfile.c:379: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(chunk->data, data, datasize); data/libambix-0.1.1/libambix/src/sndfile.c:387: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(uuid.id, data, 16); data/libambix-0.1.1/libambix/src/sndfile.c:420: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(chunk->id, &id, 4); data/libambix-0.1.1/libambix/src/sndfile.c:427: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(chunk->data, data, datasize); data/libambix-0.1.1/libambix/src/sndfile.c:447: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(chunk_info.id, &id, 4); data/libambix-0.1.1/libambix/src/uuid_chunk.c:53:37: [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 _ambix_printUUID4(const char data[2]) { data/libambix-0.1.1/libambix/src/uuid_chunk.c:58:36: [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 _ambix_printUUID(const char data[16]) { data/libambix-0.1.1/libambix/src/uuid_chunk.c:94:24: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. _ambix_checkUUID(const char data[16]) { data/libambix-0.1.1/libambix/src/uuid_chunk.c:117: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(&rows, cdata+index, sizeof(uint32_t)); data/libambix-0.1.1/libambix/src/uuid_chunk.c:120: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(&cols, cdata+index, sizeof(uint32_t)); data/libambix-0.1.1/libambix/src/uuid_chunk.c:188: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(cdata, uuid, 16); data/libambix-0.1.1/libambix/src/uuid_chunk.c:194: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(cdata+index, &rows, sizeof(uint32_t)); data/libambix-0.1.1/libambix/src/uuid_chunk.c:197: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(cdata+index, &cols, sizeof(uint32_t)); data/libambix-0.1.1/libambix/src/uuid_chunk.c:201: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(cdata+index, mtx[r], cols*sizeof(float32_t)); data/libambix-0.1.1/libambix/tests/common.c:122: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 aout[16]; data/libambix-0.1.1/libambix/tests/common.c:123: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 bout[16]; data/libambix-0.1.1/libambix/tests/common.c:175: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 out[16]; data/libambix-0.1.1/libambix/tests/common_basic.c:53: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(&rinfo, &info, sizeof(info)); data/libambix-0.1.1/libambix/tests/common_basic.c:61: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(data, orgdata, frames*channels*sizeof(float32_t)); data/libambix-0.1.1/libambix/tests/common_basic2extended.c:58: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(&winfo, &info, sizeof(info)); data/libambix-0.1.1/libambix/tests/common_basic2extended.c:67: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(ambidata, orgambidata, framesize*fullambichannels*data_size(fmt)); data/libambix-0.1.1/libambix/tests/common_basic2extended.c:68: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(otherdata, orgotherdata, framesize*extrachannels*data_size(fmt)); data/libambix-0.1.1/libambix/tests/common_extended.c:63: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(&rinfo, &info, sizeof(info)); data/libambix-0.1.1/libambix/tests/common_extended.c:74: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(ambidata, orgambidata, framesize*ambichannels*sizeof(float32_t)); data/libambix-0.1.1/libambix/tests/common_extended.c:75: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(otherdata, orgotherdata, framesize*extrachannels*sizeof(float32_t)); data/libambix-0.1.1/libambix/tests/common_none.c:51: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(&rinfo, &info, sizeof(info)); data/libambix-0.1.1/libambix/tests/common_none.c:59: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(data, orgdata, frames*channels*sizeof(float32_t)); data/libambix-0.1.1/libambix/tests/const_matrix.c:65: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(data, orgdata, frames*sizeof(*orgdata)); data/libambix-0.1.1/libambix/tests/const_matrix.c:105: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(org_vectors, mtx->data, rows*sizeof(*org_data)); data/libambix-0.1.1/libambix/tests/const_matrix.c:109: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(org_data[r], mtx->data[r], cols*sizeof(*org_data[r])); data/libambix-0.1.1/libambix/tests/matrices.c:154: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[64]; data/libambix-0.1.1/replacement/strndup.h:49:19: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return (char *) memcpy (result, s, len); data/libambix-0.1.1/samples/pd/ambix_info.c:69: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[MAXPDSTRING]; data/libambix-0.1.1/samples/pd/ambix_info.c:70: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 result[MAXPDSTRING]; data/libambix-0.1.1/samples/pd/ambix_read~.c:127: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[MAXPDSTRING]; data/libambix-0.1.1/samples/pd/ambix_read~.c:128: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 result[MAXPDSTRING]; data/libambix-0.1.1/samples/pd/ambix_read~.c:299: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(&x->x_ambix, &ainfo, sizeof(ainfo)); data/libambix-0.1.1/utils/ambix-deinterleave.c:131:19: [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). blocksize=atoi(argv[1]); data/libambix-0.1.1/utils/ambix-deinterleave.c:283: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 filename[MAX_FILENAMESIZE]; data/libambix-0.1.1/utils/ambix-deinterleave.c:288: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(&ai->outinfo[channel], &info, sizeof(info)); data/libambix-0.1.1/utils/ambix-deinterleave.c:300: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 filename[MAX_FILENAMESIZE]; data/libambix-0.1.1/utils/ambix-deinterleave.c:304: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(&ai->outinfo[channel], &info, sizeof(info)); data/libambix-0.1.1/utils/ambix-dump.c:118:19: [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). blocksize=atoi(argv[1]); data/libambix-0.1.1/utils/ambix-interleave.c:200:15: [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). order=atoi(argv[1]); data/libambix-0.1.1/utils/ambix-interleave.c:212:19: [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). blocksize=atoi(argv[1]); data/libambix-0.1.1/utils/ambix-jplay.c:56:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char client_name[64]; data/libambix-0.1.1/utils/ambix-jplay.c:475: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 src_pattern[128]; data/libambix-0.1.1/utils/ambix-jplay.c:481: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 src_pattern[128]; data/libambix-0.1.1/utils/jcommon/common.c:72: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 uniq[64]; data/libambix-0.1.1/utils/jcommon/common.c:84: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 uniq[64]; data/libambix-0.1.1/utils/jcommon/common.c:91: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[64]; data/libambix-0.1.1/libambix/src/marker_region_chunk.c:244: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). mString_len = strlen((const char *)mString); data/libambix-0.1.1/libambix/src/marker_region_chunk.c:284:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(new_ambix_marker.name, (const char *)string, 255); data/libambix-0.1.1/libambix/src/marker_region_chunk.c:343:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(new_ambix_region.name, (const char *)string, 255); data/libambix-0.1.1/libambix/src/marker_region_chunk.c:373: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). uint32_t name_len = strlen((const char *)name); data/libambix-0.1.1/libambix/src/marker_region_chunk.c:444: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). byte_ptr_strings += (strlen((const char*)ambix->markers[i].name)+1); data/libambix-0.1.1/libambix/src/marker_region_chunk.c:498: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). byte_ptr_strings += (strlen((const char*)ambix->regions[i].name)+1); data/libambix-0.1.1/libambix/src/sndfile.c:175:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(uuid.id, _ambix_getUUID(1), 16); data/libambix-0.1.1/libambix/tests/markers_regions.c:31: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(marker_1.name, "this is marker #1", 255); data/libambix-0.1.1/libambix/tests/markers_regions.c:36: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(marker_2.name, "this is marker #2", 255); data/libambix-0.1.1/libambix/tests/markers_regions.c:52: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(region_1.name, "this is region #1", 255); data/libambix-0.1.1/libambix/tests/markers_regions.c:58: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(region_2.name, "this is region #2", 255); data/libambix-0.1.1/replacement/strndup.h:39:16: [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 len = strlen (s); data/libambix-0.1.1/utils/ambix-deinterleave.c:86:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). result=(char*)calloc(sizeof(char), strlen(filename)); data/libambix-0.1.1/utils/ambix-deinterleave.c:87:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(result, filename, length); data/libambix-0.1.1/utils/ambix-jplay.c:529: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(o.client_name, "ambix-jplay", 64); data/libambix-0.1.1/utils/ambix-jplay.c:552:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(o.client_name, optarg, 63); data/libambix-0.1.1/utils/jcommon/common.c:43:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t err = read(filedes, buffer, size); data/libambix-0.1.1/utils/jcommon/common.c:74:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name,uniq,64); data/libambix-0.1.1/utils/jcommon/jack-ringbuffer.c:31:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read(fd, &b, 1)== -1) { data/libambix-0.1.1/utils/jcommon/jack-ringbuffer.c:45:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read(fd, &b, 1)== -1) { ANALYSIS SUMMARY: Hits = 101 Lines analyzed = 14393 in approximately 0.59 seconds (24429 lines/second) Physical Source Lines of Code (SLOC) = 9841 Hits@level = [0] 395 [1] 20 [2] 60 [3] 5 [4] 16 [5] 0 Hits@level+ = [0+] 496 [1+] 101 [2+] 81 [3+] 21 [4+] 16 [5+] 0 Hits/KSLOC@level+ = [0+] 50.4014 [1+] 10.2632 [2+] 8.23087 [3+] 2.13393 [4+] 1.62585 [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.