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/dqlite-1.6.0/include/dqlite.h Examining data/dqlite-1.6.0/src/bind.c Examining data/dqlite-1.6.0/src/bind.h Examining data/dqlite-1.6.0/src/client.c Examining data/dqlite-1.6.0/src/client.h Examining data/dqlite-1.6.0/src/command.c Examining data/dqlite-1.6.0/src/command.h Examining data/dqlite-1.6.0/src/config.c Examining data/dqlite-1.6.0/src/config.h Examining data/dqlite-1.6.0/src/conn.c Examining data/dqlite-1.6.0/src/conn.h Examining data/dqlite-1.6.0/src/db.c Examining data/dqlite-1.6.0/src/db.h Examining data/dqlite-1.6.0/src/dqlite.c Examining data/dqlite-1.6.0/src/error.c Examining data/dqlite-1.6.0/src/error.h Examining data/dqlite-1.6.0/src/format.c Examining data/dqlite-1.6.0/src/format.h Examining data/dqlite-1.6.0/src/fsm.c Examining data/dqlite-1.6.0/src/fsm.h Examining data/dqlite-1.6.0/src/gateway.c Examining data/dqlite-1.6.0/src/gateway.h Examining data/dqlite-1.6.0/src/leader.c Examining data/dqlite-1.6.0/src/leader.h Examining data/dqlite-1.6.0/src/lib/assert.h Examining data/dqlite-1.6.0/src/lib/buffer.c Examining data/dqlite-1.6.0/src/lib/buffer.h Examining data/dqlite-1.6.0/src/lib/byte.h Examining data/dqlite-1.6.0/src/lib/queue.h Examining data/dqlite-1.6.0/src/lib/registry.h Examining data/dqlite-1.6.0/src/lib/serialize.h Examining data/dqlite-1.6.0/src/lib/transport.c Examining data/dqlite-1.6.0/src/lib/transport.h Examining data/dqlite-1.6.0/src/logger.c Examining data/dqlite-1.6.0/src/logger.h Examining data/dqlite-1.6.0/src/message.c Examining data/dqlite-1.6.0/src/message.h Examining data/dqlite-1.6.0/src/metrics.c Examining data/dqlite-1.6.0/src/metrics.h Examining data/dqlite-1.6.0/src/protocol.h Examining data/dqlite-1.6.0/src/query.c Examining data/dqlite-1.6.0/src/query.h Examining data/dqlite-1.6.0/src/registry.c Examining data/dqlite-1.6.0/src/registry.h Examining data/dqlite-1.6.0/src/request.c Examining data/dqlite-1.6.0/src/request.h Examining data/dqlite-1.6.0/src/response.c Examining data/dqlite-1.6.0/src/response.h Examining data/dqlite-1.6.0/src/server.c Examining data/dqlite-1.6.0/src/server.h Examining data/dqlite-1.6.0/src/stmt.c Examining data/dqlite-1.6.0/src/stmt.h Examining data/dqlite-1.6.0/src/transport.c Examining data/dqlite-1.6.0/src/transport.h Examining data/dqlite-1.6.0/src/tuple.c Examining data/dqlite-1.6.0/src/tuple.h Examining data/dqlite-1.6.0/src/vfs.c Examining data/dqlite-1.6.0/src/vfs.h Examining data/dqlite-1.6.0/test/integration/main.c Examining data/dqlite-1.6.0/test/integration/test_client.c Examining data/dqlite-1.6.0/test/integration/test_membership.c Examining data/dqlite-1.6.0/test/integration/test_node.c Examining data/dqlite-1.6.0/test/integration/test_vfs.c Examining data/dqlite-1.6.0/test/lib/client.h Examining data/dqlite-1.6.0/test/lib/cluster.h Examining data/dqlite-1.6.0/test/lib/config.h Examining data/dqlite-1.6.0/test/lib/endpoint.c Examining data/dqlite-1.6.0/test/lib/endpoint.h Examining data/dqlite-1.6.0/test/lib/fault.c Examining data/dqlite-1.6.0/test/lib/fault.h Examining data/dqlite-1.6.0/test/lib/fs.c Examining data/dqlite-1.6.0/test/lib/fs.h Examining data/dqlite-1.6.0/test/lib/heap.c Examining data/dqlite-1.6.0/test/lib/heap.h Examining data/dqlite-1.6.0/test/lib/leader.h Examining data/dqlite-1.6.0/test/lib/logger.c Examining data/dqlite-1.6.0/test/lib/logger.h Examining data/dqlite-1.6.0/test/lib/munit.c Examining data/dqlite-1.6.0/test/lib/munit.h Examining data/dqlite-1.6.0/test/lib/raft.h Examining data/dqlite-1.6.0/test/lib/registry.h Examining data/dqlite-1.6.0/test/lib/runner.h Examining data/dqlite-1.6.0/test/lib/server.c Examining data/dqlite-1.6.0/test/lib/server.h Examining data/dqlite-1.6.0/test/lib/sqlite.c Examining data/dqlite-1.6.0/test/lib/sqlite.h Examining data/dqlite-1.6.0/test/lib/stmt.h Examining data/dqlite-1.6.0/test/lib/uv.c Examining data/dqlite-1.6.0/test/lib/uv.h Examining data/dqlite-1.6.0/test/lib/vfs.h Examining data/dqlite-1.6.0/test/test_error.c Examining data/dqlite-1.6.0/test/test_integration.c Examining data/dqlite-1.6.0/test/unit/ext/test_uv.c Examining data/dqlite-1.6.0/test/unit/lib/test_buffer.c Examining data/dqlite-1.6.0/test/unit/lib/test_registry.c Examining data/dqlite-1.6.0/test/unit/lib/test_serialize.c Examining data/dqlite-1.6.0/test/unit/lib/test_transport.c Examining data/dqlite-1.6.0/test/unit/main.c Examining data/dqlite-1.6.0/test/unit/test_command.c Examining data/dqlite-1.6.0/test/unit/test_concurrency.c Examining data/dqlite-1.6.0/test/unit/test_conn.c Examining data/dqlite-1.6.0/test/unit/test_gateway.c Examining data/dqlite-1.6.0/test/unit/test_registry.c Examining data/dqlite-1.6.0/test/unit/test_replication.c Examining data/dqlite-1.6.0/test/unit/test_request.c Examining data/dqlite-1.6.0/test/unit/test_tuple.c Examining data/dqlite-1.6.0/test/unit/test_vfs.c FINAL RESULTS: data/dqlite-1.6.0/src/config.c:39:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(c->address, address); data/dqlite-1.6.0/src/db.c:20:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(db->filename, filename); data/dqlite-1.6.0/src/gateway.c:777:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(filename, request.filename); data/dqlite-1.6.0/src/lib/serialize.h:203:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(*cursor, *value); data/dqlite-1.6.0/src/logger.c:39:2: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(cursor, n, fmt, args); data/dqlite-1.6.0/src/server.c:163:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf, address); data/dqlite-1.6.0/src/server.c:206:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(addr_un.sun_path + 1, address + 1); data/dqlite-1.6.0/src/server.c:243:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(t->bind_address, address); data/dqlite-1.6.0/src/transport.c:206:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf, address); data/dqlite-1.6.0/src/vfs.c:1714:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(d->name, name); data/dqlite-1.6.0/test/lib/fs.c:13:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dir, TEST__DIR_TEMPLATE); data/dqlite-1.6.0/test/lib/logger.c:35:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf + strlen(buf), "%2d -> [%s] ", t->id, level_name); data/dqlite-1.6.0/test/lib/logger.c:37:2: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buf + strlen(buf), 1024 - strlen(buf), format, args); data/dqlite-1.6.0/test/lib/munit.c:194:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(fp, format, ap); data/dqlite-1.6.0/test/lib/munit.c:1071:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, "%" MUNIT_TEST_TIME_FORMAT, ((double) nanoseconds) / ((double) PSNIP_CLOCK_NSEC_PER_SEC)); data/dqlite-1.6.0/test/lib/munit.h:180:77: [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 MUNIT_PRINTF(string_index, first_to_check) __attribute__((format (printf, string_index, first_to_check))) data/dqlite-1.6.0/test/lib/server.c:16:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(addr.sun_path + 1, address + 1); data/dqlite-1.6.0/test/test_error.c:50:12: [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. TEST_SUITE(printf); data/dqlite-1.6.0/test/test_error.c:51:12: [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. TEST_SETUP(printf, setup); data/dqlite-1.6.0/test/test_error.c:52:16: [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. TEST_TEAR_DOWN(printf, tear_down); data/dqlite-1.6.0/test/test_error.c:54:11: [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. TEST_CASE(printf, success, NULL) data/dqlite-1.6.0/test/test_error.c:69:11: [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. TEST_CASE(printf, override, NULL) data/dqlite-1.6.0/test/test_error.c:83:11: [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. TEST_CASE(printf, oom, NULL) data/dqlite-1.6.0/test/unit/test_vfs.c:1159:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/test.db", dir); data/dqlite-1.6.0/test/lib/munit.c:1828: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. return getenv("ANSICON") != NULL; data/dqlite-1.6.0/src/client.c:145:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). REQUEST(open, OPEN); data/dqlite-1.6.0/src/command.c:45:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*cursor, list[i].data, frames->page_size); data/dqlite-1.6.0/src/command.h:49:4: [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). X(open, OPEN, __VA_ARGS__) \ data/dqlite-1.6.0/src/config.h:17:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[256]; /* VFS/replication registriatio name */ data/dqlite-1.6.0/src/db.c:54:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pragma[255]; data/dqlite-1.6.0/src/db.c:71:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(pragma, "PRAGMA page_size=%d", page_size); data/dqlite-1.6.0/src/error.c:137: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(copy, *e, len); data/dqlite-1.6.0/src/fsm.c:54: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(f->pending.pages + j * page_size, data/dqlite-1.6.0/src/gateway.c:167:8: [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). START(open, db); data/dqlite-1.6.0/src/gateway.c:711: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(cur, data, n); data/dqlite-1.6.0/src/gateway.c:724:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename[1024]; data/dqlite-1.6.0/src/gateway.c:778:2: [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, "-wal"); data/dqlite-1.6.0/src/leader.c:28:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pragma[255]; data/dqlite-1.6.0/src/leader.c:45:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(pragma, "PRAGMA page_size=%d", page_size); data/dqlite-1.6.0/src/lib/serialize.h:212: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(*cursor, value->base, value->len); data/dqlite-1.6.0/src/logger.c:10:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[EMIT_BUF_LEN]; data/dqlite-1.6.0/src/logger.c:19:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cursor, "[DEBUG]: "); data/dqlite-1.6.0/src/logger.c:22:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cursor, "[INFO ]: "); data/dqlite-1.6.0/src/logger.c:25:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cursor, "[WARN ]: "); data/dqlite-1.6.0/src/logger.c:28:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cursor, "[ERROR]: "); data/dqlite-1.6.0/src/logger.c:31:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cursor, "[ ]: "); data/dqlite-1.6.0/src/request.h:52:4: [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). X(open, OPEN, __VA_ARGS__) \ data/dqlite-1.6.0/src/server.c:156:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/dqlite-1.6.0/src/server.c:170:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). rv = uv_ip4_addr(host, atoi(port), addr); data/dqlite-1.6.0/src/server.h:34:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errmsg[RAFT_ERRMSG_BUF_SIZE]; /* Last error occurred */ data/dqlite-1.6.0/src/transport.c:199:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/dqlite-1.6.0/src/transport.c:213:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). rv = uv_ip4_addr(host, atoi(port), addr); data/dqlite-1.6.0/src/vfs.c:158: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, &u, sizeof u); data/dqlite-1.6.0/src/vfs.c:813: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, page + offset, (size_t)amount); data/dqlite-1.6.0/src/vfs.c:816: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, page, (size_t)amount); data/dqlite-1.6.0/src/vfs.c:847: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, w->hdr, VFS__WAL_HEADER_SIZE); data/dqlite-1.6.0/src/vfs.c:864:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, w->hdr + offset, (size_t)amount); data/dqlite-1.6.0/src/vfs.c:892: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, frame->header, (size_t)amount); data/dqlite-1.6.0/src/vfs.c:894: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, frame->header + 16, (size_t)amount); data/dqlite-1.6.0/src/vfs.c:896: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, frame->page, (size_t)amount); data/dqlite-1.6.0/src/vfs.c:898: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, frame->header, FORMAT__WAL_FRAME_HDR_SIZE); data/dqlite-1.6.0/src/vfs.c:899: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 + FORMAT__WAL_FRAME_HDR_SIZE, frame->page, data/dqlite-1.6.0/src/vfs.c:997: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(page, buf, (size_t)amount); data/dqlite-1.6.0/src/vfs.c:1017: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(w->hdr, buf, (size_t)amount); data/dqlite-1.6.0/src/vfs.c:1037: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(frame->header, buf, (size_t)amount); data/dqlite-1.6.0/src/vfs.c:1053: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(frame->page, buf, (size_t)amount); data/dqlite-1.6.0/src/vfs.c:1230: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). int page_size = atoi(right); data/dqlite-1.6.0/src/vfs.c:1299: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(&f->header[8], &salt[0], sizeof salt[0]); data/dqlite-1.6.0/src/vfs.c:1300: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(&f->header[12], &salt[1], sizeof salt[1]); data/dqlite-1.6.0/src/vfs.c:1305: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(f->page, page, page_size); data/dqlite-1.6.0/src/vfs.c:1360: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(index + VFS__WAL_INDEX_HEADER_SIZE, index, data/dqlite-1.6.0/src/vfs.c:2383: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(*cursor, d->pages[i], page_size); data/dqlite-1.6.0/src/vfs.c:2397: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(*cursor, w->hdr, VFS__WAL_HEADER_SIZE); data/dqlite-1.6.0/src/vfs.c:2405: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(*cursor, frame->header, FORMAT__WAL_FRAME_HDR_SIZE); data/dqlite-1.6.0/src/vfs.c:2407: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(*cursor, frame->page, page_size); data/dqlite-1.6.0/src/vfs.c:2482: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(page, &data[i * page_size], page_size); data/dqlite-1.6.0/src/vfs.c:2541: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(frame->header, p, VFS__FRAME_HEADER_SIZE); data/dqlite-1.6.0/src/vfs.c:2542: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(frame->page, p + VFS__FRAME_HEADER_SIZE, page_size); data/dqlite-1.6.0/src/vfs.c:2545: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(w->hdr, data, VFS__WAL_HEADER_SIZE); data/dqlite-1.6.0/test/integration/test_vfs.c:17:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char names[8][N_VFS]; /* Registration names */ data/dqlite-1.6.0/test/integration/test_vfs.c:30:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(f->names[i], "%u", i + 1); data/dqlite-1.6.0/test/integration/test_vfs.c:167: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(TX.frames + _i * PAGE_SIZE, \ data/dqlite-1.6.0/test/integration/test_vfs.c:242:11: [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). TEST(vfs, open, setUp, tearDown, 0, NULL) data/dqlite-1.6.0/test/integration/test_vfs.c:349:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sql[64]; data/dqlite-1.6.0/test/integration/test_vfs.c:361:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(sql, "INSERT INTO test(n) VALUES(%d)", i + 1); data/dqlite-1.6.0/test/integration/test_vfs.c:367:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(sql, "UPDATE test SET n=%d WHERE n=%d", i, i + 1); data/dqlite-1.6.0/test/integration/test_vfs.c:1017: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 sql[64]; data/dqlite-1.6.0/test/integration/test_vfs.c:1018:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(sql, "INSERT INTO test(n) VALUES(%d)", i + 1); data/dqlite-1.6.0/test/lib/cluster.h:74: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 address[16]; \ data/dqlite-1.6.0/test/lib/cluster.h:79:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(address, "%d", I + 1); \ data/dqlite-1.6.0/test/lib/endpoint.c:79:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(e->address, "127.0.0.1:%d", data/dqlite-1.6.0/test/lib/endpoint.h:28:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char address[256]; /* Rendered address string. */ data/dqlite-1.6.0/test/lib/heap.c:173:26: [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). test_heap_fault_config(atoi(fault_delay), atoi(fault_repeat)); data/dqlite-1.6.0/test/lib/heap.c:173:45: [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). test_heap_fault_config(atoi(fault_delay), atoi(fault_repeat)); data/dqlite-1.6.0/test/lib/logger.c:12:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/dqlite-1.6.0/test/lib/munit.c:258: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 munit_error_str[MUNIT_STRERROR_LEN]; data/dqlite-1.6.0/test/lib/munit.c:946: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(b, &rv, sizeof(munit_uint32_t)); data/dqlite-1.6.0/test/lib/munit.c:951: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(b, &rv, bytes_remaining); data/dqlite-1.6.0/test/lib/munit.c:1111: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(res, prefix, prefix_l); data/dqlite-1.6.0/test/lib/munit.c:1112: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(res + prefix_l, suffix, suffix_l); data/dqlite-1.6.0/test/lib/munit.c:1330:16: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). stderr_buf = tmpfile(); data/dqlite-1.6.0/test/lib/runner.h:25:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. int main(int argc, char *argv[MUNIT_ARRAY_PARAM(argc + 1)]) \ data/dqlite-1.6.0/test/lib/server.c:31:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(s->address, "@%u", id); data/dqlite-1.6.0/test/lib/server.h:19:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char address[8]; /* Server address. */ data/dqlite-1.6.0/test/test_error.c:215:2: [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). open("/foo/bar/egg/baz", 0); data/dqlite-1.6.0/test/test_integration.c:52: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 sql[128]; data/dqlite-1.6.0/test/test_integration.c:59:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(sql, "INSERT INTO test(n) VALUES(%d)", i); data/dqlite-1.6.0/test/test_integration.c:69:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(sql, "SELECT n FROM test WHERE n >= %d AND n < %d", data/dqlite-1.6.0/test/unit/lib/test_registry.c:84:6: [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). n = atoi(munit_parameters_get(params, "n")); data/dqlite-1.6.0/test/unit/lib/test_registry.c:143:6: [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). n = atoi(munit_parameters_get(params, "n")); data/dqlite-1.6.0/test/unit/lib/test_serialize.c:72: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(*cursor, pages->bufs[i], pages->size); data/dqlite-1.6.0/test/unit/lib/test_serialize.c:243:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(f->book.pages.bufs[0], "Fantine"); data/dqlite-1.6.0/test/unit/lib/test_serialize.c:244:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(f->book.pages.bufs[1], "Cosette"); data/dqlite-1.6.0/test/unit/lib/test_serialize.c:307:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, "John Doh"); data/dqlite-1.6.0/test/unit/lib/test_serialize.c:323:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, "Joe Doh"); data/dqlite-1.6.0/test/unit/lib/test_serialize.c:340:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, "John Doh"); data/dqlite-1.6.0/test/unit/lib/test_serialize.c:363:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(p, "Les miserables"); data/dqlite-1.6.0/test/unit/lib/test_serialize.c:366:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(p, "Victor Hugo"); data/dqlite-1.6.0/test/unit/lib/test_serialize.c:380:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(p, "Fantine"); data/dqlite-1.6.0/test/unit/lib/test_serialize.c:383:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(p, "Cosette"); data/dqlite-1.6.0/test/unit/test_command.c:15:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). TEST_SUITE(open); data/dqlite-1.6.0/test/unit/test_command.c:17:11: [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). TEST_CASE(open, encode, NULL) data/dqlite-1.6.0/test/unit/test_command.c:32:11: [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). TEST_CASE(open, decode, NULL) data/dqlite-1.6.0/test/unit/test_concurrency.c:48:23: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). struct request_open open; \ data/dqlite-1.6.0/test/unit/test_concurrency.c:57:3: [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). open.filename = "test"; \ data/dqlite-1.6.0/test/unit/test_concurrency.c:58:3: [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). open.vfs = ""; \ data/dqlite-1.6.0/test/unit/test_concurrency.c:59: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). ENCODE(c, &open, open); \ data/dqlite-1.6.0/test/unit/test_concurrency.c:59:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ENCODE(c, &open, open); \ data/dqlite-1.6.0/test/unit/test_concurrency.c:234:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). TEST_CASE(exec, open, NULL) data/dqlite-1.6.0/test/unit/test_conn.c:194:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). TEST_SUITE(open); data/dqlite-1.6.0/test/unit/test_conn.c:201:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). TEST_SETUP(open) data/dqlite-1.6.0/test/unit/test_conn.c:209:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). TEST_TEAR_DOWN(open) data/dqlite-1.6.0/test/unit/test_conn.c:216:11: [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). TEST_CASE(open, success, NULL) data/dqlite-1.6.0/test/unit/test_gateway.c:168:23: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). struct request_open open; \ data/dqlite-1.6.0/test/unit/test_gateway.c:169:3: [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). open.filename = "test"; \ data/dqlite-1.6.0/test/unit/test_gateway.c:170:3: [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). open.vfs = ""; \ data/dqlite-1.6.0/test/unit/test_gateway.c:171:11: [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). ENCODE(&open, open); \ data/dqlite-1.6.0/test/unit/test_gateway.c:171:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ENCODE(&open, open); \ data/dqlite-1.6.0/test/unit/test_gateway.c:370:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). TEST_SUITE(open); data/dqlite-1.6.0/test/unit/test_gateway.c:371:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). TEST_SETUP(open) data/dqlite-1.6.0/test/unit/test_gateway.c:377:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). TEST_TEAR_DOWN(open) data/dqlite-1.6.0/test/unit/test_gateway.c:385:11: [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). TEST_CASE(open, success, NULL) data/dqlite-1.6.0/test/unit/test_gateway.c:391:22: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ENCODE(&f->request, open); data/dqlite-1.6.0/test/unit/test_gateway.c:399:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). TEST_GROUP(open, error); data/dqlite-1.6.0/test/unit/test_gateway.c:402:11: [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). TEST_CASE(open, error, twice, NULL) data/dqlite-1.6.0/test/unit/test_gateway.c:408:22: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ENCODE(&f->request, open); data/dqlite-1.6.0/test/unit/test_gateway.c:411:22: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ENCODE(&f->request, open); data/dqlite-1.6.0/test/unit/test_gateway.c:545:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[8] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'}; data/dqlite-1.6.0/test/unit/test_request.c:123:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). TEST_CASE(decode, open, NULL) data/dqlite-1.6.0/test/unit/test_request.c:135:37: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). munit_assert_string_equal(request->open.name, "test.db"); data/dqlite-1.6.0/test/unit/test_request.c:136:28: [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). munit_assert_int(request->open.flags, ==, 123); data/dqlite-1.6.0/test/unit/test_request.c:137:37: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). munit_assert_string_equal(request->open.vfs, "volatile"); data/dqlite-1.6.0/test/unit/test_tuple.c:215: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[1], &pi, sizeof pi); data/dqlite-1.6.0/test/unit/test_tuple.c:262:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy((char *)buf[1], "2018-07-20 09:49:05+00:00"); data/dqlite-1.6.0/test/unit/test_tuple.c:262:10: [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. strcpy((char *)buf[1], "2018-07-20 09:49:05+00:00"); data/dqlite-1.6.0/test/unit/test_tuple.c:368:35: [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. munit_assert_string_equal((const char *)buf[2], "hello"); data/dqlite-1.6.0/test/unit/test_tuple.c:418:35: [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. munit_assert_string_equal((const char *)buf[2], "hello"); data/dqlite-1.6.0/test/unit/test_tuple.c:481:29: [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. munit_assert_string_equal((char *)buf[1], "2018-07-20 09:49:05+00:00"); data/dqlite-1.6.0/test/unit/test_vfs.c:202: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(marks, &idx[25], (sizeof *idx) * FORMAT__WAL_NREADER); data/dqlite-1.6.0/test/unit/test_vfs.c:425:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[16]; data/dqlite-1.6.0/test/unit/test_vfs.c:578:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pathname[10]; data/dqlite-1.6.0/test/unit/test_vfs.c:638:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1] = {123}; data/dqlite-1.6.0/test/unit/test_vfs.c:690:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/dqlite-1.6.0/test/unit/test_vfs.c:744:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/dqlite-1.6.0/test/unit/test_vfs.c:771:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/dqlite-1.6.0/test/unit/test_vfs.c:797:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/dqlite-1.6.0/test/unit/test_vfs.c:824:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/dqlite-1.6.0/test/unit/test_vfs.c:928:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/dqlite-1.6.0/test/unit/test_vfs.c:1144:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/dqlite-1.6.0/test/unit/test_vfs.c:1463:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char stmt[128]; data/dqlite-1.6.0/test/unit/test_vfs.c:1481:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(stmt, "INSERT INTO test(n) VALUES(%d)", i); data/dqlite-1.6.0/test/unit/test_vfs.c:1525:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(stmt, "INSERT INTO test(n) VALUES(%d)", i); data/dqlite-1.6.0/src/client.c:19:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rv = buffer__init(&c->read); data/dqlite-1.6.0/src/client.c:31:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). buffer__close(&c->read); data/dqlite-1.6.0/src/client.c:39:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). buffer__close(&c->read); data/dqlite-1.6.0/src/client.c:95:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). buffer__reset(&c->read); \ data/dqlite-1.6.0/src/client.c:96:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _p = buffer__advance(&c->read, _n); \ data/dqlite-1.6.0/src/client.c:98:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _rv = read(c->fd, _p, _n); \ data/dqlite-1.6.0/src/client.c:109:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). buffer__reset(&c->read); \ data/dqlite-1.6.0/src/client.c:111:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _p = buffer__advance(&c->read, _n); \ data/dqlite-1.6.0/src/client.c:115:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _rv = read(c->fd, _p, _n); \ data/dqlite-1.6.0/src/client.c:126:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cursor.p = buffer__cursor(&c->read, 0); \ data/dqlite-1.6.0/src/client.c:127:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cursor.cap = buffer__offset(&c->read); \ data/dqlite-1.6.0/src/client.c:221:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cursor.p = buffer__cursor(&c->read, 0); data/dqlite-1.6.0/src/client.c:222:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cursor.cap = buffer__offset(&c->read); data/dqlite-1.6.0/src/client.h:14:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). struct buffer read; /* Read buffer */ data/dqlite-1.6.0/src/config.c:35:35: [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). c->address = sqlite3_malloc((int)strlen(address) + 1); data/dqlite-1.6.0/src/conn.c:10:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). buffer__reset(&c->read); data/dqlite-1.6.0/src/conn.c:11:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). buf->base = buffer__advance(&c->read, size); data/dqlite-1.6.0/src/conn.c:96:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). buffer__close(&c->read); data/dqlite-1.6.0/src/conn.c:131:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cursor.p = buffer__cursor(&c->read, 0); data/dqlite-1.6.0/src/conn.c:132:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cursor.cap = buffer__offset(&c->read); data/dqlite-1.6.0/src/conn.c:178:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cursor.p = buffer__cursor(&c->read, 0); data/dqlite-1.6.0/src/conn.c:179:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cursor.cap = buffer__offset(&c->read); data/dqlite-1.6.0/src/conn.c:218:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cursor.p = buffer__cursor(&c->read, 0); data/dqlite-1.6.0/src/conn.c:219:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cursor.cap = buffer__offset(&c->read); data/dqlite-1.6.0/src/conn.c:279:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rv = buffer__init(&c->read); data/dqlite-1.6.0/src/conn.c:299:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). buffer__close(&c->read); data/dqlite-1.6.0/src/conn.h:30:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). struct buffer read; /* Read buffer */ data/dqlite-1.6.0/src/db.c:18:38: [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). db->filename = sqlite3_malloc((int)(strlen(filename) + 1)); data/dqlite-1.6.0/src/error.c:129:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(*e) + 1; data/dqlite-1.6.0/src/lib/serialize.h:154: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). return byte__pad64(strlen(*value) + 1); data/dqlite-1.6.0/src/lib/serialize.h:201:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = byte__pad64(strlen(*value) + 1); data/dqlite-1.6.0/src/lib/serialize.h:297:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = byte__pad64(strlen(*value) + 1); data/dqlite-1.6.0/src/lib/transport.c:14:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert(t->read.base != NULL); data/dqlite-1.6.0/src/lib/transport.c:15:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert(t->read.len > 0); data/dqlite-1.6.0/src/lib/transport.c:16:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *buf = t->read; data/dqlite-1.6.0/src/lib/transport.c:29:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). t->read.base = NULL; data/dqlite-1.6.0/src/lib/transport.c:30:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). t->read.len = 0; data/dqlite-1.6.0/src/lib/transport.c:45:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert(n <= t->read.len); data/dqlite-1.6.0/src/lib/transport.c:48:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). t->read.base += n; data/dqlite-1.6.0/src/lib/transport.c:49:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). t->read.len -= n; data/dqlite-1.6.0/src/lib/transport.c:53:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (t->read.len > 0) { data/dqlite-1.6.0/src/lib/transport.c:121:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). t->read.base = NULL; data/dqlite-1.6.0/src/lib/transport.c:122:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). t->read.len = 0; data/dqlite-1.6.0/src/lib/transport.c:151:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert(t->read.base == NULL); data/dqlite-1.6.0/src/lib/transport.c:152:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). assert(t->read.len == 0); data/dqlite-1.6.0/src/lib/transport.h:28:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uv_buf_t read; /* Read buffer */ data/dqlite-1.6.0/src/logger.c:35:17: [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). cursor = buf + strlen(buf); data/dqlite-1.6.0/src/logger.c:38: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). n = EMIT_BUF_LEN - strlen(buf) - 1; data/dqlite-1.6.0/src/server.c:201:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(address); data/dqlite-1.6.0/src/server.c:238:41: [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). t->bind_address = sqlite3_malloc((int)strlen(address)); data/dqlite-1.6.0/src/vfs.c:689:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t n_filename = strlen(filename); data/dqlite-1.6.0/src/vfs.c:690:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t n_suffix = strlen(suffix); data/dqlite-1.6.0/src/vfs.c:701:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t n = strlen(filename); data/dqlite-1.6.0/src/vfs.c:708:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n -= strlen("-wal"); data/dqlite-1.6.0/src/vfs.c:711:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n -= strlen("-journal"); data/dqlite-1.6.0/src/vfs.c:1710:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->name = sqlite3_malloc64(strlen(name) + 1); data/dqlite-1.6.0/test/lib/endpoint.c:49:4: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(e->un_address.sun_path, ""); /* Random address */ data/dqlite-1.6.0/test/lib/fs.c:11:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *dir = munit_malloc(strlen(TEST__DIR_TEMPLATE) + 1); data/dqlite-1.6.0/test/lib/logger.c:35: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). sprintf(buf + strlen(buf), "%2d -> [%s] ", t->id, level_name); data/dqlite-1.6.0/test/lib/logger.c:37:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). vsnprintf(buf + strlen(buf), 1024 - strlen(buf), format, args); data/dqlite-1.6.0/test/lib/logger.c:37:38: [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). vsnprintf(buf + strlen(buf), 1024 - strlen(buf), format, args); data/dqlite-1.6.0/test/lib/logger.c:41:17: [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). snprintf(buf + strlen(buf), 1024 - strlen(buf), " "); data/dqlite-1.6.0/test/lib/logger.c:41:37: [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). snprintf(buf + strlen(buf), 1024 - strlen(buf), " "); data/dqlite-1.6.0/test/lib/logger.c:43:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i = strlen(buf); i < 85; i++) { data/dqlite-1.6.0/test/lib/munit.c:1097:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const size_t prefix_l = prefix != NULL ? strlen(prefix) : 0; data/dqlite-1.6.0/test/lib/munit.c:1098:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const size_t suffix_l = suffix != NULL ? strlen(suffix) : 0; data/dqlite-1.6.0/test/lib/munit.c:1154:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(from, buf, sizeof(buf)); data/dqlite-1.6.0/test/lib/munit.c:1391:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read_res = read(pipefd[0], ((munit_uint8_t*) (&report)) + bytes_read, sizeof(report) - bytes_read); data/dqlite-1.6.0/test/lib/munit.c:1671:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncmp(test->name, *test_name + pre_l, strlen(*test_name + pre_l)) == 0) { data/dqlite-1.6.0/test/lib/server.c:19:68: [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). rv = connect(*fd, (struct sockaddr *)&addr, sizeof(sa_family_t) + strlen(address + 1) + 1); data/dqlite-1.6.0/test/unit/ext/test_uv.c:152:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rv = read(f->client, buf2->base, buf2->len); data/dqlite-1.6.0/test/unit/ext/test_uv.c:169:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). TEST_SUITE(read); data/dqlite-1.6.0/test/unit/ext/test_uv.c:170:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). TEST_SETUP(read, setup); data/dqlite-1.6.0/test/unit/ext/test_uv.c:171:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). TEST_TEAR_DOWN(read, tear_down); data/dqlite-1.6.0/test/unit/ext/test_uv.c:207:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). TEST_CASE(read, sync, endpointParams) data/dqlite-1.6.0/test/unit/lib/test_transport.c:27:4: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). } read; data/dqlite-1.6.0/test/unit/lib/test_transport.c:38:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read.invoked = true; data/dqlite-1.6.0/test/unit/lib/test_transport.c:39:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read.status = status; data/dqlite-1.6.0/test/unit/lib/test_transport.c:66:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read.invoked = false; data/dqlite-1.6.0/test/unit/lib/test_transport.c:67:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read.status = -1; data/dqlite-1.6.0/test/unit/lib/test_transport.c:134:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). munit_assert_true(f->read.invoked); \ data/dqlite-1.6.0/test/unit/lib/test_transport.c:135:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). munit_assert_int(f->read.status, ==, STATUS); \ data/dqlite-1.6.0/test/unit/lib/test_transport.c:136:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read.invoked = false; \ data/dqlite-1.6.0/test/unit/lib/test_transport.c:137:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). f->read.status = -1 data/dqlite-1.6.0/test/unit/lib/test_transport.c:152:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). TEST_SUITE(read); data/dqlite-1.6.0/test/unit/lib/test_transport.c:153:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). TEST_SETUP(read, setup); data/dqlite-1.6.0/test/unit/lib/test_transport.c:154:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). TEST_TEAR_DOWN(read, tear_down); data/dqlite-1.6.0/test/unit/lib/test_transport.c:156:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). TEST_CASE(read, success, NULL) ANALYSIS SUMMARY: Hits = 260 Lines analyzed = 22916 in approximately 0.59 seconds (38755 lines/second) Physical Source Lines of Code (SLOC) = 16305 Hits@level = [0] 16 [1] 88 [2] 147 [3] 1 [4] 24 [5] 0 Hits@level+ = [0+] 276 [1+] 260 [2+] 172 [3+] 25 [4+] 24 [5+] 0 Hits/KSLOC@level+ = [0+] 16.9273 [1+] 15.946 [2+] 10.5489 [3+] 1.53327 [4+] 1.47194 [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.