The following issues were found
src/nodes/chunk_dispatch_plan.c
1 issues
Line: 97
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
Path *subpath = list_nth(mtpath->subpaths, subpath_index);
RangeTblEntry *rte = planner_rt_fetch(hypertable_rti, root);
memcpy(&path->cpath.path, subpath, sizeof(Path));
path->cpath.path.type = T_CustomPath;
path->cpath.path.pathtype = T_CustomScan;
path->cpath.methods = &chunk_dispatch_path_methods;
path->cpath.custom_paths = list_make1(subpath);
path->mtpath = mtpath;
Reported by FlawFinder.
src/net/conn_ssl.c
1 issues
Line: 171
Column: 9
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
{
SSLConnection *sslconn = (SSLConnection *) conn;
const char *reason;
static char errbuf[32];
int err = conn->err;
unsigned long ecode = sslconn->errcode;
/* Clear errors */
conn->err = 0;
Reported by FlawFinder.
src/net/conn_plain.c
1 issues
Line: 44
Column: 2
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
int
ts_plain_connect(Connection *conn, const char *host, const char *servname, int port)
{
char strport[6];
struct addrinfo *ainfo, hints = {
.ai_family = AF_UNSPEC,
.ai_socktype = SOCK_STREAM,
};
int ret;
Reported by FlawFinder.
src/net/conn_internal.h
1 issues
Line: 18
Column: 12
CWE codes:
120
20
int (*connect)(Connection *conn, const char *host, const char *servname, int port);
void (*close)(Connection *conn);
ssize_t (*write)(Connection *conn, const char *buf, size_t writelen);
ssize_t (*read)(Connection *conn, char *buf, size_t readlen);
int (*set_timeout)(Connection *conn, unsigned long millis);
const char *(*errmsg)(Connection *conn);
} ConnOps;
extern int ts_connection_register(ConnectionType type, ConnOps *ops);
Reported by FlawFinder.
src/net/conn.c
1 issues
Line: 85
Column: 20
CWE codes:
120
20
ssize_t
ts_connection_read(Connection *conn, char *buf, size_t buflen)
{
return conn->ops->read(conn, buf, buflen);
}
void
ts_connection_close(Connection *conn)
{
Reported by FlawFinder.
tsl/test/sql/dist_views.sql
1 issues
Line: 8
Column: 1
---------------------------------------------------
-- Test views and size_utils functions on distributed hypertable
---------------------------------------------------
\c :TEST_DBNAME :ROLE_CLUSTER_SUPERUSER
SET client_min_messages TO ERROR;
DROP DATABASE IF EXISTS view_node_1;
DROP DATABASE IF EXISTS view_node_2;
DROP DATABASE IF EXISTS view_node_3;
Reported by SQLint.
tsl/test/sql/include/compression_alter.sql
1 issues
Line: 122
Column: 72
--the correct column name
SELECT format('%I.%I', cht.schema_name, cht.table_name) AS "COMPRESSION_TBLNM"
FROM _timescaledb_catalog.hypertable ht, _timescaledb_catalog.hypertable cht
WHERE ht.table_name = 'test1' and cht.id = ht.compressed_hypertable_id \gset
SELECT count(*)
FROM ( SELECT attrelid::regclass, attname FROM pg_attribute
WHERE attrelid in (SELECT inhrelid::regclass from pg_inherits
where inhparent = :'COMPRESSION_TBLNM'::regclass )
Reported by SQLint.
tsl/test/src/remote/dist_commands.c
1 issues
Line: 31
Column: 8
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
List *subset_nodes;
DistCmdResult *results;
PreparedDistCmd *prepped_cmd;
const char *test_args[3] = { "1976-09-18 00:00:00-07", "47", "103.4" };
ListCell *lc;
if (data_nodes == NIL)
elog(ERROR, "no data nodes specified");
Reported by FlawFinder.
src/hypertable_compression.c
1 issues
Line: 32
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
fd->hypertable_id =
DatumGetInt32(values[AttrNumberGetAttrOffset(Anum_hypertable_compression_hypertable_id)]);
memcpy(&fd->attname,
DatumGetName(values[AttrNumberGetAttrOffset(Anum_hypertable_compression_attname)]),
NAMEDATALEN);
fd->algo_id =
DatumGetInt16(values[AttrNumberGetAttrOffset(Anum_hypertable_compression_algo_id)]);
Reported by FlawFinder.
scripts/out_of_order_random_direct.sql
1 issues
Line: 8
Column: 1
DROP DATABASE IF EXISTS test;
CREATE DATABASE test;
\c test
\timing
DROP EXTENSION IF EXISTS timescaledb CASCADE;
CREATE EXTENSION timescaledb;
Reported by SQLint.