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/croaring-0.2.66+ds/benchmarks/add_benchmark.c Examining data/croaring-0.2.66+ds/benchmarks/adversarialunions_benchmark.c Examining data/croaring-0.2.66+ds/benchmarks/array_container_benchmark.c Examining data/croaring-0.2.66+ds/benchmarks/benchmark.h Examining data/croaring-0.2.66+ds/benchmarks/bitset_container_benchmark.c Examining data/croaring-0.2.66+ds/benchmarks/create_benchmark.c Examining data/croaring-0.2.66+ds/benchmarks/equals_benchmark.c Examining data/croaring-0.2.66+ds/benchmarks/frozen_benchmark.c Examining data/croaring-0.2.66+ds/benchmarks/iteration_benchmark.c Examining data/croaring-0.2.66+ds/benchmarks/numbersfromtextfiles.h Examining data/croaring-0.2.66+ds/benchmarks/random.h Examining data/croaring-0.2.66+ds/benchmarks/real_bitmaps_benchmark.c Examining data/croaring-0.2.66+ds/benchmarks/real_bitmaps_contains_benchmark.c Examining data/croaring-0.2.66+ds/benchmarks/run_container_benchmark.c Examining data/croaring-0.2.66+ds/include/roaring/array_util.h Examining data/croaring-0.2.66+ds/include/roaring/bitset_util.h Examining data/croaring-0.2.66+ds/include/roaring/containers/array.h Examining data/croaring-0.2.66+ds/include/roaring/containers/bitset.h Examining data/croaring-0.2.66+ds/include/roaring/containers/containers.h Examining data/croaring-0.2.66+ds/include/roaring/containers/convert.h Examining data/croaring-0.2.66+ds/include/roaring/containers/mixed_andnot.h Examining data/croaring-0.2.66+ds/include/roaring/containers/mixed_equal.h Examining data/croaring-0.2.66+ds/include/roaring/containers/mixed_intersection.h Examining data/croaring-0.2.66+ds/include/roaring/containers/mixed_negation.h Examining data/croaring-0.2.66+ds/include/roaring/containers/mixed_subset.h Examining data/croaring-0.2.66+ds/include/roaring/containers/mixed_union.h Examining data/croaring-0.2.66+ds/include/roaring/containers/mixed_xor.h Examining data/croaring-0.2.66+ds/include/roaring/containers/perfparameters.h Examining data/croaring-0.2.66+ds/include/roaring/containers/run.h Examining data/croaring-0.2.66+ds/include/roaring/misc/configreport.h Examining data/croaring-0.2.66+ds/include/roaring/portability.h Examining data/croaring-0.2.66+ds/include/roaring/roaring_array.h Examining data/croaring-0.2.66+ds/include/roaring/roaring_types.h Examining data/croaring-0.2.66+ds/include/roaring/roaring_version.h Examining data/croaring-0.2.66+ds/include/roaring/utilasm.h Examining data/croaring-0.2.66+ds/include/roaring/roaring.h Examining data/croaring-0.2.66+ds/src/array_util.c Examining data/croaring-0.2.66+ds/src/bitset_util.c Examining data/croaring-0.2.66+ds/src/containers/array.c Examining data/croaring-0.2.66+ds/src/containers/bitset.c Examining data/croaring-0.2.66+ds/src/containers/containers.c Examining data/croaring-0.2.66+ds/src/containers/convert.c Examining data/croaring-0.2.66+ds/src/containers/mixed_andnot.c Examining data/croaring-0.2.66+ds/src/containers/mixed_equal.c Examining data/croaring-0.2.66+ds/src/containers/mixed_intersection.c Examining data/croaring-0.2.66+ds/src/containers/mixed_negation.c Examining data/croaring-0.2.66+ds/src/containers/mixed_subset.c Examining data/croaring-0.2.66+ds/src/containers/mixed_union.c Examining data/croaring-0.2.66+ds/src/containers/mixed_xor.c Examining data/croaring-0.2.66+ds/src/containers/run.c Examining data/croaring-0.2.66+ds/src/roaring_array.c Examining data/croaring-0.2.66+ds/src/roaring_priority_queue.c Examining data/croaring-0.2.66+ds/src/roaring.c Examining data/croaring-0.2.66+ds/tests/array_container_unit.c Examining data/croaring-0.2.66+ds/tests/bitset_container_unit.c Examining data/croaring-0.2.66+ds/tests/container_comparison_unit.c Examining data/croaring-0.2.66+ds/tests/cpp_unit.cpp Examining data/croaring-0.2.66+ds/tests/format_portability_unit.c Examining data/croaring-0.2.66+ds/tests/mixed_container_unit.c Examining data/croaring-0.2.66+ds/tests/realdata_unit.c Examining data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c Examining data/croaring-0.2.66+ds/tests/run_container_unit.c Examining data/croaring-0.2.66+ds/tests/test.h Examining data/croaring-0.2.66+ds/tests/toplevel_unit.c Examining data/croaring-0.2.66+ds/tests/unit.c Examining data/croaring-0.2.66+ds/tests/util_unit.c Examining data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c Examining data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.h Examining data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka_private.h FINAL RESULTS: data/croaring-0.2.66+ds/benchmarks/numbersfromtextfiles.h:123:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(modifdirname, dirname); data/croaring-0.2.66+ds/benchmarks/numbersfromtextfiles.h:133:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(fullpath, modifdirname); data/croaring-0.2.66+ds/benchmarks/numbersfromtextfiles.h:134:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(fullpath + dirlen, entry_list[i]->d_name); data/croaring-0.2.66+ds/benchmarks/real_bitmaps_benchmark.c:123:13: [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(KRED "cardinalities are wrong somehow\n"); data/croaring-0.2.66+ds/include/roaring/portability.h:37:82: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. #error This code assumes 64-bit long longs (by use of the GCC intrinsics). Your system is not currently supported. data/croaring-0.2.66+ds/tests/cpp_unit.cpp:178:8: [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. r2.printf(); data/croaring-0.2.66+ds/tests/cpp_unit.cpp:379:8: [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. r2.printf(); data/croaring-0.2.66+ds/tests/format_portability_unit.c:78:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(filename, TEST_DATA_DIR); data/croaring-0.2.66+ds/tests/format_portability_unit.c:87:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(filename, TEST_DATA_DIR); data/croaring-0.2.66+ds/tests/realdata_unit.c:857:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dirbuffer, BENCHMARK_DATA_DIR); data/croaring-0.2.66+ds/tests/realdata_unit.c:859:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dirbuffer + bddl, datadir[i]); data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:103:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(filename, TEST_DATA_DIR); data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:113:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(filename, TEST_DATA_DIR); data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:123:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(filename, TEST_DATA_DIR); data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:132:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(filename, TEST_DATA_DIR); data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:141:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(filename, TEST_DATA_DIR); data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:150:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(filename, TEST_DATA_DIR); data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:159:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(filename, TEST_DATA_DIR); data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:168:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(filename, TEST_DATA_DIR); data/croaring-0.2.66+ds/tests/unit.c:111:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(modifdirname, dirname); data/croaring-0.2.66+ds/tests/unit.c:121:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(fullpath, modifdirname); data/croaring-0.2.66+ds/tests/unit.c:122:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(fullpath + dirlen, entry_list[i]->d_name); data/croaring-0.2.66+ds/tests/unit.c:184:13: [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(KRED "intersection cardinalities are wrong.\n"); data/croaring-0.2.66+ds/tests/unit.c:197:13: [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(KRED "union cardinalities are wrong.\n"); data/croaring-0.2.66+ds/tests/unit.c:205:13: [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(KRED "cardinalities are wrong somehow\n"); data/croaring-0.2.66+ds/tests/unit.c:220:13: [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(KRED " there is a problem with in-place intersections\n"); data/croaring-0.2.66+ds/tests/unit.c:228:13: [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(KRED " there is a problem with in-place intersections\n"); data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:1447:11: [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. len = vsnprintf(buffer, sizeof(buffer), format, args); data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:1478:9: [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(cm_error_message + msg_len, len, format, ap); data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:1735:5: [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(buffer, sizeof(buffer), format, args); data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:1745:5: [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(buffer, sizeof(buffer), format, args); data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka_private.h:35:8: [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. #undef snprintf data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka_private.h:36:9: [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(d, n, ...) _snprintf_s((d), (n), _TRUNCATE, __VA_ARGS__) data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka_private.h:39:8: [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. #undef snprintf data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka_private.h:40:9: [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/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka_private.h:40:18: [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/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka_private.h:49:8: [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. #undef vsnprintf data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka_private.h:50:9: [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(s, n, f, v) _vsnprintf_s((s), (n), _TRUNCATE, (f), (v)) data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka_private.h:53:8: [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. #undef vsnprintf data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka_private.h:54:9: [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/croaring-0.2.66+ds/benchmarks/real_bitmaps_benchmark.c:49:17: [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, "e:h")) != -1) switch (c) { data/croaring-0.2.66+ds/benchmarks/real_bitmaps_contains_benchmark.c:65:17: [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, "e:h")) != -1) switch (c) { data/croaring-0.2.66+ds/tests/toplevel_unit.c:1500:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(2345); data/croaring-0.2.66+ds/tests/toplevel_unit.c:3028:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(1234); data/croaring-0.2.66+ds/tests/toplevel_unit.c:3086:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(1234); data/croaring-0.2.66+ds/tests/toplevel_unit.c:3174:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(1234); data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:329:30: [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 *abort_test = getenv("CMOCKA_TEST_ABORT"); data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:1772:11: [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. env = getenv("CMOCKA_MESSAGE_OUTPUT"); data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:1807:11: [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. env = getenv("CMOCKA_XML_FILE"); data/croaring-0.2.66+ds/benchmarks/frozen_benchmark.c:26:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0666); data/croaring-0.2.66+ds/benchmarks/frozen_benchmark.c:77: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). int fd = open(FILENAME, O_RDONLY); data/croaring-0.2.66+ds/benchmarks/numbersfromtextfiles.h:30:16: [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(filename, "r"); data/croaring-0.2.66+ds/src/array_util.c:522:21: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (A != C) memcpy(C, A, sizeof(uint16_t) * s_a); data/croaring-0.2.66+ds/src/array_util.c:605: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(buffer, B + i_b, (s_b - i_b) * sizeof(uint16_t)); data/croaring-0.2.66+ds/src/array_util.c:1074:26: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (a1 != a_out) memcpy(a_out, a1, sizeof(uint16_t) * length1); data/croaring-0.2.66+ds/src/array_util.c:1134: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(out + pos_out, array_1 + pos1, n_elems * sizeof(uint16_t)); data/croaring-0.2.66+ds/src/array_util.c:1138: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(out + pos_out, array_2 + pos2, n_elems * sizeof(uint16_t)); data/croaring-0.2.66+ds/src/array_util.c:1624: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(buffer + leftoversize, array1 + 8 * pos1, data/croaring-0.2.66+ds/src/array_util.c:1633: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(buffer + leftoversize, array2 + 8 * pos2, data/croaring-0.2.66+ds/src/array_util.c:1757: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(buffer + leftoversize, array1 + 8 * pos1, data/croaring-0.2.66+ds/src/array_util.c:1761: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(output, array2 + 8 * pos2, data/croaring-0.2.66+ds/src/array_util.c:1771: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(buffer + leftoversize, array2 + 8 * pos2, data/croaring-0.2.66+ds/src/array_util.c:1775: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(output, array1 + 8 * pos1, data/croaring-0.2.66+ds/src/bitset_util.c:595: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(out, &val, data/croaring-0.2.66+ds/src/bitset_util.c:616: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(out + outpos, &val, data/croaring-0.2.66+ds/src/containers/array.c:73: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(newcontainer->array, src->array, data/croaring-0.2.66+ds/src/containers/array.c:152: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(dst->array, src->array, cardinality * sizeof(uint16_t)); data/croaring-0.2.66+ds/src/containers/array.c:338: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(out + outpos, &val, data/croaring-0.2.66+ds/src/containers/array.c:385: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(buf, &cardinality, off = sizeof(cardinality)); data/croaring-0.2.66+ds/src/containers/array.c:387:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (l) memcpy(&buf[off], container->array, l); data/croaring-0.2.66+ds/src/containers/array.c:399: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(buf, container->array, container->cardinality * sizeof(uint16_t)); data/croaring-0.2.66+ds/src/containers/array.c:432: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(container->array, buf, container->cardinality * sizeof(uint16_t)); data/croaring-0.2.66+ds/src/containers/array.c:472:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (len) memcpy(ptr->array, &buf[off], len); data/croaring-0.2.66+ds/src/containers/bitset.c:66: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(dest->array, source->array, data/croaring-0.2.66+ds/src/containers/bitset.c:123: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(bitset->array, src->array, data/croaring-0.2.66+ds/src/containers/bitset.c:516: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, container->array, l); data/croaring-0.2.66+ds/src/containers/bitset.c:524: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, container->array, BITSET_CONTAINER_SIZE_IN_WORDS * sizeof(uint64_t)); data/croaring-0.2.66+ds/src/containers/bitset.c:532: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(container->array, buf, BITSET_CONTAINER_SIZE_IN_WORDS * sizeof(uint64_t)); data/croaring-0.2.66+ds/src/containers/bitset.c:548: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(ptr, buf, sizeof(bitset_container_t)); data/croaring-0.2.66+ds/src/containers/bitset.c:555: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(ptr->array, buf, l); data/croaring-0.2.66+ds/src/containers/mixed_andnot.c:329:17: [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(answer->runs + answer->n_runs, src_1->runs + rlepos, data/croaring-0.2.66+ds/src/containers/mixed_negation.c:127: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(arr->array, src->array, start_index * sizeof(uint16_t)); data/croaring-0.2.66+ds/src/containers/mixed_negation.c:143: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(arr->array + out_pos, src->array + (last_index + 1), data/croaring-0.2.66+ds/src/containers/run.c:107: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(run->runs, src->runs, src->n_runs * sizeof(rle16_t)); data/croaring-0.2.66+ds/src/containers/run.c:156: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(dst->runs, src->runs, sizeof(rle16_t) * n_runs); data/croaring-0.2.66+ds/src/containers/run.c:562: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(dst->runs + dst->n_runs, src_1->runs + rlepos1, data/croaring-0.2.66+ds/src/containers/run.c:578: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(out + outpos, &val, data/croaring-0.2.66+ds/src/containers/run.c:620: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(buf, &container->n_runs, off = sizeof(container->n_runs)); data/croaring-0.2.66+ds/src/containers/run.c:621: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(&buf[off], &container->capacity, sizeof(container->capacity)); data/croaring-0.2.66+ds/src/containers/run.c:625: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(&buf[off], container->runs, l); data/croaring-0.2.66+ds/src/containers/run.c:630: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(buf, &container->n_runs, sizeof(uint16_t)); data/croaring-0.2.66+ds/src/containers/run.c:631: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(buf + sizeof(uint16_t), container->runs, data/croaring-0.2.66+ds/src/containers/run.c:639: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(&container->n_runs, buf, sizeof(uint16_t)); data/croaring-0.2.66+ds/src/containers/run.c:643: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(container->runs, buf + sizeof(uint16_t), data/croaring-0.2.66+ds/src/containers/run.c:666: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(&ptr->n_runs, buf, off = 4); data/croaring-0.2.66+ds/src/containers/run.c:667: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(&ptr->capacity, &buf[off], 4); data/croaring-0.2.66+ds/src/containers/run.c:682: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(ptr->runs, &buf[off], len); data/croaring-0.2.66+ds/src/roaring.c:1332: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(buf + 1, &cardinality, sizeof(uint32_t)); data/croaring-0.2.66+ds/src/roaring.c:1388: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(&card, bufaschar + 1, sizeof(uint32_t)); data/croaring-0.2.66+ds/src/roaring.c:1588: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(newit, it, sizeof(roaring_uint32_iterator_t)); data/croaring-0.2.66+ds/src/roaring.c:2788:17: [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(bitset_zone, bitset->array, data/croaring-0.2.66+ds/src/roaring.c:2802:17: [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(run_zone, run->runs, num_bytes); data/croaring-0.2.66+ds/src/roaring.c:2811:17: [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(array_zone, array->array, num_bytes); data/croaring-0.2.66+ds/src/roaring.c:2819: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(&count_zone[i], &count, 2); data/croaring-0.2.66+ds/src/roaring.c:2821: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(key_zone, ra->keys, ra->size * sizeof(uint16_t)); data/croaring-0.2.66+ds/src/roaring.c:2822: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(typecode_zone, ra->typecodes, ra->size * sizeof(uint8_t)); data/croaring-0.2.66+ds/src/roaring.c:2824: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(header_zone, &header, 4); data/croaring-0.2.66+ds/src/roaring.c:2838: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(&header, buf + length - 4, 4); // header may be misaligned data/croaring-0.2.66+ds/src/roaring_array.c:63: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(newcontainers, ra->containers, sizeof(void *) * ra->size); data/croaring-0.2.66+ds/src/roaring_array.c:64: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(newkeys, ra->keys, sizeof(uint16_t) * ra->size); data/croaring-0.2.66+ds/src/roaring_array.c:65: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(newtypecodes, ra->typecodes, sizeof(uint8_t) * ra->size); data/croaring-0.2.66+ds/src/roaring_array.c:121: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(dest->keys, source->keys, dest->size * sizeof(uint16_t)); data/croaring-0.2.66+ds/src/roaring_array.c:131:11: [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(dest->containers, source->containers, data/croaring-0.2.66+ds/src/roaring_array.c:133:11: [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(dest->typecodes, source->typecodes, data/croaring-0.2.66+ds/src/roaring_array.c:138:11: [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(dest->typecodes, source->typecodes, data/croaring-0.2.66+ds/src/roaring_array.c:165: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(dest->keys, source->keys, dest->size * sizeof(uint16_t)); data/croaring-0.2.66+ds/src/roaring_array.c:173: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(dest->containers, source->containers, data/croaring-0.2.66+ds/src/roaring_array.c:175: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(dest->typecodes, source->typecodes, data/croaring-0.2.66+ds/src/roaring_array.c:178: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(dest->typecodes, source->typecodes, data/croaring-0.2.66+ds/src/roaring_array.c:541:17: [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(append_ans, t_ans, dtr * sizeof(uint32_t)); data/croaring-0.2.66+ds/src/roaring_array.c:568: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(ans, t_ans+first_skip, limit * sizeof(uint32_t)); data/croaring-0.2.66+ds/src/roaring_array.c:611: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(buf, &cookie, sizeof(cookie)); data/croaring-0.2.66+ds/src/roaring_array.c:622: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(buf, bitmapOfRunContainers, s); data/croaring-0.2.66+ds/src/roaring_array.c:633: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(buf, &cookie, sizeof(cookie)); data/croaring-0.2.66+ds/src/roaring_array.c:635: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(buf, &ra->size, sizeof(ra->size)); data/croaring-0.2.66+ds/src/roaring_array.c:641: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(buf, &ra->keys[k], sizeof(ra->keys[k])); data/croaring-0.2.66+ds/src/roaring_array.c:647: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(buf, &card, sizeof(card)); data/croaring-0.2.66+ds/src/roaring_array.c:653: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(buf, &startOffset, sizeof(startOffset)); data/croaring-0.2.66+ds/src/roaring_array.c:677: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(&cookie, buf, sizeof(int32_t)); data/croaring-0.2.66+ds/src/roaring_array.c:690: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(&size, buf, sizeof(int32_t)); data/croaring-0.2.66+ds/src/roaring_array.c:737: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(&n_runs, buf, sizeof(uint16_t)); data/croaring-0.2.66+ds/src/roaring_array.c:764: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(&cookie, buf, sizeof(int32_t)); data/croaring-0.2.66+ds/src/roaring_array.c:782: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(&size, buf, sizeof(int32_t)); data/croaring-0.2.66+ds/src/roaring_array.c:875: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(&n_runs, buf, sizeof(uint16_t)); data/croaring-0.2.66+ds/tests/cpp_unit.cpp:43: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(copy, serializedbytes, serializesize); data/croaring-0.2.66+ds/tests/format_portability_unit.c:17:16: [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(path, "rb"); data/croaring-0.2.66+ds/tests/format_portability_unit.c:26:16: [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(path, "rb"); data/croaring-0.2.66+ds/tests/format_portability_unit.c:76: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[1024]; data/croaring-0.2.66+ds/tests/format_portability_unit.c:79:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(filename, "bitmapwithoutruns.bin"); data/croaring-0.2.66+ds/tests/format_portability_unit.c:85: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[1024]; data/croaring-0.2.66+ds/tests/format_portability_unit.c:88:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(filename, "bitmapwithruns.bin"); data/croaring-0.2.66+ds/tests/realdata_unit.c:855: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 dirbuffer[1024]; data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:48:16: [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(filename, "rb"); data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:101: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[1024]; data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:104:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(filename, "crashproneinput1.bin"); data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:111: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[1024]; data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:114:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(filename, "crashproneinput2.bin"); data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:121: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[1024]; data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:124:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(filename, "crashproneinput3.bin"); data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:130: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[1024]; data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:133:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(filename, "crashproneinput4.bin"); data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:139: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[1024]; data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:142:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(filename, "crashproneinput5.bin"); data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:148: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[1024]; data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:151:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(filename, "crashproneinput6.bin"); data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:157: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[1024]; data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:160:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(filename, "crashproneinput7.bin"); data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:166: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[1024]; data/croaring-0.2.66+ds/tests/robust_deserialization_unit.c:169:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(filename, "crashproneinput8.bin"); data/croaring-0.2.66+ds/tests/toplevel_unit.c:3067: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(output, input, range); data/croaring-0.2.66+ds/tests/toplevel_unit.c:3124: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(output, input, range); data/croaring-0.2.66+ds/tests/unit.c:23:16: [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(filename, "r"); data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:987: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(set, values, number_of_values * sizeof(values[0])); data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:1163: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(mem, memory, size); data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:1442: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[1024]; data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:1475: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(cm_error_message + msg_len, buffer, len + 1); data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:1543:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *guards[2] = {block - MALLOC_GUARD_SIZE, block + block_info->size}; data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:1600: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(new, ptr, block_size); data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:1734: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[1024]; data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:1744: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[1024]; data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:1809:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:1812:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(buf, "r"); data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:1814:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(buf, "w"); data/croaring-0.2.66+ds/benchmarks/numbersfromtextfiles.h:119: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). size_t dirlen = strlen(dirname); data/croaring-0.2.66+ds/benchmarks/numbersfromtextfiles.h:131: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 filelen = strlen(entry_list[i]->d_name); data/croaring-0.2.66+ds/tests/cpp_unit.cpp:40:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Roaring t = Roaring::read(serializedbytes); data/croaring-0.2.66+ds/tests/cpp_unit.cpp:44:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Roaring t2 = Roaring::read(copy); data/croaring-0.2.66+ds/tests/cpp_unit.cpp:230:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Roaring t = Roaring::read(serializedbytes); data/croaring-0.2.66+ds/tests/cpp_unit.cpp:431:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Roaring64Map t = Roaring64Map::read(serializedbytes); data/croaring-0.2.66+ds/tests/realdata_unit.c:856:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t bddl = strlen(BENCHMARK_DATA_DIR); data/croaring-0.2.66+ds/tests/unit.c:107: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). size_t dirlen = strlen(dirname); data/croaring-0.2.66+ds/tests/unit.c:119: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 filelen = strlen(entry_list[i]->d_name); data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:785:10: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (!equal) { data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:790:12: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. return equal; data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka.c:1465:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). msg_len = strlen(cm_error_message); data/croaring-0.2.66+ds/tests/vendor/cmocka/cmocka_private.h:145:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((x) != NULL) memset((x), 'X', strlen((x))); \ ANALYSIS SUMMARY: Hits = 186 Lines analyzed = 35057 in approximately 0.99 seconds (35270 lines/second) Physical Source Lines of Code (SLOC) = 25975 Hits@level = [0] 354 [1] 13 [2] 124 [3] 9 [4] 40 [5] 0 Hits@level+ = [0+] 540 [1+] 186 [2+] 173 [3+] 49 [4+] 40 [5+] 0 Hits/KSLOC@level+ = [0+] 20.7892 [1+] 7.16073 [2+] 6.66025 [3+] 1.88643 [4+] 1.53994 [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.