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/siridb-server-2.0.40/include/argparse/argparse.h Examining data/siridb-server-2.0.40/include/base64/base64.h Examining data/siridb-server-2.0.40/include/cexpr/cexpr.h Examining data/siridb-server-2.0.40/include/cfgparser/cfgparser.h Examining data/siridb-server-2.0.40/include/ctree/ctree.h Examining data/siridb-server-2.0.40/include/expr/expr.h Examining data/siridb-server-2.0.40/include/imap/imap.h Examining data/siridb-server-2.0.40/include/iso8601/iso8601.h Examining data/siridb-server-2.0.40/include/lib/http_parser.h Examining data/siridb-server-2.0.40/include/llist/llist.h Examining data/siridb-server-2.0.40/include/lock/lock.h Examining data/siridb-server-2.0.40/include/logger/logger.h Examining data/siridb-server-2.0.40/include/omap/omap.h Examining data/siridb-server-2.0.40/include/owcrypt/owcrypt.h Examining data/siridb-server-2.0.40/include/procinfo/procinfo.h Examining data/siridb-server-2.0.40/include/qpack/qpack.h Examining data/siridb-server-2.0.40/include/qpjson/qpjson.h Examining data/siridb-server-2.0.40/include/siri/api.h Examining data/siridb-server-2.0.40/include/siri/args/args.h Examining data/siridb-server-2.0.40/include/siri/async.h Examining data/siridb-server-2.0.40/include/siri/backup.h Examining data/siridb-server-2.0.40/include/siri/buffersync.h Examining data/siridb-server-2.0.40/include/siri/cfg/cfg.h Examining data/siridb-server-2.0.40/include/siri/db/access.h Examining data/siridb-server-2.0.40/include/siri/db/aggregate.h Examining data/siridb-server-2.0.40/include/siri/db/auth.h Examining data/siridb-server-2.0.40/include/siri/db/buffer.h Examining data/siridb-server-2.0.40/include/siri/db/db.h Examining data/siridb-server-2.0.40/include/siri/db/ffile.h Examining data/siridb-server-2.0.40/include/siri/db/fifo.h Examining data/siridb-server-2.0.40/include/siri/db/forward.h Examining data/siridb-server-2.0.40/include/siri/db/group.h Examining data/siridb-server-2.0.40/include/siri/db/groups.h Examining data/siridb-server-2.0.40/include/siri/db/initsync.h Examining data/siridb-server-2.0.40/include/siri/db/insert.h Examining data/siridb-server-2.0.40/include/siri/db/listener.h Examining data/siridb-server-2.0.40/include/siri/db/lookup.h Examining data/siridb-server-2.0.40/include/siri/db/median.h Examining data/siridb-server-2.0.40/include/siri/db/misc.h Examining data/siridb-server-2.0.40/include/siri/db/nodes.h Examining data/siridb-server-2.0.40/include/siri/db/pcache.h Examining data/siridb-server-2.0.40/include/siri/db/points.h Examining data/siridb-server-2.0.40/include/siri/db/pool.h Examining data/siridb-server-2.0.40/include/siri/db/pools.h Examining data/siridb-server-2.0.40/include/siri/db/presuf.h Examining data/siridb-server-2.0.40/include/siri/db/props.h Examining data/siridb-server-2.0.40/include/siri/db/queries.h Examining data/siridb-server-2.0.40/include/siri/db/query.h Examining data/siridb-server-2.0.40/include/siri/db/re.h Examining data/siridb-server-2.0.40/include/siri/db/reindex.h Examining data/siridb-server-2.0.40/include/siri/db/replicate.h Examining data/siridb-server-2.0.40/include/siri/db/series.h Examining data/siridb-server-2.0.40/include/siri/db/series.inline.h Examining data/siridb-server-2.0.40/include/siri/db/server.h Examining data/siridb-server-2.0.40/include/siri/db/servers.h Examining data/siridb-server-2.0.40/include/siri/db/shard.h Examining data/siridb-server-2.0.40/include/siri/db/shards.h Examining data/siridb-server-2.0.40/include/siri/db/sset.h Examining data/siridb-server-2.0.40/include/siri/db/tag.h Examining data/siridb-server-2.0.40/include/siri/db/tags.h Examining data/siridb-server-2.0.40/include/siri/db/tasks.h Examining data/siridb-server-2.0.40/include/siri/db/tee.h Examining data/siridb-server-2.0.40/include/siri/db/time.h Examining data/siridb-server-2.0.40/include/siri/db/user.h Examining data/siridb-server-2.0.40/include/siri/db/users.h Examining data/siridb-server-2.0.40/include/siri/db/variance.h Examining data/siridb-server-2.0.40/include/siri/db/walker.h Examining data/siridb-server-2.0.40/include/siri/err.h Examining data/siridb-server-2.0.40/include/siri/evars.h Examining data/siridb-server-2.0.40/include/siri/file/handler.h Examining data/siridb-server-2.0.40/include/siri/file/pointer.h Examining data/siridb-server-2.0.40/include/siri/grammar/grammar.h Examining data/siridb-server-2.0.40/include/siri/grammar/gramp.h Examining data/siridb-server-2.0.40/include/siri/health.h Examining data/siridb-server-2.0.40/include/siri/heartbeat.h Examining data/siridb-server-2.0.40/include/siri/help/help.h Examining data/siridb-server-2.0.40/include/siri/inc.h Examining data/siridb-server-2.0.40/include/siri/net/bserver.h Examining data/siridb-server-2.0.40/include/siri/net/clserver.h Examining data/siridb-server-2.0.40/include/siri/net/pipe.h Examining data/siridb-server-2.0.40/include/siri/net/pkg.h Examining data/siridb-server-2.0.40/include/siri/net/promise.h Examining data/siridb-server-2.0.40/include/siri/net/promises.h Examining data/siridb-server-2.0.40/include/siri/net/protocol.h Examining data/siridb-server-2.0.40/include/siri/net/stream.h Examining data/siridb-server-2.0.40/include/siri/net/tcp.h Examining data/siridb-server-2.0.40/include/siri/optimize.h Examining data/siridb-server-2.0.40/include/siri/service/account.h Examining data/siridb-server-2.0.40/include/siri/service/client.h Examining data/siridb-server-2.0.40/include/siri/service/request.h Examining data/siridb-server-2.0.40/include/siri/siri.h Examining data/siridb-server-2.0.40/include/siri/version.h Examining data/siridb-server-2.0.40/include/timeit/timeit.h Examining data/siridb-server-2.0.40/include/vec/vec.h Examining data/siridb-server-2.0.40/include/xmath/xmath.h Examining data/siridb-server-2.0.40/include/xpath/xpath.h Examining data/siridb-server-2.0.40/include/xstr/xstr.h Examining data/siridb-server-2.0.40/main.c Examining data/siridb-server-2.0.40/src/argparse/argparse.c Examining data/siridb-server-2.0.40/src/base64/base64.c Examining data/siridb-server-2.0.40/src/cexpr/cexpr.c Examining data/siridb-server-2.0.40/src/cfgparser/cfgparser.c Examining data/siridb-server-2.0.40/src/ctree/ctree.c Examining data/siridb-server-2.0.40/src/expr/expr.c Examining data/siridb-server-2.0.40/src/imap/imap.c Examining data/siridb-server-2.0.40/src/iso8601/iso8601.c Examining data/siridb-server-2.0.40/src/lib/http_parser.c Examining data/siridb-server-2.0.40/src/llist/llist.c Examining data/siridb-server-2.0.40/src/lock/lock.c Examining data/siridb-server-2.0.40/src/logger/logger.c Examining data/siridb-server-2.0.40/src/omap/omap.c Examining data/siridb-server-2.0.40/src/owcrypt/owcrypt.c Examining data/siridb-server-2.0.40/src/procinfo/procinfo.c Examining data/siridb-server-2.0.40/src/qpack/qpack.c Examining data/siridb-server-2.0.40/src/qpjson/qpjson.c Examining data/siridb-server-2.0.40/src/siri/api.c Examining data/siridb-server-2.0.40/src/siri/args/args.c Examining data/siridb-server-2.0.40/src/siri/async.c Examining data/siridb-server-2.0.40/src/siri/backup.c Examining data/siridb-server-2.0.40/src/siri/buffersync.c Examining data/siridb-server-2.0.40/src/siri/cfg/cfg.c Examining data/siridb-server-2.0.40/src/siri/db/access.c Examining data/siridb-server-2.0.40/src/siri/db/aggregate.c Examining data/siridb-server-2.0.40/src/siri/db/auth.c Examining data/siridb-server-2.0.40/src/siri/db/buffer.c Examining data/siridb-server-2.0.40/src/siri/db/db.c Examining data/siridb-server-2.0.40/src/siri/db/ffile.c Examining data/siridb-server-2.0.40/src/siri/db/fifo.c Examining data/siridb-server-2.0.40/src/siri/db/forward.c Examining data/siridb-server-2.0.40/src/siri/db/group.c Examining data/siridb-server-2.0.40/src/siri/db/groups.c Examining data/siridb-server-2.0.40/src/siri/db/initsync.c Examining data/siridb-server-2.0.40/src/siri/db/insert.c Examining data/siridb-server-2.0.40/src/siri/db/listener.c Examining data/siridb-server-2.0.40/src/siri/db/lookup.c Examining data/siridb-server-2.0.40/src/siri/db/median.c Examining data/siridb-server-2.0.40/src/siri/db/misc.c Examining data/siridb-server-2.0.40/src/siri/db/nodes.c Examining data/siridb-server-2.0.40/src/siri/db/pcache.c Examining data/siridb-server-2.0.40/src/siri/db/points.c Examining data/siridb-server-2.0.40/src/siri/db/pool.c Examining data/siridb-server-2.0.40/src/siri/db/pools.c Examining data/siridb-server-2.0.40/src/siri/db/presuf.c Examining data/siridb-server-2.0.40/src/siri/db/props.c Examining data/siridb-server-2.0.40/src/siri/db/queries.c Examining data/siridb-server-2.0.40/src/siri/db/query.c Examining data/siridb-server-2.0.40/src/siri/db/re.c Examining data/siridb-server-2.0.40/src/siri/db/reindex.c Examining data/siridb-server-2.0.40/src/siri/db/replicate.c Examining data/siridb-server-2.0.40/src/siri/db/series.c Examining data/siridb-server-2.0.40/src/siri/db/server.c Examining data/siridb-server-2.0.40/src/siri/db/servers.c Examining data/siridb-server-2.0.40/src/siri/db/shard.c Examining data/siridb-server-2.0.40/src/siri/db/shards.c Examining data/siridb-server-2.0.40/src/siri/db/sset.c Examining data/siridb-server-2.0.40/src/siri/db/tag.c Examining data/siridb-server-2.0.40/src/siri/db/tags.c Examining data/siridb-server-2.0.40/src/siri/db/tasks.c Examining data/siridb-server-2.0.40/src/siri/db/tee.c Examining data/siridb-server-2.0.40/src/siri/db/time.c Examining data/siridb-server-2.0.40/src/siri/db/user.c Examining data/siridb-server-2.0.40/src/siri/db/users.c Examining data/siridb-server-2.0.40/src/siri/db/variance.c Examining data/siridb-server-2.0.40/src/siri/db/walker.c Examining data/siridb-server-2.0.40/src/siri/err.c Examining data/siridb-server-2.0.40/src/siri/evars.c Examining data/siridb-server-2.0.40/src/siri/file/handler.c Examining data/siridb-server-2.0.40/src/siri/file/pointer.c Examining data/siridb-server-2.0.40/src/siri/grammar/grammar.c Examining data/siridb-server-2.0.40/src/siri/health.c Examining data/siridb-server-2.0.40/src/siri/heartbeat.c Examining data/siridb-server-2.0.40/src/siri/help/help.c Examining data/siridb-server-2.0.40/src/siri/net/bserver.c Examining data/siridb-server-2.0.40/src/siri/net/clserver.c Examining data/siridb-server-2.0.40/src/siri/net/pipe.c Examining data/siridb-server-2.0.40/src/siri/net/pkg.c Examining data/siridb-server-2.0.40/src/siri/net/promise.c Examining data/siridb-server-2.0.40/src/siri/net/promises.c Examining data/siridb-server-2.0.40/src/siri/net/protocol.c Examining data/siridb-server-2.0.40/src/siri/net/stream.c Examining data/siridb-server-2.0.40/src/siri/net/tcp.c Examining data/siridb-server-2.0.40/src/siri/optimize.c Examining data/siridb-server-2.0.40/src/siri/service/account.c Examining data/siridb-server-2.0.40/src/siri/service/client.c Examining data/siridb-server-2.0.40/src/siri/service/request.c Examining data/siridb-server-2.0.40/src/siri/siri.c Examining data/siridb-server-2.0.40/src/siri/version.c Examining data/siridb-server-2.0.40/src/timeit/timeit.c Examining data/siridb-server-2.0.40/src/vec/vec.c Examining data/siridb-server-2.0.40/src/xmath/xmath.c Examining data/siridb-server-2.0.40/src/xpath/xpath.c Examining data/siridb-server-2.0.40/src/xstr/xstr.c Examining data/siridb-server-2.0.40/test/test.h Examining data/siridb-server-2.0.40/test/test_access/test_access.c Examining data/siridb-server-2.0.40/test/test_aggr/test_aggr.c Examining data/siridb-server-2.0.40/test/test_ctree/test_ctree.c Examining data/siridb-server-2.0.40/test/test_expr/test_expr.c Examining data/siridb-server-2.0.40/test/test_grammar/test_grammar.c Examining data/siridb-server-2.0.40/test/test_imap/test_imap.c Examining data/siridb-server-2.0.40/test/test_iso8601/test_iso8601.c Examining data/siridb-server-2.0.40/test/test_lookup/test_lookup.c Examining data/siridb-server-2.0.40/test/test_siridb/test_siridb.c Examining data/siridb-server-2.0.40/test/test_vec/test_vec.c Examining data/siridb-server-2.0.40/test/test_version/test_version.c Examining data/siridb-server-2.0.40/test/test_xmath/test_xmath.c Examining data/siridb-server-2.0.40/test/test_xpath/test_xpath.c Examining data/siridb-server-2.0.40/test/test_xstr/test_xstr.c FINAL RESULTS: data/siridb-server-2.0.40/src/xpath/xpath.c:89:9: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. if (readlink("/proc/self/exe", path, XPATH_MAX) == -1) data/siridb-server-2.0.40/include/siri/db/misc.h:12:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(__fn, "%s%s", __path, __filename); data/siridb-server-2.0.40/src/argparse/argparse.c:205:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( data/siridb-server-2.0.40/src/argparse/argparse.c:256:13: [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(uname, current->argument->name); data/siridb-server-2.0.40/src/argparse/argparse.c:340:13: [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(uname, current->argument->name); data/siridb-server-2.0.40/src/argparse/argparse.c:412:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "--%s", current->argument->name); data/siridb-server-2.0.40/src/argparse/argparse.c:466: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(buffer, argv[*argn]); data/siridb-server-2.0.40/src/argparse/argparse.c:472: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((*arg)->argument->str_value, buffer); data/siridb-server-2.0.40/src/argparse/argparse.c:480:13: [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((*arg)->argument->str_value, buffer); data/siridb-server-2.0.40/src/logger/logger.c:40:9: [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(Logger.ostream, \ data/siridb-server-2.0.40/src/logger/logger.c:53:9: [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(Logger.ostream, \ data/siridb-server-2.0.40/src/logger/logger.c:66:5: [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(Logger.ostream, fmt, args); \ data/siridb-server-2.0.40/src/qpack/qpack.c:365: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. if (vsnprintf(buffer, QPACK_MAX_FMT_SIZE, fmt, args) >= QPACK_MAX_FMT_SIZE) data/siridb-server-2.0.40/src/qpack/qpack.c:1216:9: [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("%" PRId64, qp_obj->via.int64); data/siridb-server-2.0.40/src/siri/api.c:72:15: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. int len = sprintf( data/siridb-server-2.0.40/src/siri/cfg/cfg.c:449: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(siri_cfg.pipe_client_name, option->val->string); data/siridb-server-2.0.40/src/siri/db/access.c:81:33: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. pt += (pt == str) ? sprintf(pt, "%s", access_map[i].repr) : data/siridb-server-2.0.40/src/siri/db/access.c:82:36: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (access_bit) ? sprintf(pt, ", %s", access_map[i].repr) : data/siridb-server-2.0.40/src/siri/db/access.c:83:29: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(pt, " and %s", access_map[i].repr); data/siridb-server-2.0.40/src/siri/db/aggregate.c:661:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(err_msg, data/siridb-server-2.0.40/src/siri/db/db.c:53: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(err_msg, ERROR_MSG); \ data/siridb-server-2.0.40/src/siri/db/db.c:332:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(err_msg, "Unsupported schema found: %" PRId64, data/siridb-server-2.0.40/src/siri/db/listener.c:66:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(query->err_msg, \ data/siridb-server-2.0.40/src/siri/db/listener.c:75:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(query->err_msg, \ data/siridb-server-2.0.40/src/siri/db/listener.c:88:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(query->err_msg, \ data/siridb-server-2.0.40/src/siri/db/listener.c:100:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(query->err_msg, \ data/siridb-server-2.0.40/src/siri/db/listener.c:109:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(query->err_msg, \ data/siridb-server-2.0.40/src/siri/db/listener.c:119:4: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(query->err_msg, \ data/siridb-server-2.0.40/src/siri/db/listener.c:4104:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(query->err_msg, MSG_ERR_SERVER_ADDRESS); data/siridb-server-2.0.40/src/siri/db/listener.c:4322:13: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(query->err_msg, data/siridb-server-2.0.40/src/siri/db/listener.c:4430: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. snprintf(query->err_msg, data/siridb-server-2.0.40/src/siri/db/listener.c:4630:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(query->err_msg, MSG_ERR_SERVER_ADDRESS); data/siridb-server-2.0.40/src/siri/db/listener.c:4688: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. snprintf(query->err_msg, data/siridb-server-2.0.40/src/siri/db/presuf.c:138:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(presuffed_name, data/siridb-server-2.0.40/src/siri/db/query.c:867:13: [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. n = snprintf( data/siridb-server-2.0.40/src/siri/db/query.c:894:17: [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. n = snprintf( data/siridb-server-2.0.40/src/siri/db/query.c:929:17: [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. n = snprintf( data/siridb-server-2.0.40/src/siri/db/series.c:982:31: [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. qp_obj->len = snprintf( data/siridb-server-2.0.40/src/siri/db/server.c:787:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buffer, (!n) ? "running" : " | " "running"); data/siridb-server-2.0.40/src/siri/db/server.c:790:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buffer, (!n) ? "synchronizing" : " | " "synchronizing"); data/siridb-server-2.0.40/src/siri/db/server.c:793:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buffer, (!n) ? "re-indexing" : " | " "re-indexing"); data/siridb-server-2.0.40/src/siri/db/server.c:796:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buffer, (!n) ? "backup-mode" : " | " "backup-mode"); data/siridb-server-2.0.40/src/siri/db/server.c:799:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buffer, (!n) ? "queue-full" : " | " "queue-full"); data/siridb-server-2.0.40/src/siri/db/server.c:802:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buffer, (!n) ? "unavailable" : " | " "unavailable"); data/siridb-server-2.0.40/src/siri/db/server.c:1240:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(server->name, "[%s]:%d", server->address, server->port); data/siridb-server-2.0.40/src/siri/db/server.c:1244:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(server->name, "%s:%d", server->address, server->port); data/siridb-server-2.0.40/src/siri/db/shard.c:604:33: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. pt += (pt == str) ? sprintf(pt, "%s", flags_map[i].repr) : data/siridb-server-2.0.40/src/siri/db/shard.c:605:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(pt, " | %s", flags_map[i].repr); data/siridb-server-2.0.40/src/siri/db/users.c:242:23: [4] (crypto) crypt_r: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. fallback_pw = crypt_r(password, user->password, &fallback_data); data/siridb-server-2.0.40/src/siri/db/users.c:312:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(err_msg, MSG_ERR_CANNOT_WRITE_USERS); data/siridb-server-2.0.40/src/siri/net/tcp.c:53:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( data/siridb-server-2.0.40/src/siri/net/tcp.c:69:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( data/siridb-server-2.0.40/src/siri/net/tcp.c:138:13: [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, address) == NULL || data/siridb-server-2.0.40/src/siri/service/account.c:49:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn, "%s%s", siri->cfg->default_db_path, FILENAME); data/siridb-server-2.0.40/src/siri/service/account.c:392:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn, "%s%s", siri->cfg->default_db_path, FILENAME); data/siridb-server-2.0.40/src/siri/service/account.c:456: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(err_msg, SIRI_MAX_SIZE_ERR_MSG, fmt, args); data/siridb-server-2.0.40/src/siri/service/client.c:340: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(err_msg, SIRI_MAX_SIZE_ERR_MSG, fmt, args); data/siridb-server-2.0.40/src/siri/service/client.c:640:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn, "%sdatabase.dat", adm_client->dbpath); data/siridb-server-2.0.40/src/siri/service/client.c:763:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn, "%sservers.dat", adm_client->dbpath); data/siridb-server-2.0.40/src/siri/service/client.c:846:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn, "%sgroups.dat", adm_client->dbpath); data/siridb-server-2.0.40/src/siri/service/client.c:888:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn, "%susers.dat", adm_client->dbpath); data/siridb-server-2.0.40/src/siri/service/request.c:57: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. snprintf( \ data/siridb-server-2.0.40/src/siri/service/request.c:71: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. snprintf( \ data/siridb-server-2.0.40/src/siri/service/request.c:82:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(dbpath, \ data/siridb-server-2.0.40/src/siri/service/request.c:90: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. snprintf( \ data/siridb-server-2.0.40/src/siri/service/request.c:100: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. snprintf( \ data/siridb-server-2.0.40/src/siri/service/request.c:109:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dbfn, "%s%s", dbpath, DB_CONF_FN); \ data/siridb-server-2.0.40/src/siri/service/request.c:115: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. snprintf( \ data/siridb-server-2.0.40/src/siri/service/request.c:128: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. snprintf( \ data/siridb-server-2.0.40/src/siri/service/request.c:695:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dbfn, "%s%s", dbpath, DB_DAT_FN); data/siridb-server-2.0.40/src/siri/service/request.c:884:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dbfn, "%s%s", dbpath, REINDEX_FN); data/siridb-server-2.0.40/src/siri/service/request.c:1003:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dbfn, "%s%s", dbpath, DB_CONF_FN); data/siridb-server-2.0.40/src/siri/service/request.c:1005:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dbfn, "%s%s", dbpath, DB_DAT_FN); data/siridb-server-2.0.40/src/siri/service/request.c:1007:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dbfn, "%s%s", dbpath, REINDEX_FN); data/siridb-server-2.0.40/src/siri/siri.c:113: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(lname, logger_level_name(n)); data/siridb-server-2.0.40/src/xpath/xpath.c:137:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s%s%s", path, slash, p->d_name); data/siridb-server-2.0.40/main.c:31: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(time(NULL)); data/siridb-server-2.0.40/src/procinfo/procinfo.c:186:17: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (realpath(buffer, buf) == NULL) data/siridb-server-2.0.40/src/siri/evars.c:10:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char * u8str = getenv(evar); data/siridb-server-2.0.40/src/siri/evars.c:19:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char * u16str = getenv(evar); data/siridb-server-2.0.40/src/siri/evars.c:33:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char * u16str = getenv(evar); data/siridb-server-2.0.40/src/siri/evars.c:51:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char * u32str = getenv(evar); data/siridb-server-2.0.40/src/siri/evars.c:64:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char * str = getenv(evar); data/siridb-server-2.0.40/src/siri/evars.c:73:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char * str = getenv(evar); data/siridb-server-2.0.40/src/siri/evars.c:96:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char * str = getenv(evar); data/siridb-server-2.0.40/src/siri/evars.c:115:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char * str = getenv(evar); data/siridb-server-2.0.40/src/siri/siri.c:132:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char * sysuser = getenv("USER"); data/siridb-server-2.0.40/src/siri/siri.c:133:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char * homedir = getenv("HOME"); data/siridb-server-2.0.40/src/siri/siri.c:164:9: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (realpath(siri.cfg->default_db_path, tmppath) == NULL) data/siridb-server-2.0.40/include/qpack/qpack.h:107:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). #define qp_open fopen /* returns NULL in case of an error */ data/siridb-server-2.0.40/include/qpack/qpack.h:199: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. unsigned char BUF__[3];\ data/siridb-server-2.0.40/include/qpack/qpack.h:201:1: [2] (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], &N__, 2); data/siridb-server-2.0.40/include/siri/args/args.h:23: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 config[ARGPARSE_MAX_LEN_ARG]; data/siridb-server-2.0.40/include/siri/args/args.h:24: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 log_level[ARGPARSE_MAX_LEN_ARG]; data/siridb-server-2.0.40/include/siri/cfg/cfg.h:45: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 server_address[SIRI_CFG_MAX_LEN_ADDRESS]; data/siridb-server-2.0.40/include/siri/cfg/cfg.h:46: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 default_db_path[XPATH_MAX]; data/siridb-server-2.0.40/include/siri/cfg/cfg.h:47: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 pipe_client_name[XPATH_MAX]; data/siridb-server-2.0.40/include/siri/db/misc.h:11: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 __fn[strlen(__path) + strlen(__filename) + 1]; \ data/siridb-server-2.0.40/include/siri/db/query.h: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 err_msg[SIRIDB_MAX_SIZE_ERR_MSG]; data/siridb-server-2.0.40/include/siri/db/series.h:37:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern const char series_type_map[3][8]; data/siridb-server-2.0.40/include/siri/db/shard.h:29:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern const char shard_type_map[2][7]; data/siridb-server-2.0.40/include/siri/db/shard.h:181: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 Name__[Len__ + 1]; \ data/siridb-server-2.0.40/include/siri/db/shard.h:182: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(Name__, Fn__, Len__ - 3); \ data/siridb-server-2.0.40/include/siri/db/shard.h:183: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(Name__ + Len__ - 3, "idx", 4) data/siridb-server-2.0.40/include/siri/db/time.h:24:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char * SIRIDB_TIME_SHORT_MAP[SIRIDB_TIME_END] = {"s", "ms", "us", "ns"}; data/siridb-server-2.0.40/src/argparse/argparse.c:92: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[ARGPARSE_ERR_SIZE]; data/siridb-server-2.0.40/src/argparse/argparse.c:225: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[ARGPARSE_HELP_SIZE]; data/siridb-server-2.0.40/src/argparse/argparse.c:226: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 uname[ARGPARSE_MAX_LEN_ARG]; data/siridb-server-2.0.40/src/argparse/argparse.c:308: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[ARGPARSE_HELP_SIZE]; data/siridb-server-2.0.40/src/argparse/argparse.c:309: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 uname[ARGPARSE_MAX_LEN_ARG]; data/siridb-server-2.0.40/src/argparse/argparse.c:397: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[ARGPARSE_MAX_LEN_ARG]; data/siridb-server-2.0.40/src/argparse/argparse.c:404:13: [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(buffer, "-%c", current->argument->shortcut); data/siridb-server-2.0.40/src/argparse/argparse.c:429: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[ARGPARSE_MAX_LEN_ARG]; data/siridb-server-2.0.40/src/argparse/argparse.c:475:57: [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). *(*arg)->argument->pt_value_int32_t = (int32_t) atoi(buffer); data/siridb-server-2.0.40/src/base64/base64.c:17:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char base64__table[65] = data/siridb-server-2.0.40/src/cfgparser/cfgparser.c:34: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 line[MAXLINE]; data/siridb-server-2.0.40/src/cfgparser/cfgparser.c:42:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fn, "r"); data/siridb-server-2.0.40/src/cfgparser/cfgparser.c:108:62: [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). option = cfgparser_integer_option(section, name, atoi(pt), 0); data/siridb-server-2.0.40/src/ctree/ctree.c:373: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(*buffer + len, node->key, node->len); data/siridb-server-2.0.40/src/ctree/ctree.c:660: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(node->key + node->len, child_node->key, child_node->len); data/siridb-server-2.0.40/src/ctree/ctree.c:792: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(node->key, key, len); data/siridb-server-2.0.40/src/iso8601/iso8601.c:518: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 buf[len]; data/siridb-server-2.0.40/src/iso8601/iso8601.c:691:13: [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. putenv((char *) tz_common[tz]); data/siridb-server-2.0.40/src/lib/http_parser.c:189:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char tokens[256] = { data/siridb-server-2.0.40/src/lock/lock.c:38: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 strpid[10]; data/siridb-server-2.0.40/src/lock/lock.c:51:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(lock_fn, "r"); data/siridb-server-2.0.40/src/lock/lock.c:186:17: [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(lock_fn, "w"); data/siridb-server-2.0.40/src/lock/lock.c:250:9: [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(*name, "/proc/%d/comm", pid); data/siridb-server-2.0.40/src/lock/lock.c:251:21: [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(*name, "r"); data/siridb-server-2.0.40/src/logger/logger.c:28:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char * LOGGER_LEVEL_NAMES[LOGGER_NUM_LEVELS] = data/siridb-server-2.0.40/src/logger/logger.c:31:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char * LOGGER_COLOR_MAP[LOGGER_NUM_LEVELS] = data/siridb-server-2.0.40/src/procinfo/procinfo.c:40:19: [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 * file = fopen("/proc/self/status", "r"); data/siridb-server-2.0.40/src/procinfo/procinfo.c:44: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 line[128]; data/siridb-server-2.0.40/src/procinfo/procinfo.c:84:19: [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 * file = fopen("/proc/self/status", "r"); data/siridb-server-2.0.40/src/procinfo/procinfo.c:88: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 line[128]; data/siridb-server-2.0.40/src/procinfo/procinfo.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 buffer[XPATH_MAX]; data/siridb-server-2.0.40/src/procinfo/procinfo.c:167: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 buf[XPATH_MAX]; data/siridb-server-2.0.40/src/procinfo/procinfo.c:221:9: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). i = atol(line); data/siridb-server-2.0.40/src/qpack/qpack.c:61: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(packer->buffer + packer->len, &length, 2); \ data/siridb-server-2.0.40/src/qpack/qpack.c:68: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(packer->buffer + packer->len, &length, 4); \ data/siridb-server-2.0.40/src/qpack/qpack.c:74: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(packer->buffer + packer->len, &len, 8); \ data/siridb-server-2.0.40/src/qpack/qpack.c:154:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fn, "r"); data/siridb-server-2.0.40/src/qpack/qpack.c:252: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(packer->buffer + packer->len, source->buffer, source->len); data/siridb-server-2.0.40/src/qpack/qpack.c:276: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(packer->buffer + packer->len, start, size); data/siridb-server-2.0.40/src/qpack/qpack.c:363: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[QPACK_MAX_FMT_SIZE]; data/siridb-server-2.0.40/src/qpack/qpack.c:407: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(packer->buffer + packer->len, raw, len); data/siridb-server-2.0.40/src/qpack/qpack.c:439: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(packer->buffer + packer->len, raw, len_raw); data/siridb-server-2.0.40/src/qpack/qpack.c:466: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(packer->buffer + packer->len, &real, sizeof(double)); data/siridb-server-2.0.40/src/qpack/qpack.c:509: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(packer->buffer + packer->len, &i16, sizeof(int16_t)); data/siridb-server-2.0.40/src/qpack/qpack.c:519: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(packer->buffer + packer->len, &i32, sizeof(int32_t)); data/siridb-server-2.0.40/src/qpack/qpack.c:527: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(packer->buffer + packer->len, &integer, sizeof(int64_t)); data/siridb-server-2.0.40/src/qpack/qpack.c:1008: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(&qp_obj->via.real, unpacker->pt, sizeof(double)); data/siridb-server-2.0.40/src/qpjson/qpjson.c:155: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, tmp, *dst_n); data/siridb-server-2.0.40/src/siri/api.c:33:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char api__content_type[3][20] = { data/siridb-server-2.0.40/src/siri/api.c:39:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char api__html_header[10][32] = { data/siridb-server-2.0.40/src/siri/api.c:52:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char api__default_body[10][30] = { data/siridb-server-2.0.40/src/siri/api.c:405:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ar->buf + offset, at, n); data/siridb-server-2.0.40/src/siri/api.c:425: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 header[API__HEADER_MAX_SZ]; data/siridb-server-2.0.40/src/siri/api.c:703: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 err_msg[SIRI_MAX_SIZE_ERR_MSG]; data/siridb-server-2.0.40/src/siri/api.c:813: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 header[API__HEADER_MAX_SZ]; data/siridb-server-2.0.40/src/siri/api.c:961: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(data, src, n); data/siridb-server-2.0.40/src/siri/db/access.c:88:9: [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(pt, "no access"); data/siridb-server-2.0.40/src/siri/db/aggregate.c:20:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(err_msg, "Memory allocation error."); \ data/siridb-server-2.0.40/src/siri/db/aggregate.c:28:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(err_msg, "Memory allocation error."); \ data/siridb-server-2.0.40/src/siri/db/aggregate.c:212:9: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:231:21: [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(err_msg, data/siridb-server-2.0.40/src/siri/db/aggregate.c:376:25: [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(err_msg, data/siridb-server-2.0.40/src/siri/db/aggregate.c:392:29: [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(err_msg, data/siridb-server-2.0.40/src/siri/db/aggregate.c:435:21: [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(err_msg, data/siridb-server-2.0.40/src/siri/db/aggregate.c:626:13: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:636:13: [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(err_msg, data/siridb-server-2.0.40/src/siri/db/aggregate.c:696:9: [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(err_msg, "Cannot use derivative() on string type."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:705:9: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:759:9: [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(err_msg, "Cannot use difference() on string type."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:768:9: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:796:29: [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(err_msg, data/siridb-server-2.0.40/src/siri/db/aggregate.c:840:9: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:858:21: [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(err_msg, data/siridb-server-2.0.40/src/siri/db/aggregate.c:879:9: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:893:17: [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(err_msg, data/siridb-server-2.0.40/src/siri/db/aggregate.c:930:13: [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(err_msg, "Cannot use a number filter on string type."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:937:13: [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(err_msg, "Cannot use a string filter on number type."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:958:9: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:982:25: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1091:9: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1169:9: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1246:9: [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(err_msg, "Cannot use derivative() on string type."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1293:9: [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(err_msg, "Cannot use difference() on string type."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1309:17: [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(err_msg, "Overflow detected while using difference()."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1348:9: [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(err_msg, "Cannot use max() on string type."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1396:9: [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(err_msg, "Cannot use mean() on string type."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1433:9: [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(err_msg, "Cannot use median() on string type."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1458:9: [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(err_msg, "Memory allocation error in median."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1475:9: [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(err_msg, "Cannot use median_high() on string type."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1492:9: [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(err_msg, "Memory allocation error in median high."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1508:9: [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(err_msg, "Cannot use median_low() on string type."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1525:9: [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(err_msg, "Memory allocation error in median low."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1541:9: [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(err_msg, "Cannot use min() on string type."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1586:9: [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(err_msg, "Cannot use pvariance() on string type."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1613:9: [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(err_msg, "Cannot use sum() on string type."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1627:21: [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(err_msg, "Overflow detected while using sum()."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1667:9: [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(err_msg, "Cannot use variance() on string type."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1695:9: [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(err_msg, "Cannot use stddev() on string type."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1729:13: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/aggregate.c:1764:13: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/auth.c:26: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 username[qp_username->len + 1]; data/siridb-server-2.0.40/src/siri/db/auth.c:27: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(username, qp_username->via.raw, qp_username->len); data/siridb-server-2.0.40/src/siri/db/auth.c:30: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 password[qp_password->len + 1]; data/siridb-server-2.0.40/src/siri/db/auth.c:31: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(password, qp_password->via.raw, qp_password->len); data/siridb-server-2.0.40/src/siri/db/auth.c:110: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(uuid, qp_uuid->via.raw, 16); data/siridb-server-2.0.40/src/siri/db/buffer.c:136: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(buffer->template + 4, &series->id, sizeof(uint32_t)); data/siridb-server-2.0.40/src/siri/db/buffer.c:163: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 buf[sz]; data/siridb-server-2.0.40/src/siri/db/buffer.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(buf, ts, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/buffer.c:168: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(uint64_t), val, sizeof(qp_via_t)); data/siridb-server-2.0.40/src/siri/db/buffer.c:209:23: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((buffer->fp = fopen(fn, "r+")) == NULL) data/siridb-server-2.0.40/src/siri/db/buffer.c:297:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(fn, "r")) == NULL) data/siridb-server-2.0.40/src/siri/db/buffer.c:301:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(fn, "w")) == NULL) data/siridb-server-2.0.40/src/siri/db/buffer.c:309:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp_temp = fopen(fn_temp, "w")) == NULL) data/siridb-server-2.0.40/src/siri/db/buffer.c:367: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(buffer->template, pt, cur_size); data/siridb-server-2.0.40/src/siri/db/buffer.c:383: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. memcpy( data/siridb-server-2.0.40/src/siri/db/buffer.c:528:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(npt, &buffer__start, sizeof(uint32_t)); data/siridb-server-2.0.40/src/siri/db/buffer.c:530: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(npt, &series_id, sizeof(uint32_t)); data/siridb-server-2.0.40/src/siri/db/buffer.c:537: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(npt, &buffer__end, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/buffer.c:549: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(pt, &buffer__end, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/buffer.c:551: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(template, &buffer__start, sizeof(uint32_t)); data/siridb-server-2.0.40/src/siri/db/db.c:87: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[XPATH_MAX]; data/siridb-server-2.0.40/src/siri/db/db.c:313:9: [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(err_msg, "Corrupted database file."); data/siridb-server-2.0.40/src/siri/db/db.c:341:9: [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(err_msg, "Cannot create SiriDB instance."); data/siridb-server-2.0.40/src/siri/db/db.c:358: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(&(*siridb)->uuid, qp_obj.via.raw, qp_obj.len); data/siridb-server-2.0.40/src/siri/db/db.c:652: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[XPATH_MAX]; data/siridb-server-2.0.40/src/siri/db/db.c:966: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 err_msg[512]; data/siridb-server-2.0.40/src/siri/db/db.c:968: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[XPATH_MAX]; data/siridb-server-2.0.40/src/siri/db/db.c:1007: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 buf[XPATH_MAX]; data/siridb-server-2.0.40/src/siri/db/db.c:1061:21: [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(buf, "a"); data/siridb-server-2.0.40/src/siri/db/ffile.c:25:17: [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). ffile->fp = fopen(ffile->fn, opentype); data/siridb-server-2.0.40/src/siri/db/fifo.c:49: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 str_uuid[37]; data/siridb-server-2.0.40/src/siri/db/group.c:32:9: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/group.c:49:13: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/group.c:83:9: [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(err_msg, "Group name should be at least %d characters.", data/siridb-server-2.0.40/src/siri/db/group.c:90:9: [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(err_msg, "Group name should be at most %d characters.", data/siridb-server-2.0.40/src/siri/db/group.c:144:9: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/group.c:251:9: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/groups.c:187:9: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/groups.c:194:13: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/groups.c:509: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 err_msg[SIRIDB_MAX_SIZE_ERR_MSG]; data/siridb-server-2.0.40/src/siri/db/initsync.c:39:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char sync_progress[30]; data/siridb-server-2.0.40/src/siri/db/initsync.c:192:9: [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(sync_progress, "not available"); data/siridb-server-2.0.40/src/siri/db/initsync.c:200:9: [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(sync_progress, data/siridb-server-2.0.40/src/siri/db/initsync.c:213:20: [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). initsync->fp = fopen(initsync->fn, opentype); data/siridb-server-2.0.40/src/siri/db/insert.c:374: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 msg[MAX_INSERT_MSG]; data/siridb-server-2.0.40/src/siri/db/listener.c:139:9: [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(query->err_msg, "Memory allocation error."); \ data/siridb-server-2.0.40/src/siri/db/listener.c:144:9: [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(query->err_msg, "File error occurred."); \ data/siridb-server-2.0.40/src/siri/db/listener.c:585: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 name[group_node->len - 1]; data/siridb-server-2.0.40/src/siri/db/listener.c:617: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 name[tag_node->len - 1]; data/siridb-server-2.0.40/src/siri/db/listener.c:723: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 name[user_node->len - 1]; data/siridb-server-2.0.40/src/siri/db/listener.c:850: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 username[user_node->len - 1]; data/siridb-server-2.0.40/src/siri/db/listener.c:896: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 group_or_tag_name[node->len - 1]; data/siridb-server-2.0.40/src/siri/db/listener.c:1100: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 username[user_node->len - 1]; data/siridb-server-2.0.40/src/siri/db/listener.c:1234: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 name[name_node->len - 1]; data/siridb-server-2.0.40/src/siri/db/listener.c:1291: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 password[pw_node->len - 1]; data/siridb-server-2.0.40/src/siri/db/listener.c:1312: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 series_name[node->len - 1]; data/siridb-server-2.0.40/src/siri/db/listener.c:1705: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 name[tag_node->len - 1]; data/siridb-server-2.0.40/src/siri/db/listener.c:1825: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 name[tag_node->len - 1]; data/siridb-server-2.0.40/src/siri/db/listener.c:1896:9: [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(query->err_msg, "Max depth reached in 'where' expression!"); data/siridb-server-2.0.40/src/siri/db/listener.c:2668: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 group_name[name_nd->len - 1]; data/siridb-server-2.0.40/src/siri/db/listener.c:2732: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 name[user_node->len - 1]; data/siridb-server-2.0.40/src/siri/db/listener.c:2792: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 name[group_node->len - 1]; data/siridb-server-2.0.40/src/siri/db/listener.c:3114: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 name[tag_node->len - 1]; data/siridb-server-2.0.40/src/siri/db/listener.c:3152: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 username[user_node->len - 1]; data/siridb-server-2.0.40/src/siri/db/listener.c:3191:9: [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(query->err_msg, "Could not write users to file!"); data/siridb-server-2.0.40/src/siri/db/listener.c:3637:25: [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[SIRIDB_SHARD_STATUS_STR_MAX]; data/siridb-server-2.0.40/src/siri/db/listener.c:3798:9: [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(query->err_msg, "Could not write users to file!"); data/siridb-server-2.0.40/src/siri/db/listener.c:3964:21: [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(query->err_msg, data/siridb-server-2.0.40/src/siri/db/listener.c:4109: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 address[node->len - 1]; data/siridb-server-2.0.40/src/siri/db/listener.c:4117:9: [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(query->err_msg, "Error while updating server address"); data/siridb-server-2.0.40/src/siri/db/listener.c:4640:9: [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(query->err_msg, data/siridb-server-2.0.40/src/siri/db/listener.c:4651:13: [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(query->err_msg, "Error while updating server address"); data/siridb-server-2.0.40/src/siri/db/listener.c:4748: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 pipe_name[node->len - 1]; data/siridb-server-2.0.40/src/siri/db/listener.c:4880: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 timezone[node->len - 1]; data/siridb-server-2.0.40/src/siri/db/listener.c:5533:17: [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(query->err_msg, "Error adding points to map."); data/siridb-server-2.0.40/src/siri/db/listener.c:5555:17: [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(query->err_msg, "Error adding points to map."); data/siridb-server-2.0.40/src/siri/db/listener.c:5691:17: [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(query->err_msg, "Error adding points to map."); data/siridb-server-2.0.40/src/siri/db/listener.c:5713:17: [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(query->err_msg, "Error adding points to map."); data/siridb-server-2.0.40/src/siri/db/listener.c:6659:9: [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(query->err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/listener.c:6715:9: [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(query->err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/listener.c:6734:9: [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(query->err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/listener.c:6744:13: [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(query->err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/listener.c:6797:9: [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(query->err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/listener.c:6893: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(points->data, qp_points->via.raw, qp_points->len); data/siridb-server-2.0.40/src/siri/db/listener.c:6961: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. memcpy(points->data, qp_points->via.raw, qp_points->len); data/siridb-server-2.0.40/src/siri/db/points.c:129: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(cpoints->data, points->data, sz); data/siridb-server-2.0.40/src/siri/db/points.c:314:17: [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(err_msg, "Cannot merge string and number series."); data/siridb-server-2.0.40/src/siri/db/points.c:348:9: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/points.c:468: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(pt, &point->ts, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/points.c:470: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(pt, &point->val.uint64, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/points.c:490: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(pt, &point->val.uint64, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/points.c:592: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(pt, &ibit, sizeof(uint8_t)); data/siridb-server-2.0.40/src/siri/db/points.c:594: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(pt, &sz_src, sizeof(uint32_t)); data/siridb-server-2.0.40/src/siri/db/points.c:596: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(pt, &point->ts, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/points.c:705: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(pdata, &ts, sizeof(uint32_t)); data/siridb-server-2.0.40/src/siri/db/points.c:712: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(pdata, &points->data[i].ts, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/points.c:722: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(pdata, points->data[i].val.str, *psz); data/siridb-server-2.0.40/src/siri/db/points.c:795: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(pt, &point->ts, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/points.c:797: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(pt, &point->val.uint64, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/points.c:818: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(pt, &val, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/points.c:858: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(&point->ts, pt, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/points.c:860: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(&point->val.uint64, pt, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/points.c:903: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(&point->val.uint64, pt, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/points.c:963: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(&point->ts, pt, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/points.c:965: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(&point->val.uint64, pt, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/points.c:998: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(&point->val.uint64, pt, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/points.c:1176: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(&src_sz, pt, sizeof(uint32_t)); data/siridb-server-2.0.40/src/siri/db/points.c:1178: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(&point->ts, pt, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/points.c:1289: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(pt, &points->data[i].ts, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/points.c:1291: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(pt, &points->data[i].val, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/points.c:1311: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(&p.ts, pt, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/points.c:1313: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(&p.val, pt, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/points.c:1324: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(points->data + points->len++, &p, data/siridb-server-2.0.40/src/siri/db/points.c:1630: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(*pt, s, n); data/siridb-server-2.0.40/src/siri/db/props.c:621: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 uuid[37]; data/siridb-server-2.0.40/src/siri/db/query.c:407: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(query->err_msg, qp_err.via.raw, qp_err.len); data/siridb-server-2.0.40/src/siri/db/query.c:606:9: [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(query->err_msg, data/siridb-server-2.0.40/src/siri/db/query.c:629:13: [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(query->err_msg, "Division by zero error."); data/siridb-server-2.0.40/src/siri/db/query.c:632:13: [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(query->err_msg, "Modulo by zero error."); data/siridb-server-2.0.40/src/siri/db/query.c:635:13: [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(query->err_msg, data/siridb-server-2.0.40/src/siri/db/query.c:640:13: [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(query->err_msg, "Time expression out-of-range."); data/siridb-server-2.0.40/src/siri/db/query.c:643:13: [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(query->err_msg, "Invalid date string."); data/siridb-server-2.0.40/src/siri/db/query.c:646:13: [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(query->err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/query.c:679: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 buffer[packer->alloc_size]; data/siridb-server-2.0.40/src/siri/db/query.c:746: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 buffer[EXPR_MAX_SIZE]; data/siridb-server-2.0.40/src/siri/db/query.c:788: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 buffer[EXPR_MAX_SIZE]; data/siridb-server-2.0.40/src/siri/db/query.c:889: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 + EXPR_MAX_SIZE - *size, node->str, node->len); data/siridb-server-2.0.40/src/siri/db/query.c:916:13: [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 datestr[node->len - 1]; data/siridb-server-2.0.40/src/siri/db/query.c:984: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 + EXPR_MAX_SIZE - *size, node->str, node->len); data/siridb-server-2.0.40/src/siri/db/query.c:1031: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 + max_size - *size, node->str, node->len); data/siridb-server-2.0.40/src/siri/db/query.c:1049: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. char uuid[37]; data/siridb-server-2.0.40/src/siri/db/re.c:28: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 pattern[len + 1]; data/siridb-server-2.0.40/src/siri/db/re.c:29: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(pattern, source, len); data/siridb-server-2.0.40/src/siri/db/reindex.c:63:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char reindex_progress[30]; data/siridb-server-2.0.40/src/siri/db/reindex.c:196:9: [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(reindex_progress, "not available"); data/siridb-server-2.0.40/src/siri/db/reindex.c:204:9: [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(reindex_progress, data/siridb-server-2.0.40/src/siri/db/reindex.c:255:19: [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). reindex->fp = fopen(reindex->fn, opentype); data/siridb-server-2.0.40/src/siri/db/series.c:46:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char str_type_buf[STR_TYPE_BUF_SZ]; data/siridb-server-2.0.40/src/siri/db/series.c:70:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char series_type_map[3][8] = { data/siridb-server-2.0.40/src/siri/db/series.c:1467:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(fn, "r")) == NULL) data/siridb-server-2.0.40/src/siri/db/series.c:1657:31: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((siridb->dropped_fp = fopen(fn, "w")) == NULL) data/siridb-server-2.0.40/src/siri/db/series.c:1674:31: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((siridb->dropped_fp = fopen(fn, "a")) == NULL) data/siridb-server-2.0.40/src/siri/db/series.c:1705:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(fn, "r")) != NULL) data/siridb-server-2.0.40/src/siri/db/series.c:1731:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(fn, "w")) == NULL) data/siridb-server-2.0.40/src/siri/db/server.c:68: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(server->uuid, uuid, 16); data/siridb-server-2.0.40/src/siri/db/server.c:493: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 port[6]= {'\0'}; data/siridb-server-2.0.40/src/siri/db/server.c:494:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(port, "%u", server->port); data/siridb-server-2.0.40/src/siri/db/server.c:535:13: [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 addr[47] = {'\0'}; /* enough for both ipv4 and ipv6 */ data/siridb-server-2.0.40/src/siri/db/server.c:548:17: [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(addr, "unsupported family"); data/siridb-server-2.0.40/src/siri/db/server.c:776: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[128] = {}; data/siridb-server-2.0.40/src/siri/db/server.c:825:13: [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[server_node->len - 1]; data/siridb-server-2.0.40/src/siri/db/server.c:1073:13: [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 uuid[37]; data/siridb-server-2.0.40/src/siri/db/servers.c:634:17: [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 uuid[37]; data/siridb-server-2.0.40/src/siri/db/shard.c:104:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char shard_type_map[2][7] = { data/siridb-server-2.0.40/src/siri/db/shard.c:198:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(fn, "r")) == NULL) data/siridb-server-2.0.40/src/siri/db/shard.c:204: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 header[HEADER_SIZE]; data/siridb-server-2.0.40/src/siri/db/shard.c:305:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(shard->fn, "r")) == NULL) data/siridb-server-2.0.40/src/siri/db/shard.c:324: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 header[HEADER_SIZE]; data/siridb-server-2.0.40/src/siri/db/shard.c:484:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(shard->fn, "w")) == NULL) data/siridb-server-2.0.40/src/siri/db/shard.c:486: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/siridb-server-2.0.40/src/siri/db/shard.c:510: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/siridb-server-2.0.40/src/siri/db/shard.c:521: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/siridb-server-2.0.40/src/siri/db/shard.c:572:13: [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[SIRIDB_SHARD_STATUS_STR_MAX]; data/siridb-server-2.0.40/src/siri/db/shard.c:594:15: [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. pt += sprintf(pt, "optimizing"); data/siridb-server-2.0.40/src/siri/db/shard.c:611:15: [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. pt += sprintf(pt, "ok"); data/siridb-server-2.0.40/src/siri/db/shard.c:644:13: [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/siridb-server-2.0.40/src/siri/db/shard.c:743: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(cdata + p, &points->data[i].ts, ts_sz); data/siridb-server-2.0.40/src/siri/db/shard.c:745: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(cdata + p, &points->data[i].val, 8); data/siridb-server-2.0.40/src/siri/db/shard.c:754: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/siridb-server-2.0.40/src/siri/db/shard.c:1932:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fn, "r"); data/siridb-server-2.0.40/src/siri/db/shard.c:1989: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 idx[idx_sz]; data/siridb-server-2.0.40/src/siri/db/shard.c:2064: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 buf[24]; data/siridb-server-2.0.40/src/siri/db/shard.c:2065: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, &series->id, sizeof(uint32_t)); data/siridb-server-2.0.40/src/siri/db/shard.c:2073: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 + size, &start_ts, sizeof(uint32_t)); data/siridb-server-2.0.40/src/siri/db/shard.c:2075: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 + size, &end_ts, sizeof(uint32_t)); data/siridb-server-2.0.40/src/siri/db/shard.c:2081: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 + size, &points->data[start].ts, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/shard.c:2083: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 + size, &points->data[end - 1].ts, sizeof(uint64_t)); data/siridb-server-2.0.40/src/siri/db/shard.c:2092: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 + size, &len, sizeof(uint16_t)); data/siridb-server-2.0.40/src/siri/db/shard.c:2097: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 + size, cinfo, sizeof(uint16_t)); data/siridb-server-2.0.40/src/siri/db/shards.c:123:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[XPATH_MAX]; data/siridb-server-2.0.40/src/siri/db/tag.c:59:9: [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(err_msg, "Tag name should be at least %d characters.", data/siridb-server-2.0.40/src/siri/db/tag.c:66:9: [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(err_msg, "Tag name should be at most %d characters.", data/siridb-server-2.0.40/src/siri/db/tag.c:305:9: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/tee.c:14:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char tee__buf[TEE__BUF_SZ]; data/siridb-server-2.0.40/src/siri/db/user.c:60:13: [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[SIRIDB_ACCESS_STR_MAX]; data/siridb-server-2.0.40/src/siri/db/user.c:79:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char salt[OWCRYPT_SALT_SZ]; data/siridb-server-2.0.40/src/siri/db/user.c:80: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 encrypted[OWCRYPT_SZ]; data/siridb-server-2.0.40/src/siri/db/user.c:86:13: [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(err_msg, data/siridb-server-2.0.40/src/siri/db/user.c:97:13: [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(err_msg, data/siridb-server-2.0.40/src/siri/db/user.c:108:13: [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(err_msg, data/siridb-server-2.0.40/src/siri/db/user.c:148:9: [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(err_msg, "User name should be at least %d characters.", data/siridb-server-2.0.40/src/siri/db/user.c:155:9: [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(err_msg, "User name should be at least %d characters.", data/siridb-server-2.0.40/src/siri/db/user.c:162:9: [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(err_msg, data/siridb-server-2.0.40/src/siri/db/user.c:183:9: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/user.c:207: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[SIRIDB_ACCESS_STR_MAX]; data/siridb-server-2.0.40/src/siri/db/users.c:49: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 err_msg[SIRIDB_MAX_SIZE_ERR_MSG]; data/siridb-server-2.0.40/src/siri/db/users.c:179:9: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/db/users.c:209: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 pw[OWCRYPT_SZ]; data/siridb-server-2.0.40/src/siri/file/handler.c:82:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp->fp = fopen(fn, modes)) == NULL) data/siridb-server-2.0.40/src/siri/help/help.c:11:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char * siri_help_content[HELP_COUNT] = {0}; data/siridb-server-2.0.40/src/siri/help/help.c:32: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 path[XPATH_MAX]; data/siridb-server-2.0.40/src/siri/help/help.c:33: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 fn[XPATH_MAX]; data/siridb-server-2.0.40/src/siri/help/help.c:39:13: [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(err_msg, "Error while reading executable path"); data/siridb-server-2.0.40/src/siri/help/help.c:70:25: [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 (fn, "rb"); data/siridb-server-2.0.40/src/siri/net/clserver.c:518: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 err_msg[SIRIDB_MAX_SIZE_ERR_MSG]; data/siridb-server-2.0.40/src/siri/net/clserver.c:643: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 err_msg[SIRIDB_MAX_SIZE_ERR_MSG]; data/siridb-server-2.0.40/src/siri/net/clserver.c:703: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 err_msg[SIRIDB_MAX_SIZE_ERR_MSG]; data/siridb-server-2.0.40/src/siri/net/clserver.c:744:9: [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(err_msg, "At least one server is not online or busy"); data/siridb-server-2.0.40/src/siri/net/clserver.c:757:13: [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(err_msg, "Memory allocation error."); data/siridb-server-2.0.40/src/siri/net/clserver.c:833: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 err_msg[SIRI_MAX_SIZE_ERR_MSG]; data/siridb-server-2.0.40/src/siri/net/clserver.c:905: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 err_msg[SIRIDB_MAX_SIZE_ERR_MSG]; data/siridb-server-2.0.40/src/siri/net/pkg.c:49: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(pkg->data, data, len); data/siridb-server-2.0.40/src/siri/net/pkg.c:239: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(dup, pkg, size); data/siridb-server-2.0.40/src/siri/net/protocol.c:7:1: [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 protocol_str[512]; data/siridb-server-2.0.40/src/siri/net/protocol.c:29:9: [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(protocol_str, "CPROTO_CLIENT_TYPE_UNKNOWN (%d)", n); data/siridb-server-2.0.40/src/siri/net/protocol.c:61:9: [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(protocol_str, "CPROTO_SERVER_TYPE_UNKNOWN (%d)", n); data/siridb-server-2.0.40/src/siri/net/protocol.c:93:9: [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(protocol_str, "BPROTO_CLIENT_TYPE_UNKNOWN (%d)", n); data/siridb-server-2.0.40/src/siri/net/protocol.c:133:9: [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(protocol_str, "BPROTO_SERVER_TYPE_UNKNOWN (%d)", n); data/siridb-server-2.0.40/src/siri/net/tcp.c:47:13: [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 addr[INET_ADDRSTRLEN]; data/siridb-server-2.0.40/src/siri/net/tcp.c:63:13: [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 addr[INET6_ADDRSTRLEN]; data/siridb-server-2.0.40/src/siri/net/tcp.c:96: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 hostname[SIRI_CFG_MAX_LEN_ADDRESS]; data/siridb-server-2.0.40/src/siri/net/tcp.c:103:9: [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(hostname, "localhost"); data/siridb-server-2.0.40/src/siri/net/tcp.c:152:17: [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_port = atoi(strport); data/siridb-server-2.0.40/src/siri/optimize.c:145:36: [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). (optimize.idx_fp = fopen(optimize.idx_fn, "a")) == NULL) data/siridb-server-2.0.40/src/siri/optimize.c:188:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(optimize.idx_fn + strlen(fn) - 3, "idx", 3); data/siridb-server-2.0.40/src/siri/optimize.c:191:23: [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). optimize.idx_fp = fopen(optimize.idx_fn, "w"); data/siridb-server-2.0.40/src/siri/service/account.c:39: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 fn[strlen(siri->cfg->default_db_path) + strlen(FILENAME) + 1]; data/siridb-server-2.0.40/src/siri/service/account.c:159: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 encrypted[OWCRYPT_SZ]; data/siridb-server-2.0.40/src/siri/service/account.c:160: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 salt[OWCRYPT_SALT_SZ]; data/siridb-server-2.0.40/src/siri/service/account.c:193: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 pw[OWCRYPT_SZ]; data/siridb-server-2.0.40/src/siri/service/account.c:248: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 encrypted[OWCRYPT_SZ]; data/siridb-server-2.0.40/src/siri/service/account.c:249: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 salt[OWCRYPT_SALT_SZ]; data/siridb-server-2.0.40/src/siri/service/account.c:313: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 pw[OWCRYPT_SZ]; data/siridb-server-2.0.40/src/siri/service/account.c:389: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 fn[strlen(siri->cfg->default_db_path) + strlen(FILENAME) + 1]; data/siridb-server-2.0.40/src/siri/service/client.c:104:9: [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(err_msg, "manage socket already in use"); data/siridb-server-2.0.40/src/siri/service/client.c:111:9: [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(err_msg, "memory allocation error"); data/siridb-server-2.0.40/src/siri/service/client.c:121:9: [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(err_msg, "memory allocation error"); data/siridb-server-2.0.40/src/siri/service/client.c:139: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(&adm_client->uuid, uuid, 16); data/siridb-server-2.0.40/src/siri/service/client.c:153:9: [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(err_msg, "memory allocation error"); data/siridb-server-2.0.40/src/siri/service/client.c:166:13: [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(err_msg, "memory allocation error"); data/siridb-server-2.0.40/src/siri/service/client.c:190:13: [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(err_msg, "memory allocation error"); data/siridb-server-2.0.40/src/siri/service/client.c:257:9: [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(err_msg, "memory allocation error"); data/siridb-server-2.0.40/src/siri/service/client.c:264: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 port[6]= {'\0'}; data/siridb-server-2.0.40/src/siri/service/client.c:265:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(port, "%u", adm_client->port); data/siridb-server-2.0.40/src/siri/service/client.c:336: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 err_msg[SIRI_MAX_SIZE_ERR_MSG]; data/siridb-server-2.0.40/src/siri/service/client.c:639: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 fn[strlen(adm_client->dbpath) + 13]; data/siridb-server-2.0.40/src/siri/service/client.c:762: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 fn[strlen(adm_client->dbpath) + 12]; data/siridb-server-2.0.40/src/siri/service/client.c:765:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fn, "w"); data/siridb-server-2.0.40/src/siri/service/client.c:845: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 fn[strlen(adm_client->dbpath) + 11]; data/siridb-server-2.0.40/src/siri/service/client.c:848:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fn, "w"); data/siridb-server-2.0.40/src/siri/service/client.c:887: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 fn[strlen(adm_client->dbpath) + 10]; data/siridb-server-2.0.40/src/siri/service/client.c:890:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fn, "w"); data/siridb-server-2.0.40/src/siri/service/client.c:1085: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 version[MAX_VERSION_LEN]; data/siridb-server-2.0.40/src/siri/service/client.c:1137: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. memcpy(version, qp_version.via.raw, qp_version.len); data/siridb-server-2.0.40/src/siri/service/request.c:81: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 dbpath[dbpath_len]; \ data/siridb-server-2.0.40/src/siri/service/request.c:108: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 dbfn[dbpath_len + max_filename_sz]; \ data/siridb-server-2.0.40/src/siri/service/request.c:111:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(dbfn, "w"); \ data/siridb-server-2.0.40/src/siri/service/request.c:429:9: [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(err_msg, data/siridb-server-2.0.40/src/siri/service/request.c:501:9: [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(err_msg, "cannot find database '%.*s'", data/siridb-server-2.0.40/src/siri/service/request.c:508:9: [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(err_msg, data/siridb-server-2.0.40/src/siri/service/request.c:521:9: [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(err_msg, "memory allocation error"); data/siridb-server-2.0.40/src/siri/service/request.c:568:9: [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(err_msg, data/siridb-server-2.0.40/src/siri/service/request.c:685:9: [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(err_msg, data/siridb-server-2.0.40/src/siri/service/request.c:745:9: [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(err_msg, "error loading database"); data/siridb-server-2.0.40/src/siri/service/request.c:789:9: [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(err_msg, data/siridb-server-2.0.40/src/siri/service/request.c:870:9: [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(err_msg, data/siridb-server-2.0.40/src/siri/service/request.c:885: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(dbfn, "w"); data/siridb-server-2.0.40/src/siri/service/request.c:940:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(err_msg, "memory allocation error"); data/siridb-server-2.0.40/src/siri/service/request.c:967:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(err_msg, "memory allocation error"); data/siridb-server-2.0.40/src/siri/service/request.c:994:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(err_msg, "memory allocation error"); data/siridb-server-2.0.40/src/siri/service/request.c:1001: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 dbfn[dbpath_len + max_filename_sz]; data/siridb-server-2.0.40/src/siri/siri.c:100: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 lname[255]; data/siridb-server-2.0.40/src/siri/siri.c:131: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 tmppath[XPATH_MAX]; data/siridb-server-2.0.40/src/siri/siri.c:142:13: [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(siri.cfg->default_db_path, "/var/lib/siridb/"); data/siridb-server-2.0.40/src/siri/siri.c:172: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(siri.cfg->default_db_path, tmppath, sizeof(tmppath)); data/siridb-server-2.0.40/src/vec/vec.c:58: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(vec, source, size); data/siridb-server-2.0.40/src/xpath/xpath.c:20:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fn, "r"); data/siridb-server-2.0.40/src/xpath/xpath.c:51:17: [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(fn, "r"); data/siridb-server-2.0.40/src/xstr/xstr.c:51: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[n]; data/siridb-server-2.0.40/src/xstr/xstr.c:64: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 + size, s, l); data/siridb-server-2.0.40/src/xstr/xstr.c:67: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 + size, r, rlen); data/siridb-server-2.0.40/src/xstr/xstr.c:74: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(str, buffer, size); data/siridb-server-2.0.40/src/xstr/xstr.c:348: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(nstr, src, *n + 1); data/siridb-server-2.0.40/test/test_access/test_access.c:9: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[SIRIDB_ACCESS_STR_MAX]; data/siridb-server-2.0.40/test/test_aggr/test_aggr.c:10:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char err_msg[SIRIDB_MAX_SIZE_ERR_MSG]; data/siridb-server-2.0.40/include/siri/db/misc.h:11:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char __fn[strlen(__path) + strlen(__filename) + 1]; \ data/siridb-server-2.0.40/include/siri/db/misc.h:11:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char __fn[strlen(__path) + strlen(__filename) + 1]; \ data/siridb-server-2.0.40/include/siri/db/shard.h:180:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t Len__ = strlen(Fn__); \ data/siridb-server-2.0.40/src/argparse/argparse.c:203: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). if (!strlen(current->argument->str_value)) data/siridb-server-2.0.40/src/argparse/argparse.c:232:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). line_size = ident = strlen(buffer); data/siridb-server-2.0.40/src/argparse/argparse.c:292: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). line_size += strlen(buffer); data/siridb-server-2.0.40/src/argparse/argparse.c:296:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). line_size = ident + strlen(buffer); data/siridb-server-2.0.40/src/argparse/argparse.c:378: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). line_size = strlen(buffer); data/siridb-server-2.0.40/src/argparse/argparse.c:405: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 (strncmp(argument, buffer, strlen(argument)) == 0) data/siridb-server-2.0.40/src/argparse/argparse.c:413:39: [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 (strncmp(argument, buffer, strlen(argument)) == 0) data/siridb-server-2.0.40/src/argparse/argparse.c:460: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). if (strlen(argv[*argn]) >= ARGPARSE_MAX_LEN_ARG) data/siridb-server-2.0.40/src/argparse/argparse.c:492:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len_rest = strlen(choices); data/siridb-server-2.0.40/src/argparse/argparse.c:493:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len_choice = strlen(choice); data/siridb-server-2.0.40/src/cfgparser/cfgparser.c:62:30: [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 (*pt == '[' && pt[strlen(pt) - 1] == ']') data/siridb-server-2.0.40/src/ctree/ctree.c:119:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *nd = CT_node_new(key, strlen(key), data); data/siridb-server-2.0.40/src/ctree/ctree.c:535:39: [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). nd = CT_node_new(key, strlen(key), data); data/siridb-server-2.0.40/src/ctree/ctree.c:577:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ct_node_t * nd = CT_node_new(key, strlen(key), data); data/siridb-server-2.0.40/src/ctree/ctree.c:602:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *nd = CT_node_new(key, strlen(key), data); data/siridb-server-2.0.40/src/iso8601/iso8601.c:517:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(tzname); data/siridb-server-2.0.40/src/iso8601/iso8601.c:525: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). if (len == strlen("naive") && strncmp(buf, "naive", len) == 0) data/siridb-server-2.0.40/src/iso8601/iso8601.c:533: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). if (strlen(tz_common[i]) != len + TZ_NAME_OFFSET) data/siridb-server-2.0.40/src/procinfo/procinfo.c:108:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(path); data/siridb-server-2.0.40/src/procinfo/procinfo.c:165:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(path); data/siridb-server-2.0.40/src/procinfo/procinfo.c:212: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). long int i = strlen(line); data/siridb-server-2.0.40/src/qpack/qpack.c:415:54: [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 qp_add_raw(packer, (unsigned char *) str, strlen(str)); data/siridb-server-2.0.40/src/qpack/qpack.c:419:55: [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 qp_add_raw(packer, (unsigned char *) str, strlen(str) + 1); data/siridb-server-2.0.40/src/qpack/qpack.c:619:56: [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 qp_fadd_raw(fpacker, (unsigned char *) str, strlen(str)); data/siridb-server-2.0.40/src/siri/api.c:28: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). (__n == strlen(__w) && strncasecmp(__s, __w, __n) == 0) data/siridb-server-2.0.40/src/siri/api.c:31: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). (__n == strlen(__w) && strncmp(__s, __w, __n) == 0) data/siridb-server-2.0.40/src/siri/api.c:206:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (api__starts_with(&at, &n, "/query/", strlen("/query/"))) data/siridb-server-2.0.40/src/siri/api.c:211:52: [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). else if (api__starts_with(&at, &n, "/insert/", strlen("/insert/"))) data/siridb-server-2.0.40/src/siri/api.c:348:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (api__istarts_with(&at, &n, "bearer ", strlen("bearer "))) data/siridb-server-2.0.40/src/siri/api.c:353:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (api__istarts_with(&at, &n, "basic ", strlen("basic "))) data/siridb-server-2.0.40/src/siri/api.c:429: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). body_size = strlen(body); data/siridb-server-2.0.40/src/siri/api.c:582: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). strlen(err_msg), data/siridb-server-2.0.40/src/siri/api.c:771: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). strlen(err_msg), data/siridb-server-2.0.40/src/siri/api.c:871:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). __n = strlen("{\"error_msg\":\""__s"\"}"); \ data/siridb-server-2.0.40/src/siri/cfg/cfg.c:429: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). len = strlen(option->val->string); data/siridb-server-2.0.40/src/siri/cfg/cfg.c:476: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). if (strlen(option->val->string) >= XPATH_MAX) data/siridb-server-2.0.40/src/siri/cfg/cfg.c:485:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(siri_cfg.default_db_path, option->val->string, XPATH_MAX); data/siridb-server-2.0.40/src/siri/db/aggregate.c:911: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). strlen(val), data/siridb-server-2.0.40/src/siri/db/buffer.c:92: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 lstr = strlen(str); data/siridb-server-2.0.40/src/siri/db/buffer.c:93: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). size_t lf = strlen(SIRIDB_BUFFER_FN); // size of "buffer.dat" data/siridb-server-2.0.40/src/siri/db/buffer.c:94: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 lspf = strlen("/" SIRIDB_BUFFER_FN); // size of "/buffer.dat" data/siridb-server-2.0.40/src/siri/db/db.c:116:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(dbpath); data/siridb-server-2.0.40/src/siri/db/db.c:571: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). if (n == strlen(siridb->dbname) && data/siridb-server-2.0.40/src/siri/db/db.c:595:31: [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 (qp_dbname->len == strlen(siridb->dbname) && data/siridb-server-2.0.40/src/siri/db/group.c:81: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). if (strlen(name) < SIRIDB_MIN_GROUP_LEN) data/siridb-server-2.0.40/src/siri/db/group.c:88: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). if (strlen(name) > SIRIDB_MAX_GROUP_LEN) data/siridb-server-2.0.40/src/siri/db/groups.c:541: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). strlen(group->name) + 1); data/siridb-server-2.0.40/src/siri/db/groups.c:578:13: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); /* 10ms */ data/siridb-server-2.0.40/src/siri/db/groups.c:641:21: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); /* 10ms */ data/siridb-server-2.0.40/src/siri/db/groups.c:652:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); /* 10ms */ data/siridb-server-2.0.40/src/siri/db/groups.c:710:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); /* 10ms */ data/siridb-server-2.0.40/src/siri/db/listener.c:3961:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(q_select->merge_as)), data/siridb-server-2.0.40/src/siri/db/listener.c:4836:39: [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). p_pipe_name ? strlen(p_pipe_name) : 0, data/siridb-server-2.0.40/src/siri/db/listener.c:5547: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). strlen(q_select->merge_as)); data/siridb-server-2.0.40/src/siri/db/listener.c:5705: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). strlen(q_select->merge_as)); data/siridb-server-2.0.40/src/siri/db/median.c:82:21: [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. equal[(*equal_size)++] = v; data/siridb-server-2.0.40/src/siri/db/median.c:136:21: [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. equal[(*equal_size)++] = v; data/siridb-server-2.0.40/src/siri/db/median.c:211:21: [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. equal[(*equal_size)++] = v; data/siridb-server-2.0.40/src/siri/db/median.c:287:21: [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. equal[(*equal_size)++] = v; data/siridb-server-2.0.40/src/siri/db/median.c:364:13: [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. equal[(*equal_size)++] = v; data/siridb-server-2.0.40/src/siri/db/median.c:441:13: [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. equal[(*equal_size)++] = v; data/siridb-server-2.0.40/src/siri/db/median.c:513:13: [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. equal[(*equal_size)++] = v; data/siridb-server-2.0.40/src/siri/db/median.c:572:13: [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. equal[(*equal_size)++] = v; data/siridb-server-2.0.40/src/siri/db/points.c:352:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000); data/siridb-server-2.0.40/src/siri/db/points.c:371:21: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100); data/siridb-server-2.0.40/src/siri/db/points.c:676: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). *psz = strlen(points->data[i].val.str) + 1; data/siridb-server-2.0.40/src/siri/db/points.c:1394:13: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(3000); data/siridb-server-2.0.40/src/siri/db/points.c:1440:13: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(3000); data/siridb-server-2.0.40/src/siri/db/points.c:1477:17: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(3000); data/siridb-server-2.0.40/src/siri/db/points.c:1484:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(5000); data/siridb-server-2.0.40/src/siri/db/points.c:1538:13: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100); data/siridb-server-2.0.40/src/siri/db/points.c:1557:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sz = strlen(str) + 1; data/siridb-server-2.0.40/src/siri/db/query.c:239: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). strlen(query->err_msg), data/siridb-server-2.0.40/src/siri/db/series.c:1347:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). series->name_len = strlen(series->name); data/siridb-server-2.0.40/src/siri/db/server.c:1225:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += strlen(server->address); data/siridb-server-2.0.40/src/siri/db/servers.c:66: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). strlen(siri.cfg->server_address), data/siridb-server-2.0.40/src/siri/db/shard.c:250: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). n = strlen(fn); data/siridb-server-2.0.40/src/siri/db/shard.c:254: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). n = strlen(new_fn); data/siridb-server-2.0.40/src/siri/db/shard.c:1466:13: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep( 50000 * siridb->tasks.active + 100 ); data/siridb-server-2.0.40/src/siri/db/shards.c:38:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t n = strlen(fn); data/siridb-server-2.0.40/src/siri/db/shards.c:62:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t n = strlen(fn); data/siridb-server-2.0.40/src/siri/db/shards.c:98:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t n = strlen(fn); data/siridb-server-2.0.40/src/siri/db/shards.c:133: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). if (strlen(path) >= XPATH_MAX - SIRIDB_SHARD_LEN - 1) data/siridb-server-2.0.40/src/siri/db/tag.c:57: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). if (strlen(name) < SIRIDB_MIN_TAG_LEN) data/siridb-server-2.0.40/src/siri/db/tag.c:64: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). if (strlen(name) > SIRIDB_MAX_TAG_LEN) data/siridb-server-2.0.40/src/siri/db/tags.c:171:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); // 10ms data/siridb-server-2.0.40/src/siri/db/tags.c:357:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); // 10ms data/siridb-server-2.0.40/src/siri/db/user.c:82: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). if (strlen(password) < SIRIDB_MIN_PASSWORD_LEN) data/siridb-server-2.0.40/src/siri/db/user.c:93: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). if (strlen(password) > SIRIDB_MAX_PASSWORD_LEN) data/siridb-server-2.0.40/src/siri/db/user.c:146: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). if (strlen(name) < SIRIDB_MIN_USER_LEN) data/siridb-server-2.0.40/src/siri/db/user.c:153: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). if (strlen(name) > SIRIDB_MAX_USER_LEN) data/siridb-server-2.0.40/src/siri/evars.c:65: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). if (!str || strlen(str) >= n) data/siridb-server-2.0.40/src/siri/evars.c:68:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(s, str, n); data/siridb-server-2.0.40/src/siri/health.c:283: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). uv_buf_init(OK_RESPONSE, strlen(OK_RESPONSE)); data/siridb-server-2.0.40/src/siri/health.c:285:39: [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). uv_buf_init(NOK_RESPONSE, strlen(NOK_RESPONSE)); data/siridb-server-2.0.40/src/siri/health.c:287:42: [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). uv_buf_init(NFOUND_RESPONSE, strlen(NFOUND_RESPONSE)); data/siridb-server-2.0.40/src/siri/health.c:289:39: [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). uv_buf_init(MNA_RESPONSE, strlen(MNA_RESPONSE)); data/siridb-server-2.0.40/src/siri/health.c:291:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). uv_buf_init(SYNC_RESPONSE, strlen(SYNC_RESPONSE)); data/siridb-server-2.0.40/src/siri/health.c:293: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). uv_buf_init(REIDX_RESPONSE, strlen(REIDX_RESPONSE)); data/siridb-server-2.0.40/src/siri/health.c:295: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). uv_buf_init(BMODE_RESPONSE, strlen(BMODE_RESPONSE)); data/siridb-server-2.0.40/src/siri/net/clserver.c:530: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). strlen(err_msg), data/siridb-server-2.0.40/src/siri/net/clserver.c:595:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(err_msg), data/siridb-server-2.0.40/src/siri/net/clserver.c:654: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). strlen(err_msg), data/siridb-server-2.0.40/src/siri/net/clserver.c:665: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). strlen(err_msg), data/siridb-server-2.0.40/src/siri/net/clserver.c:715: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). strlen(err_msg), data/siridb-server-2.0.40/src/siri/net/clserver.c:727: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). strlen(err_msg), data/siridb-server-2.0.40/src/siri/net/clserver.c:738: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). strlen(err_msg), data/siridb-server-2.0.40/src/siri/net/clserver.c:747: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). strlen(err_msg), data/siridb-server-2.0.40/src/siri/net/clserver.c:760: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). strlen(err_msg), data/siridb-server-2.0.40/src/siri/net/clserver.c:859:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(err_msg), data/siridb-server-2.0.40/src/siri/net/clserver.c:940:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(err_msg), data/siridb-server-2.0.40/src/siri/net/tcp.c:135:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ( !strlen(address) || data/siridb-server-2.0.40/src/siri/net/tcp.c:136: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). strlen(address) >= SIRI_CFG_MAX_LEN_ADDRESS || data/siridb-server-2.0.40/src/siri/optimize.c:177:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert (optimize.idx_fn == NULL && strlen(fn) > 3); data/siridb-server-2.0.40/src/siri/optimize.c:188:30: [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). memcpy(optimize.idx_fn + strlen(fn) - 3, "idx", 3); data/siridb-server-2.0.40/src/siri/service/account.c:39: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). char fn[strlen(siri->cfg->default_db_path) + strlen(FILENAME) + 1]; data/siridb-server-2.0.40/src/siri/service/account.c:39:50: [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 fn[strlen(siri->cfg->default_db_path) + strlen(FILENAME) + 1]; data/siridb-server-2.0.40/src/siri/service/account.c:389: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). char fn[strlen(siri->cfg->default_db_path) + strlen(FILENAME) + 1]; data/siridb-server-2.0.40/src/siri/service/account.c:389:50: [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 fn[strlen(siri->cfg->default_db_path) + strlen(FILENAME) + 1]; data/siridb-server-2.0.40/src/siri/service/account.c:469:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(account->account); data/siridb-server-2.0.40/src/siri/service/client.c:345: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). strlen(err_msg), data/siridb-server-2.0.40/src/siri/service/client.c:639: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). char fn[strlen(adm_client->dbpath) + 13]; data/siridb-server-2.0.40/src/siri/service/client.c:762: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). char fn[strlen(adm_client->dbpath) + 12]; data/siridb-server-2.0.40/src/siri/service/client.c:845: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). char fn[strlen(adm_client->dbpath) + 11]; data/siridb-server-2.0.40/src/siri/service/client.c:887: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). char fn[strlen(adm_client->dbpath) + 10]; data/siridb-server-2.0.40/src/siri/service/request.c:80: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). dbpath_len = strlen(siri.cfg->default_db_path) + qp_dbname.len + 2; \ data/siridb-server-2.0.40/src/siri/service/request.c:187: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). strlen(DB_CONF_FN), data/siridb-server-2.0.40/src/siri/service/request.c:188: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). strlen(DB_DAT_FN), data/siridb-server-2.0.40/src/siri/service/request.c:189: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). strlen(REINDEX_FN)); data/siridb-server-2.0.40/src/siri/service/request.c:1000:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t dbpath_len = strlen(dbpath); data/siridb-server-2.0.40/src/siri/service/request.c:1077: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). strlen(siridb->dbname) == dbname->len && data/siridb-server-2.0.40/src/siri/siri.c:101:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(siri.args->log_level); data/siridb-server-2.0.40/src/siri/siri.c:115: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). if (strlen(lname) == len && strcmp(siri.args->log_level, lname) == 0) data/siridb-server-2.0.40/src/siri/siri.c:148: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). homedir[strlen(homedir)-1] == '/' ? "" : "/"); data/siridb-server-2.0.40/src/siri/siri.c:175: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). len = strlen(siri.cfg->default_db_path); data/siridb-server-2.0.40/src/xpath/xpath.c:115:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t bufsz = 0, path_len = strlen(path); data/siridb-server-2.0.40/src/xpath/xpath.c:128: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). len = path_len + strlen(p->d_name) + 2; data/siridb-server-2.0.40/src/xstr/xstr.c:53:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t l, size = 0, olen = strlen(o), rlen = strlen(r); data/siridb-server-2.0.40/src/xstr/xstr.c:53:50: [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 l, size = 0, olen = strlen(o), rlen = strlen(r); data/siridb-server-2.0.40/src/xstr/xstr.c:137: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). end = *str + strlen(*str) - 1; data/siridb-server-2.0.40/src/xstr/xstr.c:344:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *n = strlen(src); data/siridb-server-2.0.40/test/test.h:27:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int padlen = 60 - strlen(test_name); data/siridb-server-2.0.40/test/test_ctree/test_ctree.c:74: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). strlen(entries[i])) == entries[i]); data/siridb-server-2.0.40/test/test_siridb/test_siridb.c:33: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). qp_obj.len = strlen(qp_obj.via.str); data/siridb-server-2.0.40/test/test_siridb/test_siridb.c:40: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). qp_obj.len = strlen(qp_obj.via.str); data/siridb-server-2.0.40/test/test_siridb/test_siridb.c:64: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). qp_obj.len = strlen(qp_obj.via.str); data/siridb-server-2.0.40/test/test_siridb/test_siridb.c:71: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). qp_obj.len = strlen(qp_obj.via.str); data/siridb-server-2.0.40/test/test_siridb/test_siridb.c:83: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). qp_obj.len = strlen(qp_obj.via.str); data/siridb-server-2.0.40/test/test_siridb/test_siridb.c:86: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). _assert (strlen("55.3 percent") == qp_obj.len); data/siridb-server-2.0.40/test/test_siridb/test_siridb.c:91: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). qp_obj.len = strlen(qp_obj.via.str); data/siridb-server-2.0.40/test/test_siridb/test_siridb.c:94: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). _assert (strlen("") == qp_obj.len); data/siridb-server-2.0.40/test/test_siridb/test_siridb.c:101: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). _assert (strlen("-1.100000") == qp_obj.len); data/siridb-server-2.0.40/test/test_siridb/test_siridb.c:108: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). _assert (strlen("-1") == qp_obj.len); ANALYSIS SUMMARY: Hits = 646 Lines analyzed = 59450 in approximately 1.24 seconds (48042 lines/second) Physical Source Lines of Code (SLOC) = 46747 Hits@level = [0] 177 [1] 156 [2] 401 [3] 13 [4] 75 [5] 1 Hits@level+ = [0+] 823 [1+] 646 [2+] 490 [3+] 89 [4+] 76 [5+] 1 Hits/KSLOC@level+ = [0+] 17.6054 [1+] 13.8191 [2+] 10.482 [3+] 1.90387 [4+] 1.62577 [5+] 0.0213917 Symlinks skipped = 2 (--allowlink overrides but see doc for security issue) 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.