635 p2 = malloc(i);CID 645706: Error handling issues (NEGATIVE_RETURNS)
"i" is passed to a parameter that cannot be negative.
637 memcpy(p2, cterm->fontbuf, i);CID 645705: Memory - corruptions (OVERRUN)
Calling "memcpy" with "p2" and "i" is suspicious because of the very large index, 18446744073709551615. The index may be due to a negative parameter being interpreted as unsigned.
2139 strcat(tmp, cterm->bg_tc_str);CID 645704: (STRING_OVERFLOW)
You might overrun the 3072-character fixed-size string "tmp" by copying "cterm->bg_tc_str" without checking the length.
2135 strcat(tmp, cterm->fg_tc_str);CID 645704: (STRING_OVERFLOW)
You might overrun the 3072-character fixed-size string "tmp" by copying "cterm->fg_tc_str" without checking the length.
2092 s->ring_frames = nframes;CID 645741: Data race undermines locking (LOCK_EVASION)
Thread1 sets "ring_frames" to a new value. Now the two threads have an inconsistent view of "ring_frames" and updates to fields correlated with "ring_frames" may be lost.
2082 if (nframes > s->ring_frames) {CID 645740: Null pointer dereferences (NULL_RETURNS)
Dereferencing "s", which is known to be "NULL".
1862 if (r && r->auto_close && r->done) {CID 645739: Concurrent data access violations (MISSING_LOCK) >>> Accessing "r->done" without holding lock "xp_audio_stream.mutex". Elsewhere, "xp_audio_stream.done" is written to with "xp_audio_stream.mutex" held 4 out of 4 times (1 of these accesses strongly imply that it is necessary).
1125 xp_audio_append(cterm->music_stream, buf, total_frames);CID 645738: Uninitialized variables (UNINIT)
Using uninitialized value "*buf" when calling "xp_audio_append".
2082 if (nframes > s->ring_frames) {CID 645737: Concurrent data access violations (MISSING_LOCK) >>> Accessing "s->ring_frames" without holding lock "xp_audio_stream.mutex". Elsewhere, "xp_audio_stream.ring_frames" is written to with "xp_audio_stream.mutex" held 1 out of 1 times.
1862 if (r && r->auto_close && r->done) {CID 645736: Concurrent data access violations (MISSING_LOCK) >>> Accessing "r->auto_close" without holding lock "xp_audio_stream.mutex". Elsewhere, "xp_audio_stream.auto_close" is written to with "xp_audio_stream.mutex" held 1 out of 1 times (1 of these accesses strongly imply that it is necessary).
1228 return true;CID 645757: Control flow issues (DEADCODE)
Execution cannot reach this statement: "return true;".
424 str1 = getcstring(state);CID 645808: (TAINTED_SCALAR)
Passing tainted expression "state->priv" to "getcstring", which uses it as an allocation size.
424 str1 = getcstring(state);CID 645808: (TAINTED_SCALAR)
Passing tainted expression "state->priv" to "getcstring", which uses it as an offset.
727 if (!sftps_send_error(state, SSH_FX_OP_UNSUPPORTED,CID 645807: (TAINTED_SCALAR)
Passing tainted expression "state->priv" to "sftps_send_error", which uses it as an allocation size.
706 sftp_str_t request = getcstring(state);CID 645807: (TAINTED_SCALAR)
Passing tainted expression "state->priv" to "getcstring", which uses it as an allocation size.
727 if (!sftps_send_error(state, SSH_FX_OP_UNSUPPORTED,CID 645807: (TAINTED_SCALAR)
Passing tainted expression "state->priv" to "sftps_send_error", which uses it as an offset.
706 sftp_str_t request = getcstring(state);CID 645807: (TAINTED_SCALAR)
Passing tainted expression "state->priv" to "getcstring", which uses it as an offset.
361 str = getcstring(state);CID 645806: (TAINTED_SCALAR)
Passing tainted expression "state->priv" to "getcstring", which uses it as an offset.
361 str = getcstring(state);CID 645806: (TAINTED_SCALAR)
Passing tainted expression "state->priv" to "getcstring", which uses it as an allocation size.
261 sftp_str_t ret = sftp_memdup(&pkt->data[pkt->cur], sz);CID 645805: Insecure data handling (TAINTED_SCALAR)
Passing tainted expression "sz" to "sftp_memdup", which uses it as an allocation size.
142 fname = getcstring(state);CID 645804: (TAINTED_SCALAR)
Passing tainted expression "state->priv" to "getcstring", which uses it as an allocation size.
142 fname = getcstring(state);CID 645804: (TAINTED_SCALAR)
Passing tainted expression "state->priv" to "getcstring", which uses it as an offset.
211 sftp_rx_pkt_t out = (sftp_rx_pkt_t)malloc(alloc_sz);CID 645803: (TAINTED_SCALAR)
Passing tainted expression "alloc_sz" to "malloc", which uses it as an allocation size.
217 memcpy(&out->len, &stream->len, out->used);CID 645803: (TAINTED_SCALAR)
Passing tainted expression "out->used" to "memcpy", which uses it as an offset.
85 if (memchr(str->c_str, 0, str->len) != NULL) {CID 645802: Insecure data handling (TAINTED_SCALAR)
Passing tainted expression "str->len" to "memchr", which uses it as an offset.
103 while (state->priv->rxp->cur + sizeof(uint32_t) <= payload_len) {CID 645801: Insecure data handling (TAINTED_SCALAR)
Using tainted variable "payload_len" as a loop boundary.
2184 char *cpath = (char *)malloc(path->len + 1);CID 645800: (TAINTED_SCALAR)
Passing tainted expression "path->len + 1U" to "malloc", which uses it as an allocation size.
2190 memcpy(cpath, path->c_str, path->len);CID 645800: (TAINTED_SCALAR)
Passing tainted expression "path->len" to "memcpy", which uses it as an offset.
315 str = getcstring(state);CID 645799: (TAINTED_SCALAR)
Passing tainted expression "state->priv" to "getcstring", which uses it as an allocation size.
315 str = getcstring(state);CID 645799: (TAINTED_SCALAR)
Passing tainted expression "state->priv" to "getcstring", which uses it as an offset.
69 state->priv->running--;CID 645798: Concurrent data access violations (MISSING_LOCK) >>> Accessing "state->priv->running" without holding lock "sftp_server_state_private.mtx". Elsewhere, "sftp_server_state_private.running" is written to with "sftp_server_state_private.mtx" held 1 out of 2 times (1 of these accesses strongly imply that it is necessary).
190 sftp_str_t lang = getstring(reply);CID 645797: Insecure data handling (TAINTED_SCALAR)
Passing tainted expression "reply->cur" to "getstring", which uses it as an offset.
102 uint32_t payload_len = pkt_sz(state->priv->rxp) - 1;CID 645796: Integer handling issues (INTEGER_OVERFLOW)
Expression "pkt_sz(state->priv->rxp) - 1U", where "pkt_sz(state->priv->rxp)" is known to be equal to 0, underflows the type of "pkt_sz(state->priv->rxp) - 1U", which is type "unsigned int".
87 state->running--;CID 645795: Concurrent data access violations (MISSING_LOCK) >>> Accessing "state->running" without holding lock "sftp_client_state.mtx". Elsewhere, "sftp_client_state.running" is written to with "sftp_client_state.mtx" held 1 out of 2 times (1 of these accesses strongly imply that it is necessary).
338 sftp_str_t data = getstring(pkt);CID 645794: (TAINTED_SCALAR)
Passing tainted expression "pkt->cur" to "getstring", which uses it as an offset.
335 sftp_str_t type = getstring(pkt);CID 645794: (TAINTED_SCALAR)
Passing tainted expression "pkt->cur" to "getstring", which uses it as an offset.
343 if (!sftp_fattr_add_ext(&ret, type, data)) { 344 free_sftp_str(type);CID 645794: (TAINTED_SCALAR)
Passing tainted expression "type->len" to "sftp_fattr_add_ext", which uses it as an allocation size.
343 if (!sftp_fattr_add_ext(&ret, type, data)) { 344 free_sftp_str(type);CID 645794: (TAINTED_SCALAR)
Passing tainted expression "data->len" to "sftp_fattr_add_ext", which uses it as an allocation size.
417 SAFECOPY(to, p); /* To user on first line */CID 645832: Memory - illegal accesses (STRING_NULL)
Passing unterminated string "p" to "strlcpy", which expects a null-terminated string. [Note: The source code implementation of the function has been overridden by a builtin model.]
512 while (*cp && *cp <= ' ') cp++;CID 645831: (TAINTED_SCALAR)
Using tainted variable "*cp" as a loop boundary.
544 while (*cp && *cp <= ' ') cp++;CID 645831: (TAINTED_SCALAR)
Using tainted variable "*cp" as a loop boundary.
339 strListPush(&kludges, qwkbuf + k);CID 645830: (STRING_NULL)
Passing unterminated string "qwkbuf + k" to "strListAppend", which expects a null-terminated string.
340 k += strlen(qwkbuf + k);CID 645830: (STRING_NULL)
Passing unterminated string "qwkbuf + k" to "strlen", which expects a null-terminated string.
333 if ((p = strchr(qwkbuf + k, '\r')) == NULLCID 645830: (STRING_NULL)
Passing unterminated string "qwkbuf + k" to "strchr", which expects a null-terminated string. [Note: The source code implementation of the function has been overridden by a builtin model.]
440 memcpy(s, ext_data->c_str, ext_data->len);CID 645868: (TAINTED_SCALAR)
Passing tainted expression "ext_data->len" to "memcpy", which uses it as an offset.
438 char *s = malloc((size_t)ext_data->len + 1); 439 if (s != NULL) {CID 645868: (TAINTED_SCALAR)
Passing tainted expression "(size_t)ext_data->len + 1UL" to "malloc", which uses it as an allocation size.
421 sftp_str_t ext_data = getstring(reply);CID 645868: (TAINTED_SCALAR)
Passing tainted expression "reply->cur" to "getstring", which uses it as an offset.
419 while (reply->cur + sizeof(uint32_t) <= payload_len) {CID 645868: (TAINTED_SCALAR)
Using tainted variable "payload_len" as a loop boundary.
123 sftp_str_t lang = getstring(reply);CID 645867: Insecure data handling (TAINTED_SCALAR)
Passing tainted expression "reply->cur" to "getstring", which uses it as an offset.
1144 p->entries = calloc(n, sizeof(*p->entries));CID 645866: (TAINTED_SCALAR)
Passing tainted expression "n" to "calloc", which uses it as an allocation size.
1153 p->entries[i].attrs = getfattr(reply);CID 645866: (TAINTED_SCALAR)
Passing tainted expression "reply->cur" to "getfattr", which uses it as an offset.
447 (void)fseeko(stream, saved_pos, SEEK_SET);"saved_pos" is passed to a parameter that cannot be negative.
141 memset(ctx->buffer + buf_off, 0, SHA256_BLOCK_SIZE - buf_off);CID 645972: Memory - illegal accesses (OVERRUN)
Overrunning array of 64 bytes at byte offset 64 by dereferencing pointer "ctx->buffer + buf_off".
1360 *data_sock = accept(pasv_sock, &addr->addr, &addr_len); 1361 #ifdef SOCKET_DEBUG_ACCEPTCID 645971: Memory - corruptions (OVERRUN)
Overrunning struct type sockaddr of 16 bytes by passing it to a function which accesses it at byte offset 127 using argument "addr_len" (which evaluates to 128).
4476 for (uint i = 0; i < login_attempts; ++i) {CID 645970: Program hangs (NEGATIVE_RETURNS)
Using unsigned variable "login_attempts" in a loop exit condition.
414 if (l < 0) {CID 645990: Control flow issues (NO_EFFECT)
This less-than-zero comparison of an unsigned value is never true. "l < 0U".
561 (void)read(m_wakeup_pipe[0], buf, sizeof(buf)); 562 }CID 646018: Error handling issues (CHECKED_RETURN)
"read(int, void *, size_t)" returns the number of bytes read, but it is ignored.
175 setsockopt(m_listen_sock, IPPROTO_IPV6, IPV6_V6ONLY, (const char *)&off, sizeof(off));CID 646017: (CHECKED_RETURN)
Calling "setsockopt(this->m_listen_sock, IPPROTO_IPV6, 26, (char const *)&off, 4U)" without checking return value. This library function may fail and return an error code.
181 setsockopt(m_listen_sock, SOL_SOCKET, SO_REUSEADDR, (const char *)&opt, sizeof(opt));CID 646017: (CHECKED_RETURN)
Calling "setsockopt(this->m_listen_sock, 1, 2, (char const *)&opt, 4U)" without checking return value. This library function may fail and return an error code.
166 setsockopt(m_listen_sock, SOL_SOCKET, SO_REUSEADDR, (const char *)&opt, sizeof(opt));CID 646017: (CHECKED_RETURN)
Calling "setsockopt(this->m_listen_sock, 1, 2, (char const *)&opt, 4U)" without checking return value. This library function may fail and return an error code.
347 if (msg) deliver_to_local(client, msg);CID 646016: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "msg" is passed-by-value as parameter to "std::shared_ptr<mqtt5::Message>::shared_ptr(std::shared_ptr<mqtt5::Message> const &) /*explicit =default*/", when it could be moved instead.
636 setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char *)&nodelay, sizeof(nodelay));CID 646015: Error handling issues (CHECKED_RETURN)
Calling "setsockopt(sock, IPPROTO_TCP, 1, (char *)&nodelay, 4U)" without checking return value. This library function may fail and return an error code.
174 out.assign(reinterpret_cast<const char *>(m_data + m_pos), len);CID 646029: Insecure data handling (TAINTED_SCALAR)
Passing tainted expression "len" to "assign", which uses it as an offset. [Note: The source code implementation of the function has been overridden by a builtin model.]
365 auto key = sub.client_id;CID 646028: Performance inefficiencies (AUTO_CAUSES_COPY)
Using the "auto" keyword without an "&" causes the copy of an object of type "std::string".
303 route_publish("$SYS", msg);CID 646027: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "msg" is passed-by-value as parameter to "std::shared_ptr<mqtt5::Message>::shared_ptr(std::shared_ptr<mqtt5::Message> const &) /*explicit =default*/", when it could be moved instead.
101 m_psk_table[alias] = pass;CID 646026: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "pass" is copied in call to copy assignment for class "std::string", when it could be moved instead.
971 deliver_to_network(session, msg, opts); 972 });CID 646025: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "msg" is passed-by-value as parameter to "std::shared_ptr<mqtt5::Message>::shared_ptr(std::shared_ptr<mqtt5::Message> const &) /*explicit =default*/", when it could be moved instead.
224 m_topics.set_retained("$SYS/broker/version", msg);CID 646024: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "msg" is passed-by-value as parameter to "std::shared_ptr<mqtt5::Message>::shared_ptr(std::shared_ptr<mqtt5::Message> const &) /*explicit =default*/", when it could be moved instead.
204 fcntl(m_wakeup_pipe[0], F_SETFL, O_NONBLOCK);CID 646023: (CHECKED_RETURN)
Calling "fcntl(this->m_wakeup_pipe[0], 4, 2048)" without checking return value. This library function may fail and return an error code.
205 fcntl(m_wakeup_pipe[1], F_SETFL, O_NONBLOCK);CID 646023: (CHECKED_RETURN)
Calling "fcntl(this->m_wakeup_pipe[1], 4, 2048)" without checking return value. This library function may fail and return an error code.
715 session.tls_psk_id = psk_id;CID 646022: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "psk_id" is copied in call to copy assignment for class "std::string", when it could be moved instead.
57 return s_instance;CID 646021: Concurrent data access violations (MISSING_LOCK) >>> Accessing "mqtt5::Broker::s_instance" without holding lock "mqtt5::Broker::s_instance_mutex". Elsewhere, "mqtt5::Broker::s_instance" is written to with "mqtt5::Broker::s_instance_mutex" held 2 out of 2 times (1 of these accesses strongly imply that it is necessary).
915 route_publish(session.client_id, msg);CID 646020: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "msg" is passed-by-value as parameter to "std::shared_ptr<mqtt5::Message>::shared_ptr(std::shared_ptr<mqtt5::Message> const &) /*explicit =default*/", when it could be moved instead.
413 q.msg = msg;CID 646019: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "msg" is copied in call to copy assignment for class "std::shared_ptr<mqtt5::Message>", when it could be moved instead.
292 route_publish("$SYS", msg);CID 646038: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "msg" is passed-by-value as parameter to "std::shared_ptr<mqtt5::Message>::shared_ptr(std::shared_ptr<mqtt5::Message> const &) /*explicit =default*/", when it could be moved instead.
323 cryptSetAttributeString(m_tls_sess, CRYPT_SESSINFO_SERVER_NAME, host, strlen(host));CID 646037: Error handling issues (CHECKED_RETURN)
Calling "cryptSetAttributeString" without checking return value (as is done elsewhere 18 out of 21 times).
162 m_queue.push_back(rm);CID 646036: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "rm" is copied and then passed-by-reference as parameter to STL insertion function "std::deque<mqtt5::ReceivedMessage, std::allocator<mqtt5::ReceivedMessage> >::push_back(std::deque<mqtt5::ReceivedMessage, std::allocator<mqtt5::ReceivedMessage> >::value_type const &)", when it could be moved instead.
264 setsockopt(m_sock, IPPROTO_TCP, TCP_NODELAY, (char *)&nodelay, sizeof(nodelay));CID 646035: Error handling issues (CHECKED_RETURN)
Calling "setsockopt(this->m_sock, IPPROTO_TCP, 1, (char *)&nodelay, 4U)" without checking return value. This library function may fail and return an error code.
1095 snprintf(client_id, sizeof(client_id), "sbbs-%s-%s-%s",CID 646043: Null pointer dereferences (FORWARD_NULL)
Dereferencing null pointer "startup".
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,116 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 290:36:40 |
| Calls: | 14,323 |
| Calls today: | 1 |
| Files: | 186,347 |
| D/L today: |
9,622 files (2,847M bytes) |
| Messages: | 2,528,951 |