• New Defects reported by Coverity Scan for Synchronet

    From scan-admin@coverity.com@1:103/705 to All on Wed Jan 28 13:46:25 2026

    ----==_mimepart_697a13306f491_cf6782d0dbe50d9a0894b
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit

    Hi,

    Please find the latest report on new defect(s) introduced to Synchronet found with Coverity Scan.

    3 new defect(s) introduced to Synchronet found with Coverity Scan.


    New defect(s) Reported-by: Coverity Scan
    Showing 3 of 3 defect(s)


    ** CID 642982: (FORWARD_NULL)
    /prntfile.cpp: 263 in sbbs_t::printfile(const char *, int, int, JSObject *)()
    /prntfile.cpp: 228 in sbbs_t::printfile(const char *, int, int, JSObject *)()


    _____________________________________________________________________________________________
    *** CID 642982: (FORWARD_NULL)
    /prntfile.cpp: 263 in sbbs_t::printfile(const char *, int, int, JSObject *)()
    257 default:
    258 case TERM_KEY_DOWN:
    259 nextline = line + 1; 260 break;
    261 }
    262 if (nextline != line + 1 && nextline < lines)
    CID 642982: (FORWARD_NULL)
    Dereferencing null pointer "offset".
    263 fseeko(stream, offset[nextline], 0);
    264 line = nextline;
    265 }
    266 else
    267 ++line;
    268 }
    /prntfile.cpp: 228 in sbbs_t::printfile(const char *, int, int, JSObject *)()
    222 else
    223 nextline = line - (((term->rows - 1) * 2) - 1);
    224 break;
    225 case TERM_KEY_END:
    226 {
    227 bputs(text[SeekingFile]);
    CID 642982: (FORWARD_NULL)
    Dereferencing null pointer "offset".
    228 fseeko(stream, offset[lines - 1], SEEK_SET);
    229 if (fgets(buf, length + 1, stream) == NULL)
    230 break;
    231 off_t lastline = lines - 1;
    232 while (!feof(stream) && !msgabort()) {
    233 o = ftello(stream);

    ** CID 642981: Error handling issues (CHECKED_RETURN)
    /prntfile.cpp: 228 in sbbs_t::printfile(const char *, int, int, JSObject *)()


    _____________________________________________________________________________________________
    *** CID 642981: Error handling issues (CHECKED_RETURN)
    /prntfile.cpp: 228 in sbbs_t::printfile(const char *, int, int, JSObject *)()
    222 else
    223 nextline = line - (((term->rows - 1) * 2) - 1);
    224 break;
    225 case TERM_KEY_END:
    226 {
    227 bputs(text[SeekingFile]);
    CID 642981: Error handling issues (CHECKED_RETURN)
    Calling "fseeko(stream, offset[lines - 1UL], 0)" without checking return value. This library function may fail and return an error code.
    228 fseeko(stream, offset[lines - 1], SEEK_SET);
    229 if (fgets(buf, length + 1, stream) == NULL)
    230 break;
    231 off_t lastline = lines - 1;
    232 while (!feof(stream) && !msgabort()) {
    233 o = ftello(stream);

    ** CID 642980: Integer handling issues (INTEGER_OVERFLOW)
    /prntfile.cpp: 228 in sbbs_t::printfile(const char *, int, int, JSObject *)()


    _____________________________________________________________________________________________
    *** CID 642980: Integer handling issues (INTEGER_OVERFLOW) /prntfile.cpp: 228 in sbbs_t::printfile(const char *, int, int, JSObject *)()
    222 else
    223 nextline = line - (((term->rows - 1) * 2) - 1);
    224 break;
    225 case TERM_KEY_END:
    226 {
    227 bputs(text[SeekingFile]);
    CID 642980: Integer handling issues (INTEGER_OVERFLOW)
    Expression "lines - 1UL", where "lines" is known to be equal to 0, underflows the type of "lines - 1UL", which is type "unsigned long".
    228 fseeko(stream, offset[lines - 1], SEEK_SET);
    229 if (fgets(buf, length + 1, stream) == NULL)
    230 break;
    231 off_t lastline = lines - 1;
    232 while (!feof(stream) && !msgabort()) {
    233 o = ftello(stream);


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/synchronet?tab=overview


    ----==_mimepart_697a13306f491_cf6782d0dbe50d9a0894b
    Content-Type: text/html; charset=us-ascii
    Content-Transfer-Encoding: 7bit

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>New Defects Reported - Synchronet</title>
    <style>
    body { font-family: Arial, sans-serif; color: #222; line-height: 1.6; }
    .button {
    display: inline-block;
    padding: 10px 20px;
    margin: 20px 0;
    font-size: 16px;
    color: #fff !important;
    background-color: #0056b3;
    text-decoration: none;
    border-radius: 5px;
    }
    pre {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    overflow-x: auto;
    }
    </style>
    </head>
    <body>
    <p>Hi,</p>

    <p>
    Please find the latest report on new defect(s) introduced to <strong>Synchronet</strong>
    found with Coverity Scan.
    </p>

    <ul>
    <li><strong>New Defects Found:</strong> 3</li>
    <li><strong>Defects Shown:</strong> Showing 3 of 3 defect(s)</li>
    </ul>

    <h3>Defect Details</h3>
    <pre>
    ** CID 642982: (FORWARD_NULL)
    /prntfile.cpp: 263 in sbbs_t::printfile(const char *, int, int, JSObject *)()
    /prntfile.cpp: 228 in sbbs_t::printfile(const char *, int, int, JSObject *)()


    _____________________________________________________________________________________________
    *** CID 642982: (FORWARD_NULL)
    /prntfile.cpp: 263 in sbbs_t::printfile(const char *, int, int, JSObject *)()
    257 default:
    258 case TERM_KEY_DOWN:
    259 nextline = line + 1; 260 break;
    261 }
    262 if (nextline != line + 1 &amp;&amp; nextline &lt; lines)
    &gt;&gt;&gt; CID 642982: (FORWARD_NULL)
    &gt;&gt;&gt; Dereferencing null pointer &quot;offset&quot;.
    263 fseeko(stream, offset[nextline], 0);
    264 line = nextline;
    265 }
    266 else
    267 ++line;
    268 }
    /prntfile.cpp: 228 in sbbs_t::printfile(const char *, int, int, JSObject *)()
    222 else
    223 nextline = line - (((term-&gt;rows - 1) * 2) - 1);
    224 break;
    225 case TERM_KEY_END:
    226 {
    227 bputs(text[SeekingFile]);
    &gt;&gt;&gt; CID 642982: (FORWARD_NULL)
    &gt;&gt;&gt; Dereferencing null pointer &quot;offset&quot;.
    228 fseeko(stream, offset[lines - 1], SEEK_SET);
    229 if (fgets(buf, length + 1, stream) == NULL)
    230 break;
    231 off_t lastline = lines - 1;
    232 while (!feof(stream) &amp;&amp; !msgabort()) {
    233 o = ftello(stream);

    ** CID 642981: Error handling issues (CHECKED_RETURN)
    /prntfile.cpp: 228 in sbbs_t::printfile(const char *, int, int, JSObject *)()


    _____________________________________________________________________________________________
    *** CID 642981: Error handling issues (CHECKED_RETURN)
    /prntfile.cpp: 228 in sbbs_t::printfile(const char *, int, int, JSObject *)()
    222 else
    223 nextline = line - (((term-&gt;rows - 1) * 2) - 1);
    224 break;
    225 case TERM_KEY_END:
    226 {
    227 bputs(text[SeekingFile]);
    &gt;&gt;&gt; CID 642981: Error handling issues (CHECKED_RETURN) &gt;&gt;&gt; Calling &quot;fseeko(stream, offset[lines - 1UL], 0)&quot; without checking return value. This library function may fail and return an error code.
    228 fseeko(stream, offset[lines - 1], SEEK_SET);
    229 if (fgets(buf, length + 1, stream) == NULL)
    230 break;
    231 off_t lastline = lines - 1;
    232 while (!feof(stream) &amp;&amp; !msgabort()) {
    233 o = ftello(stream);

    ** CID 642980: Integer handling issues (INTEGER_OVERFLOW)
    /prntfile.cpp: 228 in sbbs_t::printfile(const char *, int, int, JSObject *)()


    _____________________________________________________________________________________________
    *** CID 642980: Integer handling issues (INTEGER_OVERFLOW) /prntfile.cpp: 228 in sbbs_t::printfile(const char *, int, int, JSObject *)()
    222 else
    223 nextline = line - (((term-&gt;rows - 1) * 2) - 1);
    224 break;
    225 case TERM_KEY_END:
    226 {
    227 bputs(text[SeekingFile]);
    &gt;&gt;&gt; CID 642980: Integer handling issues (INTEGER_OVERFLOW)
    &gt;&gt;&gt; Expression &quot;lines - 1UL&quot;, where &quot;lines&quot; is known to be equal to 0, underflows the type of &quot;lines - 1UL&quot;, which is type &quot;unsigned long&quot;.
    228 fseeko(stream, offset[lines - 1], SEEK_SET);
    229 if (fgets(buf, length + 1, stream) == NULL)
    230 break;
    231 off_t lastline = lines - 1;
    232 while (!feof(stream) &amp;&amp; !msgabort()) {
    233 o = ftello(stream);

    </pre>

    <p>
    <a href="https://scan.coverity.com/projects/synchronet?tab=overview" class="button">View Defects in Coverity Scan</a>
    </p>

    <p>Best regards,</p>
    <p>The Coverity Scan Admin Team</p>
    <img class="logo" width="140" src="https://scan.coverity.com/assets/BlackDuckLogo-6697adc63e07340464201a2ad534d3d3e44f95d36edda20b140440d34f05372f.svg" />
    </body>
    </html>
    ----==_mimepart_697a13306f491_cf6782d0dbe50d9a0894b--

    --- SBBSecho 3.35-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From scan-admin@coverity.com@1:103/705 to All on Thu Jan 29 13:46:20 2026

    ----==_mimepart_697b64ac475f5_def0e2bd3c9d4b9a8620dd
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit

    Hi,

    Please find the latest report on new defect(s) introduced to Synchronet found with Coverity Scan.

    2 new defect(s) introduced to Synchronet found with Coverity Scan.
    5 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.

    New defect(s) Reported-by: Coverity Scan
    Showing 2 of 2 defect(s)


    ** CID 642992: API usage errors (PRINTF_ARGS)


    _____________________________________________________________________________________________
    *** CID 642992: API usage errors (PRINTF_ARGS)
    /ftpsrvr.c: 5024 in ctrl_thread()
    5018 transfer_aborted = TRUE;
    5019 }
    5020 }
    5021 if (count && (count % 60) == 0)
    5022 lprintf(LOG_WARNING, "%04d Still waiting (%us) for transfer to complete "
    5023 "(aborted=%d, lastactive=%" PRId64 "s, max_inactivity=%us) ..."
    CID 642992: API usage errors (PRINTF_ARGS)
    Argument "count" to format specifier "%u" was expected to have type "unsigned int" but has type "unsigned long".
    5024 , sock, count, transfer_aborted, (uint64_t)(time(NULL)-lastactive)
    5025 , startup->max_inactivity);
    5026 count++;
    5027 mswait(1000);
    5028 }
    5029 lprintf(LOG_DEBUG, "%04d Done waiting for transfer to complete", sock);

    ** CID 642991: API usage errors (PW.PRINTF_ARG_MISMATCH)
    /ftpsrvr.c: 5024 in ()


    _____________________________________________________________________________________________
    *** CID 642991: API usage errors (PW.PRINTF_ARG_MISMATCH)
    /ftpsrvr.c: 5024 in ()
    5018 transfer_aborted = TRUE;
    5019 }
    5020 }
    5021 if (count && (count % 60) == 0)
    5022 lprintf(LOG_WARNING, "%04d Still waiting (%us) for transfer to complete "
    5023 "(aborted=%d, lastactive=%" PRId64 "s, max_inactivity=%us) ..."
    CID 642991: API usage errors (PW.PRINTF_ARG_MISMATCH)
    argument is incompatible with corresponding format string conversion (expected type "unsigned int" but argument has type "unsigned long")
    5024 , sock, count, transfer_aborted, (uint64_t)(time(NULL)-lastactive)
    5025 , startup->max_inactivity);
    5026 count++;
    5027 mswait(1000);
    5028 }
    5029 lprintf(LOG_DEBUG, "%04d Done waiting for transfer to complete", sock);


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/synchronet?tab=overview


    ----==_mimepart_697b64ac475f5_def0e2bd3c9d4b9a8620dd
    Content-Type: text/html; charset=us-ascii
    Content-Transfer-Encoding: 7bit

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>New Defects Reported - Synchronet</title>
    <style>
    body { font-family: Arial, sans-serif; color: #222; line-height: 1.6; }
    .button {
    display: inline-block;
    padding: 10px 20px;
    margin: 20px 0;
    font-size: 16px;
    color: #fff !important;
    background-color: #0056b3;
    text-decoration: none;
    border-radius: 5px;
    }
    pre {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    overflow-x: auto;
    }
    </style>
    </head>
    <body>
    <p>Hi,</p>

    <p>
    Please find the latest report on new defect(s) introduced to <strong>Synchronet</strong>
    found with Coverity Scan.
    </p>

    <ul>
    <li><strong>New Defects Found:</strong> 2</li>
    <li>
    5 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
    </li>
    <li><strong>Defects Shown:</strong> Showing 2 of 2 defect(s)</li>
    </ul>

    <h3>Defect Details</h3>
    <pre>
    ** CID 642992: API usage errors (PRINTF_ARGS)


    _____________________________________________________________________________________________
    *** CID 642992: API usage errors (PRINTF_ARGS)
    /ftpsrvr.c: 5024 in ctrl_thread()
    5018 transfer_aborted = TRUE;
    5019 }
    5020 }
    5021 if (count &amp;&amp; (count % 60) == 0)
    5022 lprintf(LOG_WARNING, &quot;%04d Still waiting (%us) for transfer to complete &quot;
    5023 &quot;(aborted=%d, lastactive=%&quot; PRId64 &quot;s, max_inactivity=%us) ...&quot;
    &gt;&gt;&gt; CID 642992: API usage errors (PRINTF_ARGS) &gt;&gt;&gt; Argument &quot;count&quot; to format specifier &quot;%u&quot; was expected to have type &quot;unsigned int&quot; but has type &quot;unsigned long&quot;.
    5024 , sock, count, transfer_aborted, (uint64_t)(time(NULL)-lastactive)
    5025 , startup-&gt;max_inactivity);
    5026 count++;
    5027 mswait(1000);
    5028 }
    5029 lprintf(LOG_DEBUG, &quot;%04d Done waiting for transfer to complete&quot;, sock);

    ** CID 642991: API usage errors (PW.PRINTF_ARG_MISMATCH)
    /ftpsrvr.c: 5024 in ()


    _____________________________________________________________________________________________
    *** CID 642991: API usage errors (PW.PRINTF_ARG_MISMATCH)
    /ftpsrvr.c: 5024 in ()
    5018 transfer_aborted = TRUE;
    5019 }
    5020 }
    5021 if (count &amp;&amp; (count % 60) == 0)
    5022 lprintf(LOG_WARNING, &quot;%04d Still waiting (%us) for transfer to complete &quot;
    5023 &quot;(aborted=%d, lastactive=%&quot; PRId64 &quot;s, max_inactivity=%us) ...&quot;
    &gt;&gt;&gt; CID 642991: API usage errors (PW.PRINTF_ARG_MISMATCH) &gt;&gt;&gt; argument is incompatible with corresponding format string conversion (expected type &quot;unsigned int&quot; but argument has type &quot;unsigned long&quot;)
    5024 , sock, count, transfer_aborted, (uint64_t)(time(NULL)-lastactive)
    5025 , startup-&gt;max_inactivity);
    5026 count++;
    5027 mswait(1000);
    5028 }
    5029 lprintf(LOG_DEBUG, &quot;%04d Done waiting for transfer to complete&quot;, sock);

    </pre>

    <p>
    <a href="https://scan.coverity.com/projects/synchronet?tab=overview" class="button">View Defects in Coverity Scan</a>
    </p>

    <p>Best regards,</p>
    <p>The Coverity Scan Admin Team</p>
    <img class="logo" width="140" src="https://scan.coverity.com/assets/BlackDuckLogo-6697adc63e07340464201a2ad534d3d3e44f95d36edda20b140440d34f05372f.svg" />
    </body>
    </html>
    ----==_mimepart_697b64ac475f5_def0e2bd3c9d4b9a8620dd--

    --- SBBSecho 3.35-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From scan-admin@coverity.com@1:103/705 to All on Fri Feb 13 13:54:18 2026

    ----==_mimepart_698f2d096fc4c_11e62b0ff68619ac1976e
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit

    Hi,

    Please find the latest report on new defect(s) introduced to Synchronet found with Coverity Scan.

    18 new defect(s) introduced to Synchronet found with Coverity Scan.
    12 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.

    New defect(s) Reported-by: Coverity Scan
    Showing 18 of 18 defect(s)


    ** CID 643146: Program hangs (SLEEP)


    _____________________________________________________________________________________________
    *** CID 643146: Program hangs (SLEEP)
    /filterfile.hpp: 56 in filterFile::listed(const char *, const char *, trash *)()
    50 const std::lock_guard<std::mutex> lock(mutex); 51 if ((now - lastftime_check) >= fchk_interval) { 52 lastftime_check = now;
    53 time_t latest = fdate(fname);
    54 if (latest > timestamp) {
    55 strListFree(&list);
    CID 643146: Program hangs (SLEEP)
    Call to "findstr_list" might sleep while holding lock "lock._M_device". 56 list = findstr_list(fname);
    57 timestamp = latest;
    58 ++fread_count;
    59 }
    60 }
    61 result = trash_in_list(str1, str2, list, details);

    ** CID 643145: Security best practices violations (DC.WEAK_CRYPTO) /ftpsrvr.cpp: 1844 in ftp_tmpfname(char *, const char *, int)()


    _____________________________________________________________________________________________
    *** CID 643145: Security best practices violations (DC.WEAK_CRYPTO) /ftpsrvr.cpp: 1844 in ftp_tmpfname(char *, const char *, int)() 1838 return FALSE;
    1839 }
    1840
    1841 static char* ftp_tmpfname(char* fname, const char* ext, SOCKET sock) 1842 {
    1843 safe_snprintf(fname, MAX_PATH, "%sSBBS_FTP.%x%x%x%lx.%s"
    CID 643145: Security best practices violations (DC.WEAK_CRYPTO)
    "rand" should not be used for security-related applications, because linear congruential algorithms are too easy to break.
    1844 , scfg.temp_dir, getpid(), sock, rand(), (ulong)clock(), ext);
    1845 return fname;
    1846 }
    1847
    1848 #if defined(__GNUC__) // Catch printf-format errors
    1849 static BOOL send_mlsx(FILE *fp, SOCKET sock, CRYPT_SESSION sess, const char *format, ...) __attribute__ ((format (printf, 4, 5)));

    ** CID 643144: Memory - corruptions (OVERRUN)
    /ftpsrvr.cpp: 1359 in filexfer(xp_sockaddr *, int, int, int, int, int *, int *, char *, long, volatile int *, volatile int *, int, int, long *, user_t *, client_t *, int, int, int, int, char *, int)()


    _____________________________________________________________________________________________
    *** CID 643144: Memory - corruptions (OVERRUN)
    /ftpsrvr.cpp: 1359 in filexfer(xp_sockaddr *, int, int, int, int, int *, int *, char *, long, volatile int *, volatile int *, int, int, long *, user_t *, client_t *, int, int, int, int, char *, int)()
    1353 }
    1354
    1355 addr_len = sizeof(*addr);
    1356 #ifdef SOCKET_DEBUG_ACCEPT
    1357 socket_debug[ctrl_sock] |= SOCKET_DEBUG_ACCEPT;
    1358 #endif
    CID 643144: 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).
    1359 *data_sock = accept(pasv_sock, &addr->addr, &addr_len); 1360 #ifdef SOCKET_DEBUG_ACCEPT
    1361 socket_debug[ctrl_sock] &= ~SOCKET_DEBUG_ACCEPT;
    1362 #endif
    1363 if (*data_sock == INVALID_SOCKET) {
    1364 lprintf(LOG_WARNING, "%04d <%s> PASV !DATA ERROR %d accepting connection on socket %d"

    ** CID 643143: Error handling issues (CHECKED_RETURN)
    /ftpsrvr.cpp: 450 in sock_recvbyte(int, int, char *, long *)()


    _____________________________________________________________________________________________
    *** CID 643143: Error handling issues (CHECKED_RETURN)
    /ftpsrvr.cpp: 450 in sock_recvbyte(int, int, char *, long *)()
    444 /* Try a read with no timeout first. */
    445 if ((ret = cryptSetAttribute(sess, CRYPT_OPTION_NET_READTIMEOUT, 0)) != CRYPT_OK)
    446 GCES(ret, sock, sess, estr, "setting read timeout");
    447 while (1) {
    448 ret = cryptPopData(sess, buf, 1, &len);
    449 /* Successive reads will be with the full timeout after a socket_readable() */
    CID 643143: Error handling issues (CHECKED_RETURN)
    Calling "cryptSetAttribute" without checking return value (as is done elsewhere 55 out of 68 times).
    450 cryptSetAttribute(sess, CRYPT_OPTION_NET_READTIMEOUT, startup->max_inactivity);
    451 switch (ret) {
    452 case CRYPT_OK:
    453 break;
    454 case CRYPT_ERROR_TIMEOUT:
    455 if (!first) {

    ** CID 643142: (CHECKED_RETURN)
    /ftpsrvr.cpp: 663 in send_thread(void *)()
    /ftpsrvr.cpp: 700 in send_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 643142: (CHECKED_RETURN)
    /ftpsrvr.cpp: 663 in send_thread(void *)()
    657 if (xfer.filepos < 0)
    658 xfer.filepos = 0;
    659 if (startup->options & FTP_OPT_DEBUG_DATA || xfer.filepos)
    660 lprintf(LOG_DEBUG, "%04d <%s> DATA socket %d sending %s from offset %" PRIdOFF
    661 , xfer.ctrl_sock, xfer.user->alias, *xfer.data_sock, xfer.filename, xfer.filepos);
    662
    CID 643142: (CHECKED_RETURN)
    Calling "fseeko(fp, xfer.filepos, 0)" without checking return value. This library function may fail and return an error code.
    663 fseeko(fp, xfer.filepos, SEEK_SET);
    664 last_report = start = time(NULL);
    665 while ((xfer.filepos + total) < length) {
    666
    667 now = time(NULL);
    668
    /ftpsrvr.cpp: 700 in send_thread(void *)()
    694 }
    695
    696 /* Check socket for writability */
    697 if (!socket_writable(*xfer.data_sock, 1000))
    698 continue;
    699
    CID 643142: (CHECKED_RETURN)
    Calling "fseeko(fp, xfer.filepos + total, 0)" without checking return value. This library function may fail and return an error code.
    700 fseeko(fp, xfer.filepos + total, SEEK_SET);
    701 rd = fread(buf, sizeof(char), sizeof(buf), fp);
    702 if (rd < 1) /* EOF or READ error */
    703 break;
    704
    705 #ifdef SOCKET_DEBUG_SEND

    ** CID 643141: (Y2K38_SAFETY)
    /websrvr.cpp: 7719 in web_server()
    /websrvr.cpp: 7721 in web_server()


    _____________________________________________________________________________________________
    *** CID 643141: (Y2K38_SAFETY)
    /websrvr.cpp: 7719 in web_server()
    7713 std::string most_active = request_rate_limiter->most_active(&most_active_count);
    7714 char str[sizeof rate_limit_report]; 7715 char tmp[128];
    7716 snprintf(str, sizeof str, "Rate limiting current: clients=%zu, requests=%zu, most-active=%s (%zu), highest: %s (%u) on %s, limited: %u, last: %s on %s (repeat: %u)"
    7717 , request_rate_limiter->client_count(), request_rate_limiter->total(), most_active.c_str(), most_active_count
    7718 , request_rate_limiter->currHighwater.client.c_str(), request_rate_limiter->currHighwater.count
    CID 643141: (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "request_rate_limiter->currHighwater.time" is cast to "time32_t".
    7719 , timestr(&scfg, (time32_t)request_rate_limiter->currHighwater.time, logstr)
    7720 , request_rate_limiter->disallowed.load()
    7721 , request_rate_limiter->lastLimited.client.c_str(), timestr(&scfg, (time32_t)request_rate_limiter->lastLimited.time, tmp)
    7722 , request_rate_limiter->repeat.load());
    7723 if (strcmp(str, rate_limit_report) != 0) {
    7724 SAFECOPY(rate_limit_report, str);
    /websrvr.cpp: 7721 in web_server()
    7715 char tmp[128];
    7716 snprintf(str, sizeof str, "Rate limiting current: clients=%zu, requests=%zu, most-active=%s (%zu), highest: %s (%u) on %s, limited: %u, last: %s on %s (repeat: %u)"
    7717 , request_rate_limiter->client_count(), request_rate_limiter->total(), most_active.c_str(), most_active_count
    7718 , request_rate_limiter->currHighwater.client.c_str(), request_rate_limiter->currHighwater.count
    7719 , timestr(&scfg, (time32_t)request_rate_limiter->currHighwater.time, logstr)
    7720 , request_rate_limiter->disallowed.load()
    CID 643141: (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "request_rate_limiter->lastLimited.time" is cast to "time32_t".
    7721 , request_rate_limiter->lastLimited.client.c_str(), timestr(&scfg, (time32_t)request_rate_limiter->lastLimited.time, tmp)
    7722 , request_rate_limiter->repeat.load());
    7723 if (strcmp(str, rate_limit_report) != 0) {
    7724 SAFECOPY(rate_limit_report, str);
    7725 lprintf(LOG_DEBUG, "%s", rate_limit_report);
    7726 }

    ** CID 643140: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 3431 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 2847 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 2557 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3214 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3490 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3242 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3174 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3204 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 2885 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 2540 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3192 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3363 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3366 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3367 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3283 in ctrl_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 643140: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 3431 in ctrl_thread(void *)()
    3425
    3426 if (!strnicmp(cmd, "CWD ", 4) || !strnicmp(cmd, "XCWD ", 5)) {
    3427 if (!strnicmp(cmd, "CWD ", 4))
    3428 p = cmd + 4;
    3429 else
    3430 p = cmd + 5;
    CID 643140: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*p == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    3431 SKIP_WHITESPACE(p);
    3432 tp = p;
    3433 if (*tp == '/' || *tp == '\\') /* /local: and /bbs: are valid */
    3434 tp++;
    3435 if (!strnicmp(tp, BBS_FSYS_DIR, strlen(BBS_FSYS_DIR))) {
    3436 local_fsys = FALSE; /ftpsrvr.cpp: 2847 in ctrl_thread(void *)()
    2841 refresh_cfg(&scfg);
    2842 sockprintf(sock, sess, "211 ALL servers/nodes will recycle when not in-use");
    2843 continue;
    2844 }
    2845 if (!strnicmp(cmd, "SITE EXEC ", 10) && sysop) {
    2846 p = cmd + 10;
    CID 643140: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*p == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    2847 SKIP_WHITESPACE(p);
    2848 #ifdef __unix__
    2849 fp = popen(p, "r");
    2850 if (fp == NULL)
    2851 sockprintf(sock, sess, "500 Error %d opening pipe to: %s", errno, p);
    2852 else {
    /ftpsrvr.cpp: 2557 in ctrl_thread(void *)()
    2551 continue;
    2552 }
    2553 if (!strnicmp(cmd, "PASS ", 5) && user.alias[0]) {
    2554 user.number = 0;
    2555 fmutex_close(&mutex_file);
    2556 p = cmd + 5;
    CID 643140: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*p == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    2557 SKIP_WHITESPACE(p);
    2558
    2559 SAFECOPY(password, p);
    2560 uint usernum = find_login_id(&scfg, user.alias);
    2561 if (usernum == 0) {
    2562 if (scfg.sys_misc & SM_ECHO_PW) /ftpsrvr.cpp: 3214 in ctrl_thread(void *)()
    3208 sockprintf(sock, sess, "200 STREAM mode.");
    3209 continue;
    3210 }
    3211
    3212 if (!strnicmp(cmd, "STRU ", 5)) {
    3213 p = cmd + 5;
    CID 643140: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*p == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    3214 SKIP_WHITESPACE(p);
    3215 if (toupper(*p) != 'F')
    3216 sockprintf(sock, sess, "504 Only FILE structure supported.");
    3217 else
    3218 sockprintf(sock, sess, "200 FILE structure.");
    3219 continue;
    /ftpsrvr.cpp: 3490 in ctrl_thread(void *)()
    3484 , local_dir);
    3485 continue;
    3486 } /* Local PWD */
    3487
    3488 if (!strnicmp(cmd, "MKD ", 4) || !strnicmp(cmd, "XMKD", 4)) {
    3489 p = cmd + 4;
    CID 643140: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*p == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    3490 SKIP_WHITESPACE(p);
    3491 if (*p == '/') /* absolute */
    3492 SAFEPRINTF2(fname, "%s%s", root_dir(local_dir), p + 1);
    3493 else /* relative */
    3494 SAFEPRINTF2(fname, "%s%s", local_dir, p);
    3495
    /ftpsrvr.cpp: 3242 in ctrl_thread(void *)()
    3236 }
    3237 continue;
    3238 }
    3239
    3240 if (!strnicmp(cmd, "SMNT ", 5) && sysop && !(startup->options & FTP_OPT_NO_LOCAL_FSYS)) {
    3241 p = cmd + 5;
    CID 643140: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*p == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    3242 SKIP_WHITESPACE(p);
    3243 if (!stricmp(p, BBS_FSYS_DIR))
    3244 local_fsys = FALSE;
    3245 else {
    3246 if (!direxist(p)) {
    3247 sockprintf(sock, sess, "550 Directory does not exist.");
    /ftpsrvr.cpp: 3174 in ctrl_thread(void *)()
    3168 sockprintf(sock, sess, "200 All files sent in BINARY mode.");
    3169 continue;
    3170 }
    3171
    3172 if (!strnicmp(cmd, "ALLO", 4)) {
    3173 p = cmd + 5;
    CID 643140: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*p == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    3174 SKIP_WHITESPACE(p);
    3175 if (*p)
    3176 l = atol(p);
    3177 else
    3178 l = 0;
    3179 if (local_fsys)
    /ftpsrvr.cpp: 3204 in ctrl_thread(void *)()
    3198 , filepos);
    3199 continue;
    3200 }
    3201
    3202 if (!strnicmp(cmd, "MODE ", 5)) {
    3203 p = cmd + 5;
    CID 643140: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*p == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    3204 SKIP_WHITESPACE(p);
    3205 if (toupper(*p) != 'S')
    3206 sockprintf(sock, sess, "504 Only STREAM mode supported.");
    3207 else
    3208 sockprintf(sock, sess, "200 STREAM mode.");
    3209 continue;
    /ftpsrvr.cpp: 2885 in ctrl_thread(void *)()
    2879
    2880 if (pasv_sock != INVALID_SOCKET) {
    2881 ftp_close_socket(&pasv_sock, &pasv_sess, __LINE__);
    2882 }
    2883 memcpy(&data_addr, &ftp.client_addr, ftp.client_addr_len);
    2884 p = cmd + 5;
    CID 643140: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*p == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    2885 SKIP_WHITESPACE(p);
    2886 if (strnicmp(cmd, "PORT ", 5) == 0 && sscanf(p, "%u,%u,%u,%u,%hd,%hd", &h1, &h2, &h3, &h4, &p1, &p2) == 6) {
    2887 data_addr.in.sin_family = AF_INET;
    2888 data_addr.in.sin_addr.s_addr = htonl((h1 << 24) | (h2 << 16) | (h3 << 8) | h4);
    2889 data_port = (p1 << 8) | p2;
    2890 } else if (strnicmp(cmd, "EPRT ", 5) == 0) { /* EPRT */
    /ftpsrvr.cpp: 2540 in ctrl_thread(void *)()
    2534 }
    2535 if (!strnicmp(cmd, "USER ", 5)) {
    2536 sysop = FALSE;
    2537 user.number = 0;
    2538 fmutex_close(&mutex_file);
    2539 p = cmd + 5;
    CID 643140: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*p == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    2540 SKIP_WHITESPACE(p);
    2541 truncsp(p);
    2542 SAFECOPY(user.alias, p);
    2543 user.number = find_login_id(&scfg, user.alias); 2544 if (!user.number && (stricmp(user.alias, "anonymous") == 0 || stricmp(user.alias, "ftp") == 0))
    2545 user.number = matchuser(&scfg, "guest", FALSE);
    /ftpsrvr.cpp: 3192 in ctrl_thread(void *)()
    3186 sockprintf(sock, sess, "200 %" PRIu64 " bytes available.", avail);
    3187 continue;
    3188 }
    3189
    3190 if (!strnicmp(cmd, "REST", 4)) {
    3191 p = cmd + 4;
    CID 643140: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*p == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    3192 SKIP_WHITESPACE(p);
    3193 if (*p)
    3194 filepos = atol(p);
    3195 else
    3196 filepos = 0;
    3197 sockprintf(sock, sess, "350 Restarting at %ld. Send STORE or RETRIEVE to initiate transfer."
    /ftpsrvr.cpp: 3363 in ctrl_thread(void *)()
    3357 , sock, user.alias, errno, safe_strerror(errno, error, sizeof error), __LINE__, fname);
    3358 sockprintf(sock, sess, "451 Insufficient system storage");
    3359 continue;
    3360 }
    3361
    3362 p = cmd + 4;
    CID 643140: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*p == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    3363 SKIP_WHITESPACE(p);
    3364
    3365 if (*p == '-') { /* -Letc */
    3366 FIND_WHITESPACE(p);
    3367 SKIP_WHITESPACE(p);
    3368 }
    /ftpsrvr.cpp: 3366 in ctrl_thread(void *)()
    3360 }
    3361
    3362 p = cmd + 4;
    3363 SKIP_WHITESPACE(p);
    3364
    3365 if (*p == '-') { /* -Letc */
    CID 643140: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*p == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    3366 FIND_WHITESPACE(p);
    3367 SKIP_WHITESPACE(p);
    3368 }
    3369
    3370 filespec = p;
    3371 if (*filespec == 0)
    /ftpsrvr.cpp: 3367 in ctrl_thread(void *)()
    3361
    3362 p = cmd + 4;
    3363 SKIP_WHITESPACE(p);
    3364
    3365 if (*p == '-') { /* -Letc */
    3366 FIND_WHITESPACE(p);
    CID 643140: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*p == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    3367 SKIP_WHITESPACE(p);
    3368 }
    3369
    3370 filespec = p;
    3371 if (*filespec == 0)
    3372 filespec = "*";
    /ftpsrvr.cpp: 3283 in ctrl_thread(void *)()
    3277 sockprintf(sock, sess, "451 Insufficient system storage");
    3278 continue;
    3279 }
    3280 }
    3281
    3282 p = cmd + 4;
    CID 643140: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*p == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    3283 SKIP_WHITESPACE(p);
    3284
    3285 filespec = p;
    3286 if (!local_dir[0])
    3287 strcpy(local_dir, "/"); 3288 SAFEPRINTF2(path, "%s%s", local_dir, filespec);

    ** CID 643139: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 1557 in ftpalias(char *, char *, user_t *, client_t *, int *)()
    /ftpsrvr.cpp: 1544 in ftpalias(char *, char *, user_t *, client_t *, int *)()


    _____________________________________________________________________________________________
    *** CID 643139: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 1557 in ftpalias(char *, char *, user_t *, client_t *, int *)()
    1551 *tp = 0;
    1552
    1553 if (stricmp(p, alias)) /* Not a match */
    1554 continue;
    1555
    1556 p = tp + 1; /* filename */
    CID 643139: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*p == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    1557 SKIP_WHITESPACE(p);
    1558
    1559 tp = p; /* terminator */
    1560 FIND_WHITESPACE(tp);
    1561 if (*tp)
    1562 *tp = 0;
    /ftpsrvr.cpp: 1544 in ftpalias(char *, char *, user_t *, client_t *, int *)()
    1538
    1539 while (!feof(fp)) {
    1540 if (!fgets(line, sizeof(line), fp))
    1541 break;
    1542
    1543 p = line; /* alias */
    CID 643139: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*p == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    1544 SKIP_WHITESPACE(p);
    1545 if (*p == ';') /* comment */
    1546 continue;
    1547
    1548 tp = p; /* terminator */
    1549 FIND_WHITESPACE(tp);

    ** CID 643138: (Y2K38_SAFETY)
    /services.cpp: 2230 in services_thread()
    /services.cpp: 2232 in services_thread()


    _____________________________________________________________________________________________
    *** CID 643138: (Y2K38_SAFETY)
    /services.cpp: 2230 in services_thread()
    2224 std::string most_active = connect_rate_limiter->most_active(&most_active_count);
    2225 char str[sizeof rate_limit_report]; 2226 char tmp[128], tmp2[128];
    2227 snprintf(str, sizeof str, "Connect limiting current: clients=%zu, requests=%zu, most-active=%s (%zu), highest: %s (%u) on %s, limited: %u, last: %s on %s (repeat: %u)"
    2228 , connect_rate_limiter->client_count(), connect_rate_limiter->total(), most_active.c_str(), most_active_count
    2229 , connect_rate_limiter->currHighwater.client.c_str(), connect_rate_limiter->currHighwater.count
    CID 643138: (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "connect_rate_limiter->currHighwater.time" is cast to "time32_t".
    2230 , timestr(&scfg, (time32_t)connect_rate_limiter->currHighwater.time, tmp)
    2231 , connect_rate_limiter->disallowed.load()
    2232 , connect_rate_limiter->lastLimited.client.c_str(), timestr(&scfg, (time32_t)connect_rate_limiter->lastLimited.time, tmp2)
    2233 , connect_rate_limiter->repeat.load());
    2234 if (strcmp(str, rate_limit_report) != 0) {
    2235 SAFECOPY(rate_limit_report, str);
    /services.cpp: 2232 in services_thread()
    2226 char tmp[128], tmp2[128];
    2227 snprintf(str, sizeof str, "Connect limiting current: clients=%zu, requests=%zu, most-active=%s (%zu), highest: %s (%u) on %s, limited: %u, last: %s on %s (repeat: %u)"
    2228 , connect_rate_limiter->client_count(), connect_rate_limiter->total(), most_active.c_str(), most_active_count
    2229 , connect_rate_limiter->currHighwater.client.c_str(), connect_rate_limiter->currHighwater.count
    2230 , timestr(&scfg, (time32_t)connect_rate_limiter->currHighwater.time, tmp)
    2231 , connect_rate_limiter->disallowed.load()
    CID 643138: (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "connect_rate_limiter->lastLimited.time" is cast to "time32_t".
    2232 , connect_rate_limiter->lastLimited.client.c_str(), timestr(&scfg, (time32_t)connect_rate_limiter->lastLimited.time, tmp2)
    2233 , connect_rate_limiter->repeat.load());
    2234 if (strcmp(str, rate_limit_report) != 0) {
    2235 SAFECOPY(rate_limit_report, str);
    2236 lprintf(LOG_DEBUG, "%s", rate_limit_report);
    2237 }

    ** CID 643137: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 4105 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3782 in ctrl_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 643137: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 4105 in ctrl_thread(void *)()
    4099 tp = np; /* terminator pointer */
    4100 FIND_WHITESPACE(tp); 4101 if (*tp)
    4102 *tp = 0;
    4103
    4104 dp = tp + 1; /* description pointer */
    CID 643137: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*dp == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    4105 SKIP_WHITESPACE(dp); 4106 truncsp(dp);
    4107
    4108 if (stricmp(dp, BBS_HIDDEN_ALIAS) == 0)
    4109 continue;
    4110
    /ftpsrvr.cpp: 3782 in ctrl_thread(void *)()
    3776 tp = np; /* terminator pointer */
    3777 FIND_WHITESPACE(tp);
    3778 if (*tp)
    3779 *tp = 0;
    3780
    3781 dp = tp + 1; /* description pointer */
    CID 643137: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*dp == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    3782 SKIP_WHITESPACE(dp);
    3783 truncsp(dp);
    3784
    3785 if (stricmp(dp, BBS_HIDDEN_ALIAS) == 0)
    3786 continue;
    3787

    ** CID 643136: (Y2K38_SAFETY)
    /ftpsrvr.cpp: 5417 in ftp_server()
    /ftpsrvr.cpp: 5416 in ftp_server()


    _____________________________________________________________________________________________
    *** CID 643136: (Y2K38_SAFETY)
    /ftpsrvr.cpp: 5417 in ftp_server()
    5411 std::string most_active = request_rate_limiter->most_active(&most_active_count);
    5412 char tmp[128], tmp2[128];
    5413 snprintf(str, sizeof str, "Rate limiting current: clients=%zu, requests=%zu, most-active=%s (%zu), highest: %s (%u) on %s, limited: %u, last: %s on %s"
    5414 , request_rate_limiter->client_count(), request_rate_limiter->total(), most_active.c_str(), most_active_count
    5415 , request_rate_limiter->currHighwater.client.c_str(), request_rate_limiter->currHighwater.count
    5416 , timestr(&scfg, (time32_t)request_rate_limiter->currHighwater.time, tmp), request_rate_limiter->disallowed.load()
    CID 643136: (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "request_rate_limiter->lastLimited.time" is cast to "time32_t".
    5417 , request_rate_limiter->lastLimited.client.c_str(), timestr(&scfg, (time32_t)request_rate_limiter->lastLimited.time, tmp2));
    5418 if (strcmp(str, rate_limit_report) != 0) {
    5419 SAFECOPY(rate_limit_report, str);
    5420 lprintf(LOG_DEBUG, "%s", rate_limit_report);
    5421 }
    5422 }
    /ftpsrvr.cpp: 5416 in ftp_server()
    5410 size_t most_active_count = 0;
    5411 std::string most_active = request_rate_limiter->most_active(&most_active_count);
    5412 char tmp[128], tmp2[128];
    5413 snprintf(str, sizeof str, "Rate limiting current: clients=%zu, requests=%zu, most-active=%s (%zu), highest: %s (%u) on %s, limited: %u, last: %s on %s"
    5414 , request_rate_limiter->client_count(), request_rate_limiter->total(), most_active.c_str(), most_active_count
    5415 , request_rate_limiter->currHighwater.client.c_str(), request_rate_limiter->currHighwater.count
    CID 643136: (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "request_rate_limiter->currHighwater.time" is cast to "time32_t".
    5416 , timestr(&scfg, (time32_t)request_rate_limiter->currHighwater.time, tmp), request_rate_limiter->disallowed.load()
    5417 , request_rate_limiter->lastLimited.client.c_str(), timestr(&scfg, (time32_t)request_rate_limiter->lastLimited.time, tmp2));
    5418 if (strcmp(str, rate_limit_report) != 0) {
    5419 SAFECOPY(rate_limit_report, str);
    5420 lprintf(LOG_DEBUG, "%s", rate_limit_report);
    5421 }

    ** CID 643135: Program hangs (LOCK)
    /services.cpp: 2476 in services_thread()


    _____________________________________________________________________________________________
    *** CID 643135: Program hangs (LOCK)
    /services.cpp: 2476 in services_thread()
    2470 close_socket(client_socket);
    2471 continue;
    2472 }
    2473
    2474 if (!host_exempt->listed(host_ip, nullptr)) {
    2475 login_attempt_t attempted;
    CID 643135: Program hangs (LOCK)
    "loginBanned" locks "startup->login_attempt_list->mutex" while it is locked.
    2476 ulong banned = loginBanned(&scfg, startup->login_attempt_list, client_socket, /* host_name: */ NULL, startup->login_attempt, &attempted);
    2477 if (banned) {
    2478 char ban_duration[128];
    2479 lprintf(LOG_NOTICE, "%04d [%s] !TEMPORARY BAN (%lu login attempts, last: %s) - remaining: %s"
    2480 , client_socket, host_ip, attempted.count - attempted.dupes, attempted.user
    2481 , duration_estimate_to_str(banned, ban_duration, sizeof ban_duration, 1, 1));

    ** CID 643134: Uninitialized members (UNINIT_CTOR)
    /filterfile.hpp: 44 in filterFile::filterFile()()


    _____________________________________________________________________________________________
    *** CID 643134: Uninitialized members (UNINIT_CTOR)
    /filterfile.hpp: 44 in filterFile::filterFile()()
    38 filterFile() = default;
    39 ~filterFile() {
    40 strListFree(&list);
    41 }
    42 std::atomic<uint> fread_count{};
    43 std::atomic<uint> total_found{};
    CID 643134: Uninitialized members (UNINIT_CTOR)
    The compiler-generated constructor for this class does not initialize "fchk_interval".
    44 time_t fchk_interval; // seconds
    45 char fname[MAX_PATH + 1];
    46 bool listed(const char* str1, const char* str2 = nullptr, struct trash* details = nullptr) {
    47 bool result;
    48 time_t now = time(nullptr);
    49 if (fchk_interval) {

    ** CID 643133: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 4476 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 4473 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 4097 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3774 in ctrl_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 643133: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 4476 in ctrl_thread(void *)()
    4470 *tp = 0;
    4471
    4472 np = tp + 1; /* filename pointer */
    4473 SKIP_WHITESPACE(np);
    4474
    4475 np++; /* description pointer */
    CID 643133: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*np == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    4476 FIND_WHITESPACE(np);
    4477
    4478 while (*np && *np < ' ') np++;
    4479
    4480 truncsp(np);
    4481
    /ftpsrvr.cpp: 4473 in ctrl_thread(void *)()
    4467 tp = p; /* terminator pointer */
    4468 FIND_WHITESPACE(tp);
    4469 if (*tp)
    4470 *tp = 0;
    4471
    4472 np = tp + 1; /* filename pointer */
    CID 643133: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*np == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    4473 SKIP_WHITESPACE(np);
    4474
    4475 np++; /* description pointer */
    4476 FIND_WHITESPACE(np);
    4477
    4478 while (*np && *np < ' ') np++;
    /ftpsrvr.cpp: 4097 in ctrl_thread(void *)()
    4091 tp = p; /* terminator pointer */
    4092 FIND_WHITESPACE(tp); 4093 if (*tp)
    4094 *tp = 0;
    4095
    4096 np = tp + 1; /* filename pointer */
    CID 643133: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*np == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    4097 SKIP_WHITESPACE(np); 4098
    4099 tp = np; /* terminator pointer */
    4100 FIND_WHITESPACE(tp); 4101 if (*tp)
    4102 *tp = 0; /ftpsrvr.cpp: 3774 in ctrl_thread(void *)()
    3768 tp = p; /* terminator pointer */
    3769 FIND_WHITESPACE(tp);
    3770 if (*tp)
    3771 *tp = 0;
    3772
    3773 np = tp + 1; /* filename pointer */
    CID 643133: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*np == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    3774 SKIP_WHITESPACE(np);
    3775
    3776 tp = np; /* terminator pointer */
    3777 FIND_WHITESPACE(tp);
    3778 if (*tp)
    3779 *tp = 0;

    ** CID 643132: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 1560 in ftpalias(char *, char *, user_t *, client_t *, int *)()
    /ftpsrvr.cpp: 1549 in ftpalias(char *, char *, user_t *, client_t *, int *)()


    _____________________________________________________________________________________________
    *** CID 643132: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 1560 in ftpalias(char *, char *, user_t *, client_t *, int *)()
    1554 continue;
    1555
    1556 p = tp + 1; /* filename */
    1557 SKIP_WHITESPACE(p);
    1558
    1559 tp = p; /* terminator */
    CID 643132: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*tp == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    1560 FIND_WHITESPACE(tp);
    1561 if (*tp)
    1562 *tp = 0;
    1563
    1564 if (filename == NULL /* CWD? */ && (*lastchar(p) != '/' || (*fname != 0 && strcmp(fname, alias)))) {
    1565 fclose(fp);
    /ftpsrvr.cpp: 1549 in ftpalias(char *, char *, user_t *, client_t *, int *)()
    1543 p = line; /* alias */
    1544 SKIP_WHITESPACE(p);
    1545 if (*p == ';') /* comment */
    1546 continue;
    1547
    1548 tp = p; /* terminator */
    CID 643132: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*tp == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    1549 FIND_WHITESPACE(tp);
    1550 if (*tp)
    1551 *tp = 0;
    1552
    1553 if (stricmp(p, alias)) /* Not a match */
    1554 continue;

    ** CID 643131: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 3769 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3777 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 4100 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 4092 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 4468 in ctrl_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 643131: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 3769 in ctrl_thread(void *)()
    3763 SKIP_WHITESPACE(p);
    3764
    3765 if (*p == ';') /* comment */
    3766 continue;
    3767
    3768 tp = p; /* terminator pointer */
    CID 643131: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*tp == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    3769 FIND_WHITESPACE(tp);
    3770 if (*tp)
    3771 *tp = 0;
    3772
    3773 np = tp + 1; /* filename pointer */
    3774 SKIP_WHITESPACE(np);
    /ftpsrvr.cpp: 3777 in ctrl_thread(void *)()
    3771 *tp = 0;
    3772
    3773 np = tp + 1; /* filename pointer */
    3774 SKIP_WHITESPACE(np);
    3775
    3776 tp = np; /* terminator pointer */
    CID 643131: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*tp == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    3777 FIND_WHITESPACE(tp);
    3778 if (*tp)
    3779 *tp = 0;
    3780
    3781 dp = tp + 1; /* description pointer */
    3782 SKIP_WHITESPACE(dp);
    /ftpsrvr.cpp: 4100 in ctrl_thread(void *)()
    4094 *tp = 0;
    4095
    4096 np = tp + 1; /* filename pointer */
    4097 SKIP_WHITESPACE(np); 4098
    4099 tp = np; /* terminator pointer */
    CID 643131: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*tp == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    4100 FIND_WHITESPACE(tp); 4101 if (*tp)
    4102 *tp = 0;
    4103
    4104 dp = tp + 1; /* description pointer */
    4105 SKIP_WHITESPACE(dp); /ftpsrvr.cpp: 4092 in ctrl_thread(void *)()
    4086 SKIP_WHITESPACE(p); 4087
    4088 if (*p == ';') /* comment */
    4089 continue;
    4090
    4091 tp = p; /* terminator pointer */
    CID 643131: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*tp == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    4092 FIND_WHITESPACE(tp); 4093 if (*tp)
    4094 *tp = 0;
    4095
    4096 np = tp + 1; /* filename pointer */
    4097 SKIP_WHITESPACE(np); /ftpsrvr.cpp: 4468 in ctrl_thread(void *)()
    4462 SKIP_WHITESPACE(p);
    4463
    4464 if (*p == ';') /* comment */
    4465 continue;
    4466
    4467 tp = p; /* terminator pointer */
    CID 643131: (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*tp == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    4468 FIND_WHITESPACE(tp);
    4469 if (*tp)
    4470 *tp = 0;
    4471
    4472 np = tp + 1; /* filename pointer */
    4473 SKIP_WHITESPACE(np);

    ** CID 643130: Error handling issues (CHECKED_RETURN)
    /ftpsrvr.cpp: 929 in receive_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 643130: Error handling issues (CHECKED_RETURN)
    /ftpsrvr.cpp: 929 in receive_thread(void *)()
    923
    924 *xfer.aborted = FALSE;
    925 if (xfer.filepos || startup->options & FTP_OPT_DEBUG_DATA)
    926 lprintf(LOG_DEBUG, "%04d <%s> DATA socket %d receiving %s from offset %" PRIdOFF
    927 , xfer.ctrl_sock, xfer.user->alias, *xfer.data_sock, xfer.filename, xfer.filepos);
    928
    CID 643130: Error handling issues (CHECKED_RETURN)
    Calling "fseeko(fp, xfer.filepos, 0)" without checking return value. This library function may fail and return an error code.
    929 fseeko(fp, xfer.filepos, SEEK_SET);
    930
    931 // Determine the maximum file size to allow, accounting for minimum free space
    932 char path[MAX_PATH + 1];
    933 SAFECOPY(path, xfer.filename);
    934 *getfname(path) = '\0';

    ** CID 643129: (Y2K38_SAFETY)
    /mailsrvr.cpp: 6497 in mail_server()
    /mailsrvr.cpp: 6496 in mail_server()


    _____________________________________________________________________________________________
    *** CID 643129: (Y2K38_SAFETY)
    /mailsrvr.cpp: 6497 in mail_server()
    6491 std::string most_active = request_rate_limiter->most_active(&most_active_count);
    6492 char tmp[128], tmp2[128];
    6493 snprintf(str, sizeof str, "Rate limiting current; clients=%zu, requests=%zu, most-active=%s (%zu), highest: %s (%u) on %s, limited: %u, last: %s on %s"
    6494 , request_rate_limiter->client_count(), request_rate_limiter->total(), most_active.c_str(), most_active_count
    6495 , request_rate_limiter->currHighwater.client.c_str(), request_rate_limiter->currHighwater.count
    6496 , timestr(&scfg, (time32_t)request_rate_limiter->currHighwater.time, tmp), request_rate_limiter->disallowed.load()
    CID 643129: (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "request_rate_limiter->lastLimited.time" is cast to "time32_t".
    6497 , request_rate_limiter->lastLimited.client.c_str(), timestr(&scfg, (time32_t)request_rate_limiter->lastLimited.time, tmp2));
    6498 if (strcmp(str, rate_limit_report) != 0) {
    6499 SAFECOPY(rate_limit_report, str);
    6500 lprintf(LOG_DEBUG, "%s", rate_limit_report);
    6501 }
    6502 }
    /mailsrvr.cpp: 6496 in mail_server()
    6490 size_t most_active_count = 0;
    6491 std::string most_active = request_rate_limiter->most_active(&most_active_count);
    6492 char tmp[128], tmp2[128];
    6493 snprintf(str, sizeof str, "Rate limiting current; clients=%zu, requests=%zu, most-active=%s (%zu), highest: %s (%u) on %s, limited: %u, last: %s on %s"
    6494 , request_rate_limiter->client_count(), request_rate_limiter->total(), most_active.c_str(), most_active_count
    6495 , request_rate_limiter->currHighwater.client.c_str(), request_rate_limiter->currHighwater.count
    CID 643129: (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "request_rate_limiter->currHighwater.time" is cast to "time32_t".
    6496 , timestr(&scfg, (time32_t)request_rate_limiter->currHighwater.time, tmp), request_rate_limiter->disallowed.load()
    6497 , request_rate_limiter->lastLimited.client.c_str(), timestr(&scfg, (time32_t)request_rate_limiter->lastLimited.time, tmp2));
    6498 if (strcmp(str, rate_limit_report) != 0) {
    6499 SAFECOPY(rate_limit_report, str);
    6500 lprintf(LOG_DEBUG, "%s", rate_limit_report);
    6501 }


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/synchronet?tab=overview


    ----==_mimepart_698f2d096fc4c_11e62b0ff68619ac1976e
    Content-Type: text/html; charset=us-ascii
    Content-Transfer-Encoding: 7bit

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>New Defects Reported - Synchronet</title>
    <style>
    body { font-family: Arial, sans-serif; color: #222; line-height: 1.6; }
    .button {
    display: inline-block;
    padding: 10px 20px;
    margin: 20px 0;
    font-size: 16px;
    color: #fff !important;
    background-color: #0056b3;
    text-decoration: none;
    border-radius: 5px;
    }
    pre {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    overflow-x: auto;
    }
    </style>
    </head>
    <body>
    <p>Hi,</p>

    <p>
    Please find the latest report on new defect(s) introduced to <strong>Synchronet</strong>
    found with Coverity Scan.
    </p>

    <ul>
    <li><strong>New Defects Found:</strong> 18</li>
    <li>
    12 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
    </li>
    <li><strong>Defects Shown:</strong> Showing 18 of 18 defect(s)</li>
    </ul>

    <h3>Defect Details</h3>
    <pre>
    ** CID 643146: Program hangs (SLEEP)


    _____________________________________________________________________________________________
    *** CID 643146: Program hangs (SLEEP)
    /filterfile.hpp: 56 in filterFile::listed(const char *, const char *, trash *)()
    50 const std::lock_guard&lt;std::mutex&gt; lock(mutex);
    51 if ((now - lastftime_check) &gt;= fchk_interval) {
    52 lastftime_check = now;
    53 time_t latest = fdate(fname);
    54 if (latest &gt; timestamp) {
    55 strListFree(&amp;list); &gt;&gt;&gt; CID 643146: Program hangs (SLEEP)
    &gt;&gt;&gt; Call to &quot;findstr_list&quot; might sleep while holding lock &quot;lock._M_device&quot;.
    56 list = findstr_list(fname);
    57 timestamp = latest;
    58 ++fread_count;
    59 }
    60 }
    61 result = trash_in_list(str1, str2, list, details);

    ** CID 643145: Security best practices violations (DC.WEAK_CRYPTO) /ftpsrvr.cpp: 1844 in ftp_tmpfname(char *, const char *, int)()


    _____________________________________________________________________________________________
    *** CID 643145: Security best practices violations (DC.WEAK_CRYPTO) /ftpsrvr.cpp: 1844 in ftp_tmpfname(char *, const char *, int)() 1838 return FALSE;
    1839 }
    1840
    1841 static char* ftp_tmpfname(char* fname, const char* ext, SOCKET sock) 1842 {
    1843 safe_snprintf(fname, MAX_PATH, &quot;%sSBBS_FTP.%x%x%x%lx.%s&quot;
    &gt;&gt;&gt; CID 643145: Security best practices violations (DC.WEAK_CRYPTO)
    &gt;&gt;&gt; &quot;rand&quot; should not be used for security-related applications, because linear congruential algorithms are too easy to break.
    1844 , scfg.temp_dir, getpid(), sock, rand(), (ulong)clock(), ext);
    1845 return fname;
    1846 }
    1847
    1848 #if defined(__GNUC__) // Catch printf-format errors
    1849 static BOOL send_mlsx(FILE *fp, SOCKET sock, CRYPT_SESSION sess, const char *format, ...) __attribute__ ((format (printf, 4, 5)));

    ** CID 643144: Memory - corruptions (OVERRUN)
    /ftpsrvr.cpp: 1359 in filexfer(xp_sockaddr *, int, int, int, int, int *, int *, char *, long, volatile int *, volatile int *, int, int, long *, user_t *, client_t *, int, int, int, int, char *, int)()


    _____________________________________________________________________________________________
    *** CID 643144: Memory - corruptions (OVERRUN)
    /ftpsrvr.cpp: 1359 in filexfer(xp_sockaddr *, int, int, int, int, int *, int *, char *, long, volatile int *, volatile int *, int, int, long *, user_t *, client_t *, int, int, int, int, char *, int)()
    1353 }
    1354
    1355 addr_len = sizeof(*addr);
    1356 #ifdef SOCKET_DEBUG_ACCEPT
    1357 socket_debug[ctrl_sock] |= SOCKET_DEBUG_ACCEPT;
    1358 #endif
    &gt;&gt;&gt; CID 643144: Memory - corruptions (OVERRUN) &gt;&gt;&gt; Overrunning struct type sockaddr of 16 bytes by passing it to a function which accesses it at byte offset 127 using argument &quot;addr_len&quot; (which evaluates to 128).
    1359 *data_sock = accept(pasv_sock, &amp;addr-&gt;addr, &amp;addr_len);
    1360 #ifdef SOCKET_DEBUG_ACCEPT
    1361 socket_debug[ctrl_sock] &amp;= ~SOCKET_DEBUG_ACCEPT; 1362 #endif
    1363 if (*data_sock == INVALID_SOCKET) {
    1364 lprintf(LOG_WARNING, &quot;%04d &lt;%s&gt; PASV !DATA ERROR %d accepting connection on socket %d&quot;

    ** CID 643143: Error handling issues (CHECKED_RETURN)
    /ftpsrvr.cpp: 450 in sock_recvbyte(int, int, char *, long *)()


    _____________________________________________________________________________________________
    *** CID 643143: Error handling issues (CHECKED_RETURN)
    /ftpsrvr.cpp: 450 in sock_recvbyte(int, int, char *, long *)()
    444 /* Try a read with no timeout first. */
    445 if ((ret = cryptSetAttribute(sess, CRYPT_OPTION_NET_READTIMEOUT, 0)) != CRYPT_OK)
    446 GCES(ret, sock, sess, estr, &quot;setting read timeout&quot;);
    447 while (1) {
    448 ret = cryptPopData(sess, buf, 1, &amp;len);
    449 /* Successive reads will be with the full timeout after a socket_readable() */
    &gt;&gt;&gt; CID 643143: Error handling issues (CHECKED_RETURN) &gt;&gt;&gt; Calling &quot;cryptSetAttribute&quot; without checking return value (as is done elsewhere 55 out of 68 times).
    450 cryptSetAttribute(sess, CRYPT_OPTION_NET_READTIMEOUT, startup-&gt;max_inactivity);
    451 switch (ret) {
    452 case CRYPT_OK:
    453 break;
    454 case CRYPT_ERROR_TIMEOUT:
    455 if (!first) {

    ** CID 643142: (CHECKED_RETURN)
    /ftpsrvr.cpp: 663 in send_thread(void *)()
    /ftpsrvr.cpp: 700 in send_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 643142: (CHECKED_RETURN)
    /ftpsrvr.cpp: 663 in send_thread(void *)()
    657 if (xfer.filepos &lt; 0)
    658 xfer.filepos = 0;
    659 if (startup-&gt;options &amp; FTP_OPT_DEBUG_DATA || xfer.filepos)
    660 lprintf(LOG_DEBUG, &quot;%04d &lt;%s&gt; DATA socket %d sending %s from offset %&quot; PRIdOFF
    661 , xfer.ctrl_sock, xfer.user-&gt;alias, *xfer.data_sock, xfer.filename, xfer.filepos);
    662
    &gt;&gt;&gt; CID 643142: (CHECKED_RETURN)
    &gt;&gt;&gt; Calling &quot;fseeko(fp, xfer.filepos, 0)&quot; without checking return value. This library function may fail and return an error code.
    663 fseeko(fp, xfer.filepos, SEEK_SET);
    664 last_report = start = time(NULL);
    665 while ((xfer.filepos + total) &lt; length) {
    666
    667 now = time(NULL);
    668
    /ftpsrvr.cpp: 700 in send_thread(void *)()
    694 }
    695
    696 /* Check socket for writability */
    697 if (!socket_writable(*xfer.data_sock, 1000))
    698 continue;
    699
    &gt;&gt;&gt; CID 643142: (CHECKED_RETURN)
    &gt;&gt;&gt; Calling &quot;fseeko(fp, xfer.filepos + total, 0)&quot; without checking return value. This library function may fail and return an error code.
    700 fseeko(fp, xfer.filepos + total, SEEK_SET);
    701 rd = fread(buf, sizeof(char), sizeof(buf), fp);
    702 if (rd &lt; 1) /* EOF or READ error */
    703 break;
    704
    705 #ifdef SOCKET_DEBUG_SEND

    ** CID 643141: (Y2K38_SAFETY)
    /websrvr.cpp: 7719 in web_server()
    /websrvr.cpp: 7721 in web_server()


    _____________________________________________________________________________________________
    *** CID 643141: (Y2K38_SAFETY)
    /websrvr.cpp: 7719 in web_server()
    7713 std::string most_active = request_rate_limiter-&gt;most_active(&amp;most_active_count);
    7714 char str[sizeof rate_limit_report]; 7715 char tmp[128];
    7716 snprintf(str, sizeof str, &quot;Rate limiting current: clients=%zu, requests=%zu, most-active=%s (%zu), highest: %s (%u) on %s, limited: %u, last: %s on %s (repeat: %u)&quot;
    7717 , request_rate_limiter-&gt;client_count(), request_rate_limiter-&gt;total(), most_active.c_str(), most_active_count
    7718 , request_rate_limiter-&gt;currHighwater.client.c_str(), request_rate_limiter-&gt;currHighwater.count
    &gt;&gt;&gt; CID 643141: (Y2K38_SAFETY)
    &gt;&gt;&gt; A &quot;time_t&quot; value is stored in an integer with too few bits to accommodate it. The expression &quot;request_rate_limiter-&gt;currHighwater.time&quot; is cast to &quot;time32_t&quot;.
    7719 , timestr(&amp;scfg, (time32_t)request_rate_limiter-&gt;currHighwater.time, logstr)
    7720 , request_rate_limiter-&gt;disallowed.load()
    7721 , request_rate_limiter-&gt;lastLimited.client.c_str(), timestr(&amp;scfg, (time32_t)request_rate_limiter-&gt;lastLimited.time, tmp)
    7722 , request_rate_limiter-&gt;repeat.load());
    7723 if (strcmp(str, rate_limit_report) != 0) {
    7724 SAFECOPY(rate_limit_report, str);
    /websrvr.cpp: 7721 in web_server()
    7715 char tmp[128];
    7716 snprintf(str, sizeof str, &quot;Rate limiting current: clients=%zu, requests=%zu, most-active=%s (%zu), highest: %s (%u) on %s, limited: %u, last: %s on %s (repeat: %u)&quot;
    7717 , request_rate_limiter-&gt;client_count(), request_rate_limiter-&gt;total(), most_active.c_str(), most_active_count
    7718 , request_rate_limiter-&gt;currHighwater.client.c_str(), request_rate_limiter-&gt;currHighwater.count
    7719 , timestr(&amp;scfg, (time32_t)request_rate_limiter-&gt;currHighwater.time, logstr)
    7720 , request_rate_limiter-&gt;disallowed.load()
    &gt;&gt;&gt; CID 643141: (Y2K38_SAFETY)
    &gt;&gt;&gt; A &quot;time_t&quot; value is stored in an integer with too few bits to accommodate it. The expression &quot;request_rate_limiter-&gt;lastLimited.time&quot; is cast to &quot;time32_t&quot;.
    7721 , request_rate_limiter-&gt;lastLimited.client.c_str(), timestr(&amp;scfg, (time32_t)request_rate_limiter-&gt;lastLimited.time, tmp)
    7722 , request_rate_limiter-&gt;repeat.load());
    7723 if (strcmp(str, rate_limit_report) != 0) {
    7724 SAFECOPY(rate_limit_report, str);
    7725 lprintf(LOG_DEBUG, &quot;%s&quot;, rate_limit_report);
    7726 }

    ** CID 643140: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 3431 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 2847 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 2557 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3214 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3490 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3242 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3174 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3204 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 2885 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 2540 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3192 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3363 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3366 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3367 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3283 in ctrl_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 643140: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 3431 in ctrl_thread(void *)()
    3425
    3426 if (!strnicmp(cmd, &quot;CWD &quot;, 4) || !strnicmp(cmd, &quot;XCWD &quot;, 5)) {
    3427 if (!strnicmp(cmd, &quot;CWD &quot;, 4))
    3428 p = cmd + 4;
    3429 else
    3430 p = cmd + 5;
    &gt;&gt;&gt; CID 643140: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*p == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    3431 SKIP_WHITESPACE(p);
    3432 tp = p;
    3433 if (*tp == &#39;/&#39; || *tp == &#39;\\&#39;) /* /local: and /bbs: are valid */
    3434 tp++;
    3435 if (!strnicmp(tp, BBS_FSYS_DIR, strlen(BBS_FSYS_DIR))) {
    3436 local_fsys = FALSE; /ftpsrvr.cpp: 2847 in ctrl_thread(void *)()
    2841 refresh_cfg(&amp;scfg);
    2842 sockprintf(sock, sess, &quot;211 ALL servers/nodes will recycle when not in-use&quot;);
    2843 continue;
    2844 }
    2845 if (!strnicmp(cmd, &quot;SITE EXEC &quot;, 10) &amp;&amp; sysop) {
    2846 p = cmd + 10;
    &gt;&gt;&gt; CID 643140: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*p == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    2847 SKIP_WHITESPACE(p);
    2848 #ifdef __unix__
    2849 fp = popen(p, &quot;r&quot;);
    2850 if (fp == NULL)
    2851 sockprintf(sock, sess, &quot;500 Error %d opening pipe to: %s&quot;, errno, p);
    2852 else {
    /ftpsrvr.cpp: 2557 in ctrl_thread(void *)()
    2551 continue;
    2552 }
    2553 if (!strnicmp(cmd, &quot;PASS &quot;, 5) &amp;&amp; user.alias[0]) {
    2554 user.number = 0;
    2555 fmutex_close(&amp;mutex_file);
    2556 p = cmd + 5;
    &gt;&gt;&gt; CID 643140: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*p == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    2557 SKIP_WHITESPACE(p);
    2558
    2559 SAFECOPY(password, p);
    2560 uint usernum = find_login_id(&amp;scfg, user.alias);
    2561 if (usernum == 0) {
    2562 if (scfg.sys_misc &amp; SM_ECHO_PW) /ftpsrvr.cpp: 3214 in ctrl_thread(void *)()
    3208 sockprintf(sock, sess, &quot;200 STREAM mode.&quot;);
    3209 continue;
    3210 }
    3211
    3212 if (!strnicmp(cmd, &quot;STRU &quot;, 5)) {
    3213 p = cmd + 5;
    &gt;&gt;&gt; CID 643140: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*p == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    3214 SKIP_WHITESPACE(p);
    3215 if (toupper(*p) != &#39;F&#39;)
    3216 sockprintf(sock, sess, &quot;504 Only FILE structure supported.&quot;);
    3217 else
    3218 sockprintf(sock, sess, &quot;200 FILE structure.&quot;);
    3219 continue;
    /ftpsrvr.cpp: 3490 in ctrl_thread(void *)()
    3484 , local_dir);
    3485 continue;
    3486 } /* Local PWD */
    3487
    3488 if (!strnicmp(cmd, &quot;MKD &quot;, 4) || !strnicmp(cmd, &quot;XMKD&quot;, 4)) {
    3489 p = cmd + 4;
    &gt;&gt;&gt; CID 643140: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*p == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    3490 SKIP_WHITESPACE(p);
    3491 if (*p == &#39;/&#39;) /* absolute */ 3492 SAFEPRINTF2(fname, &quot;%s%s&quot;, root_dir(local_dir), p + 1);
    3493 else /* relative */
    3494 SAFEPRINTF2(fname, &quot;%s%s&quot;, local_dir, p);
    3495
    /ftpsrvr.cpp: 3242 in ctrl_thread(void *)()
    3236 }
    3237 continue;
    3238 }
    3239
    3240 if (!strnicmp(cmd, &quot;SMNT &quot;, 5) &amp;&amp; sysop &amp;&amp; !(startup-&gt;options &amp; FTP_OPT_NO_LOCAL_FSYS)) {
    3241 p = cmd + 5;
    &gt;&gt;&gt; CID 643140: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*p == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    3242 SKIP_WHITESPACE(p);
    3243 if (!stricmp(p, BBS_FSYS_DIR))
    3244 local_fsys = FALSE;
    3245 else {
    3246 if (!direxist(p)) {
    3247 sockprintf(sock, sess, &quot;550 Directory does not exist.&quot;);
    /ftpsrvr.cpp: 3174 in ctrl_thread(void *)()
    3168 sockprintf(sock, sess, &quot;200 All files sent in BINARY mode.&quot;);
    3169 continue;
    3170 }
    3171
    3172 if (!strnicmp(cmd, &quot;ALLO&quot;, 4)) {
    3173 p = cmd + 5;
    &gt;&gt;&gt; CID 643140: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*p == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    3174 SKIP_WHITESPACE(p);
    3175 if (*p)
    3176 l = atol(p);
    3177 else
    3178 l = 0;
    3179 if (local_fsys)
    /ftpsrvr.cpp: 3204 in ctrl_thread(void *)()
    3198 , filepos);
    3199 continue;
    3200 }
    3201
    3202 if (!strnicmp(cmd, &quot;MODE &quot;, 5)) {
    3203 p = cmd + 5;
    &gt;&gt;&gt; CID 643140: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*p == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    3204 SKIP_WHITESPACE(p);
    3205 if (toupper(*p) != &#39;S&#39;)
    3206 sockprintf(sock, sess, &quot;504 Only STREAM mode supported.&quot;);
    3207 else
    3208 sockprintf(sock, sess, &quot;200 STREAM mode.&quot;);
    3209 continue;
    /ftpsrvr.cpp: 2885 in ctrl_thread(void *)()
    2879
    2880 if (pasv_sock != INVALID_SOCKET) {
    2881 ftp_close_socket(&amp;pasv_sock, &amp;pasv_sess, __LINE__);
    2882 }
    2883 memcpy(&amp;data_addr, &amp;ftp.client_addr, ftp.client_addr_len);
    2884 p = cmd + 5;
    &gt;&gt;&gt; CID 643140: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*p == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    2885 SKIP_WHITESPACE(p);
    2886 if (strnicmp(cmd, &quot;PORT &quot;, 5) == 0 &amp;&amp; sscanf(p, &quot;%u,%u,%u,%u,%hd,%hd&quot;, &amp;h1, &amp;h2, &amp;h3, &amp;h4, &amp;p1, &amp;p2) == 6) {
    2887 data_addr.in.sin_family = AF_INET;
    2888 data_addr.in.sin_addr.s_addr = htonl((h1 &lt;&lt; 24) | (h2 &lt;&lt; 16) | (h3 &lt;&lt; 8) | h4);
    2889 data_port = (p1 &lt;&lt; 8) | p2;
    2890 } else if (strnicmp(cmd, &quot;EPRT &quot;, 5) == 0) { /* EPRT */
    /ftpsrvr.cpp: 2540 in ctrl_thread(void *)()
    2534 }
    2535 if (!strnicmp(cmd, &quot;USER &quot;, 5)) {
    2536 sysop = FALSE;
    2537 user.number = 0;
    2538 fmutex_close(&amp;mutex_file);
    2539 p = cmd + 5;
    &gt;&gt;&gt; CID 643140: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*p == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    2540 SKIP_WHITESPACE(p);
    2541 truncsp(p);
    2542 SAFECOPY(user.alias, p);
    2543 user.number = find_login_id(&amp;scfg, user.alias);
    2544 if (!user.number &amp;&amp; (stricmp(user.alias, &quot;anonymous&quot;) == 0 || stricmp(user.alias, &quot;ftp&quot;) == 0))
    2545 user.number = matchuser(&amp;scfg, &quot;guest&quot;, FALSE);
    /ftpsrvr.cpp: 3192 in ctrl_thread(void *)()
    3186 sockprintf(sock, sess, &quot;200 %&quot; PRIu64 &quot; bytes available.&quot;, avail);
    3187 continue;
    3188 }
    3189
    3190 if (!strnicmp(cmd, &quot;REST&quot;, 4)) {
    3191 p = cmd + 4;
    &gt;&gt;&gt; CID 643140: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*p == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    3192 SKIP_WHITESPACE(p);
    3193 if (*p)
    3194 filepos = atol(p);
    3195 else
    3196 filepos = 0;
    3197 sockprintf(sock, sess, &quot;350 Restarting at %ld. Send STORE or RETRIEVE to initiate transfer.&quot;
    /ftpsrvr.cpp: 3363 in ctrl_thread(void *)()
    3357 , sock, user.alias, errno, safe_strerror(errno, error, sizeof error), __LINE__, fname);
    3358 sockprintf(sock, sess, &quot;451 Insufficient system storage&quot;);
    3359 continue;
    3360 }
    3361
    3362 p = cmd + 4;
    &gt;&gt;&gt; CID 643140: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*p == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    3363 SKIP_WHITESPACE(p);
    3364
    3365 if (*p == &#39;-&#39;) { /* -Letc */ 3366 FIND_WHITESPACE(p);
    3367 SKIP_WHITESPACE(p);
    3368 }
    /ftpsrvr.cpp: 3366 in ctrl_thread(void *)()
    3360 }
    3361
    3362 p = cmd + 4;
    3363 SKIP_WHITESPACE(p);
    3364
    3365 if (*p == &#39;-&#39;) { /* -Letc */ &gt;&gt;&gt; CID 643140: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*p == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    3366 FIND_WHITESPACE(p);
    3367 SKIP_WHITESPACE(p);
    3368 }
    3369
    3370 filespec = p;
    3371 if (*filespec == 0)
    /ftpsrvr.cpp: 3367 in ctrl_thread(void *)()
    3361
    3362 p = cmd + 4;
    3363 SKIP_WHITESPACE(p);
    3364
    3365 if (*p == &#39;-&#39;) { /* -Letc */ 3366 FIND_WHITESPACE(p); &gt;&gt;&gt; CID 643140: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*p == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    3367 SKIP_WHITESPACE(p);
    3368 }
    3369
    3370 filespec = p;
    3371 if (*filespec == 0)
    3372 filespec = &quot;*&quot;; /ftpsrvr.cpp: 3283 in ctrl_thread(void *)()
    3277 sockprintf(sock, sess, &quot;451 Insufficient system storage&quot;);
    3278 continue;
    3279 }
    3280 }
    3281
    3282 p = cmd + 4;
    &gt;&gt;&gt; CID 643140: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*p == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    3283 SKIP_WHITESPACE(p);
    3284
    3285 filespec = p;
    3286 if (!local_dir[0])
    3287 strcpy(local_dir, &quot;/&quot;);
    3288 SAFEPRINTF2(path, &quot;%s%s&quot;, local_dir, filespec);

    ** CID 643139: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 1557 in ftpalias(char *, char *, user_t *, client_t *, int *)()
    /ftpsrvr.cpp: 1544 in ftpalias(char *, char *, user_t *, client_t *, int *)()


    _____________________________________________________________________________________________
    *** CID 643139: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 1557 in ftpalias(char *, char *, user_t *, client_t *, int *)()
    1551 *tp = 0;
    1552
    1553 if (stricmp(p, alias)) /* Not a match */
    1554 continue;
    1555
    1556 p = tp + 1; /* filename */
    &gt;&gt;&gt; CID 643139: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*p == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    1557 SKIP_WHITESPACE(p);
    1558
    1559 tp = p; /* terminator */
    1560 FIND_WHITESPACE(tp);
    1561 if (*tp)
    1562 *tp = 0;
    /ftpsrvr.cpp: 1544 in ftpalias(char *, char *, user_t *, client_t *, int *)()
    1538
    1539 while (!feof(fp)) {
    1540 if (!fgets(line, sizeof(line), fp))
    1541 break;
    1542
    1543 p = line; /* alias */
    &gt;&gt;&gt; CID 643139: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*p == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    1544 SKIP_WHITESPACE(p);
    1545 if (*p == &#39;;&#39;) /* comment */
    1546 continue;
    1547
    1548 tp = p; /* terminator */
    1549 FIND_WHITESPACE(tp);

    ** CID 643138: (Y2K38_SAFETY)
    /services.cpp: 2230 in services_thread()
    /services.cpp: 2232 in services_thread()


    _____________________________________________________________________________________________
    *** CID 643138: (Y2K38_SAFETY)
    /services.cpp: 2230 in services_thread()
    2224 std::string most_active = connect_rate_limiter-&gt;most_active(&amp;most_active_count);
    2225 char str[sizeof rate_limit_report]; 2226 char tmp[128], tmp2[128];
    2227 snprintf(str, sizeof str, &quot;Connect limiting current: clients=%zu, requests=%zu, most-active=%s (%zu), highest: %s (%u) on %s, limited: %u, last: %s on %s (repeat: %u)&quot;
    2228 , connect_rate_limiter-&gt;client_count(), connect_rate_limiter-&gt;total(), most_active.c_str(), most_active_count
    2229 , connect_rate_limiter-&gt;currHighwater.client.c_str(), connect_rate_limiter-&gt;currHighwater.count
    &gt;&gt;&gt; CID 643138: (Y2K38_SAFETY)
    &gt;&gt;&gt; A &quot;time_t&quot; value is stored in an integer with too few bits to accommodate it. The expression &quot;connect_rate_limiter-&gt;currHighwater.time&quot; is cast to &quot;time32_t&quot;.
    2230 , timestr(&amp;scfg, (time32_t)connect_rate_limiter-&gt;currHighwater.time, tmp)
    2231 , connect_rate_limiter-&gt;disallowed.load()
    2232 , connect_rate_limiter-&gt;lastLimited.client.c_str(), timestr(&amp;scfg, (time32_t)connect_rate_limiter-&gt;lastLimited.time, tmp2)
    2233 , connect_rate_limiter-&gt;repeat.load());
    2234 if (strcmp(str, rate_limit_report) != 0) {
    2235 SAFECOPY(rate_limit_report, str);
    /services.cpp: 2232 in services_thread()
    2226 char tmp[128], tmp2[128];
    2227 snprintf(str, sizeof str, &quot;Connect limiting current: clients=%zu, requests=%zu, most-active=%s (%zu), highest: %s (%u) on %s, limited: %u, last: %s on %s (repeat: %u)&quot;
    2228 , connect_rate_limiter-&gt;client_count(), connect_rate_limiter-&gt;total(), most_active.c_str(), most_active_count
    2229 , connect_rate_limiter-&gt;currHighwater.client.c_str(), connect_rate_limiter-&gt;currHighwater.count
    2230 , timestr(&amp;scfg, (time32_t)connect_rate_limiter-&gt;currHighwater.time, tmp)
    2231 , connect_rate_limiter-&gt;disallowed.load()
    &gt;&gt;&gt; CID 643138: (Y2K38_SAFETY)
    &gt;&gt;&gt; A &quot;time_t&quot; value is stored in an integer with too few bits to accommodate it. The expression &quot;connect_rate_limiter-&gt;lastLimited.time&quot; is cast to &quot;time32_t&quot;.
    2232 , connect_rate_limiter-&gt;lastLimited.client.c_str(), timestr(&amp;scfg, (time32_t)connect_rate_limiter-&gt;lastLimited.time, tmp2)
    2233 , connect_rate_limiter-&gt;repeat.load());
    2234 if (strcmp(str, rate_limit_report) != 0) {
    2235 SAFECOPY(rate_limit_report, str);
    2236 lprintf(LOG_DEBUG, &quot;%s&quot;, rate_limit_report);
    2237 }

    ** CID 643137: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 4105 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3782 in ctrl_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 643137: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 4105 in ctrl_thread(void *)()
    4099 tp = np; /* terminator pointer */
    4100 FIND_WHITESPACE(tp); 4101 if (*tp)
    4102 *tp = 0;
    4103
    4104 dp = tp + 1; /* description pointer */
    &gt;&gt;&gt; CID 643137: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*dp == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    4105 SKIP_WHITESPACE(dp); 4106 truncsp(dp);
    4107
    4108 if (stricmp(dp, BBS_HIDDEN_ALIAS) == 0)
    4109 continue;
    4110
    /ftpsrvr.cpp: 3782 in ctrl_thread(void *)()
    3776 tp = np; /* terminator pointer */
    3777 FIND_WHITESPACE(tp);
    3778 if (*tp)
    3779 *tp = 0;
    3780
    3781 dp = tp + 1; /* description pointer */
    &gt;&gt;&gt; CID 643137: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*dp == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    3782 SKIP_WHITESPACE(dp);
    3783 truncsp(dp);
    3784
    3785 if (stricmp(dp, BBS_HIDDEN_ALIAS) == 0)
    3786 continue;
    3787

    ** CID 643136: (Y2K38_SAFETY)
    /ftpsrvr.cpp: 5417 in ftp_server()
    /ftpsrvr.cpp: 5416 in ftp_server()


    _____________________________________________________________________________________________
    *** CID 643136: (Y2K38_SAFETY)
    /ftpsrvr.cpp: 5417 in ftp_server()
    5411 std::string most_active = request_rate_limiter-&gt;most_active(&amp;most_active_count);
    5412 char tmp[128], tmp2[128];
    5413 snprintf(str, sizeof str, &quot;Rate limiting current: clients=%zu, requests=%zu, most-active=%s (%zu), highest: %s (%u) on %s, limited: %u, last: %s on %s&quot;
    5414 , request_rate_limiter-&gt;client_count(), request_rate_limiter-&gt;total(), most_active.c_str(), most_active_count
    5415 , request_rate_limiter-&gt;currHighwater.client.c_str(), request_rate_limiter-&gt;currHighwater.count
    5416 , timestr(&amp;scfg, (time32_t)request_rate_limiter-&gt;currHighwater.time, tmp), request_rate_limiter-&gt;disallowed.load()
    &gt;&gt;&gt; CID 643136: (Y2K38_SAFETY)
    &gt;&gt;&gt; A &quot;time_t&quot; value is stored in an integer with too few bits to accommodate it. The expression &quot;request_rate_limiter-&gt;lastLimited.time&quot; is cast to &quot;time32_t&quot;.
    5417 , request_rate_limiter-&gt;lastLimited.client.c_str(), timestr(&amp;scfg, (time32_t)request_rate_limiter-&gt;lastLimited.time, tmp2));
    5418 if (strcmp(str, rate_limit_report) != 0) {
    5419 SAFECOPY(rate_limit_report, str);
    5420 lprintf(LOG_DEBUG, &quot;%s&quot;, rate_limit_report);
    5421 }
    5422 }
    /ftpsrvr.cpp: 5416 in ftp_server()
    5410 size_t most_active_count = 0;
    5411 std::string most_active = request_rate_limiter-&gt;most_active(&amp;most_active_count);
    5412 char tmp[128], tmp2[128];
    5413 snprintf(str, sizeof str, &quot;Rate limiting current: clients=%zu, requests=%zu, most-active=%s (%zu), highest: %s (%u) on %s, limited: %u, last: %s on %s&quot;
    5414 , request_rate_limiter-&gt;client_count(), request_rate_limiter-&gt;total(), most_active.c_str(), most_active_count
    5415 , request_rate_limiter-&gt;currHighwater.client.c_str(), request_rate_limiter-&gt;currHighwater.count
    &gt;&gt;&gt; CID 643136: (Y2K38_SAFETY)
    &gt;&gt;&gt; A &quot;time_t&quot; value is stored in an integer with too few bits to accommodate it. The expression &quot;request_rate_limiter-&gt;currHighwater.time&quot; is cast to &quot;time32_t&quot;.
    5416 , timestr(&amp;scfg, (time32_t)request_rate_limiter-&gt;currHighwater.time, tmp), request_rate_limiter-&gt;disallowed.load()
    5417 , request_rate_limiter-&gt;lastLimited.client.c_str(), timestr(&amp;scfg, (time32_t)request_rate_limiter-&gt;lastLimited.time, tmp2));
    5418 if (strcmp(str, rate_limit_report) != 0) {
    5419 SAFECOPY(rate_limit_report, str);
    5420 lprintf(LOG_DEBUG, &quot;%s&quot;, rate_limit_report);
    5421 }

    ** CID 643135: Program hangs (LOCK)
    /services.cpp: 2476 in services_thread()


    _____________________________________________________________________________________________
    *** CID 643135: Program hangs (LOCK)
    /services.cpp: 2476 in services_thread()
    2470 close_socket(client_socket);
    2471 continue;
    2472 }
    2473
    2474 if (!host_exempt-&gt;listed(host_ip, nullptr)) {
    2475 login_attempt_t attempted;
    &gt;&gt;&gt; CID 643135: Program hangs (LOCK)
    &gt;&gt;&gt; &quot;loginBanned&quot; locks &quot;startup-&gt;login_attempt_list-&gt;mutex&quot; while it is locked.
    2476 ulong banned = loginBanned(&amp;scfg, startup-&gt;login_attempt_list, client_socket, /* host_name: */ NULL, startup-&gt;login_attempt, &amp;attempted);
    2477 if (banned) {
    2478 char ban_duration[128];
    2479 lprintf(LOG_NOTICE, &quot;%04d [%s] !TEMPORARY BAN (%lu login attempts, last: %s) - remaining: %s&quot;
    2480 , client_socket, host_ip, attempted.count - attempted.dupes, attempted.user
    2481 , duration_estimate_to_str(banned, ban_duration, sizeof ban_duration, 1, 1));

    ** CID 643134: Uninitialized members (UNINIT_CTOR)
    /filterfile.hpp: 44 in filterFile::filterFile()()


    _____________________________________________________________________________________________
    *** CID 643134: Uninitialized members (UNINIT_CTOR)
    /filterfile.hpp: 44 in filterFile::filterFile()()
    38 filterFile() = default;
    39 ~filterFile() {
    40 strListFree(&amp;list);
    41 }
    42 std::atomic&lt;uint&gt; fread_count{};
    43 std::atomic&lt;uint&gt; total_found{};
    &gt;&gt;&gt; CID 643134: Uninitialized members (UNINIT_CTOR) &gt;&gt;&gt; The compiler-generated constructor for this class does not initialize &quot;fchk_interval&quot;.
    44 time_t fchk_interval; // seconds
    45 char fname[MAX_PATH + 1];
    46 bool listed(const char* str1, const char* str2 = nullptr, struct trash* details = nullptr) {
    47 bool result;
    48 time_t now = time(nullptr);
    49 if (fchk_interval) {

    ** CID 643133: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 4476 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 4473 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 4097 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3774 in ctrl_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 643133: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 4476 in ctrl_thread(void *)()
    4470 *tp = 0;
    4471
    4472 np = tp + 1; /* filename pointer */
    4473 SKIP_WHITESPACE(np);
    4474
    4475 np++; /* description pointer */
    &gt;&gt;&gt; CID 643133: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*np == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    4476 FIND_WHITESPACE(np);
    4477
    4478 while (*np &amp;&amp; *np &lt; &#39; &#39;) np++;
    4479
    4480 truncsp(np);
    4481
    /ftpsrvr.cpp: 4473 in ctrl_thread(void *)()
    4467 tp = p; /* terminator pointer */
    4468 FIND_WHITESPACE(tp);
    4469 if (*tp)
    4470 *tp = 0;
    4471
    4472 np = tp + 1; /* filename pointer */
    &gt;&gt;&gt; CID 643133: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*np == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    4473 SKIP_WHITESPACE(np);
    4474
    4475 np++; /* description pointer */
    4476 FIND_WHITESPACE(np);
    4477
    4478 while (*np &amp;&amp; *np &lt; &#39; &#39;) np++;
    /ftpsrvr.cpp: 4097 in ctrl_thread(void *)()
    4091 tp = p; /* terminator pointer */
    4092 FIND_WHITESPACE(tp); 4093 if (*tp)
    4094 *tp = 0;
    4095
    4096 np = tp + 1; /* filename pointer */
    &gt;&gt;&gt; CID 643133: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*np == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    4097 SKIP_WHITESPACE(np); 4098
    4099 tp = np; /* terminator pointer */
    4100 FIND_WHITESPACE(tp); 4101 if (*tp)
    4102 *tp = 0; /ftpsrvr.cpp: 3774 in ctrl_thread(void *)()
    3768 tp = p; /* terminator pointer */
    3769 FIND_WHITESPACE(tp);
    3770 if (*tp)
    3771 *tp = 0;
    3772
    3773 np = tp + 1; /* filename pointer */
    &gt;&gt;&gt; CID 643133: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*np == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    3774 SKIP_WHITESPACE(np);
    3775
    3776 tp = np; /* terminator pointer */
    3777 FIND_WHITESPACE(tp);
    3778 if (*tp)
    3779 *tp = 0;

    ** CID 643132: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 1560 in ftpalias(char *, char *, user_t *, client_t *, int *)()
    /ftpsrvr.cpp: 1549 in ftpalias(char *, char *, user_t *, client_t *, int *)()


    _____________________________________________________________________________________________
    *** CID 643132: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 1560 in ftpalias(char *, char *, user_t *, client_t *, int *)()
    1554 continue;
    1555
    1556 p = tp + 1; /* filename */
    1557 SKIP_WHITESPACE(p);
    1558
    1559 tp = p; /* terminator */
    &gt;&gt;&gt; CID 643132: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*tp == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    1560 FIND_WHITESPACE(tp);
    1561 if (*tp)
    1562 *tp = 0;
    1563
    1564 if (filename == NULL /* CWD? */ &amp;&amp; (*lastchar(p) != &#39;/&#39; || (*fname != 0 &amp;&amp; strcmp(fname, alias)))) {
    1565 fclose(fp);
    /ftpsrvr.cpp: 1549 in ftpalias(char *, char *, user_t *, client_t *, int *)()
    1543 p = line; /* alias */
    1544 SKIP_WHITESPACE(p);
    1545 if (*p == &#39;;&#39;) /* comment */
    1546 continue;
    1547
    1548 tp = p; /* terminator */
    &gt;&gt;&gt; CID 643132: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*tp == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    1549 FIND_WHITESPACE(tp);
    1550 if (*tp)
    1551 *tp = 0;
    1552
    1553 if (stricmp(p, alias)) /* Not a match */
    1554 continue;

    ** CID 643131: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 3769 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 3777 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 4100 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 4092 in ctrl_thread(void *)()
    /ftpsrvr.cpp: 4468 in ctrl_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 643131: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.cpp: 3769 in ctrl_thread(void *)()
    3763 SKIP_WHITESPACE(p);
    3764
    3765 if (*p == &#39;;&#39;) /* comment */
    3766 continue;
    3767
    3768 tp = p; /* terminator pointer */
    &gt;&gt;&gt; CID 643131: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*tp == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    3769 FIND_WHITESPACE(tp);
    3770 if (*tp)
    3771 *tp = 0;
    3772
    3773 np = tp + 1; /* filename pointer */
    3774 SKIP_WHITESPACE(np);
    /ftpsrvr.cpp: 3777 in ctrl_thread(void *)()
    3771 *tp = 0;
    3772
    3773 np = tp + 1; /* filename pointer */
    3774 SKIP_WHITESPACE(np);
    3775
    3776 tp = np; /* terminator pointer */
    &gt;&gt;&gt; CID 643131: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*tp == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    3777 FIND_WHITESPACE(tp);
    3778 if (*tp)
    3779 *tp = 0;
    3780
    3781 dp = tp + 1; /* description pointer */
    3782 SKIP_WHITESPACE(dp);
    /ftpsrvr.cpp: 4100 in ctrl_thread(void *)()
    4094 *tp = 0;
    4095
    4096 np = tp + 1; /* filename pointer */
    4097 SKIP_WHITESPACE(np); 4098
    4099 tp = np; /* terminator pointer */
    &gt;&gt;&gt; CID 643131: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*tp == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    4100 FIND_WHITESPACE(tp); 4101 if (*tp)
    4102 *tp = 0;
    4103
    4104 dp = tp + 1; /* description pointer */
    4105 SKIP_WHITESPACE(dp); /ftpsrvr.cpp: 4092 in ctrl_thread(void *)()
    4086 SKIP_WHITESPACE(p); 4087
    4088 if (*p == &#39;;&#39;) /* comment */
    4089 continue;
    4090
    4091 tp = p; /* terminator pointer */
    &gt;&gt;&gt; CID 643131: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*tp == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    4092 FIND_WHITESPACE(tp); 4093 if (*tp)
    4094 *tp = 0;
    4095
    4096 np = tp + 1; /* filename pointer */
    4097 SKIP_WHITESPACE(np); /ftpsrvr.cpp: 4468 in ctrl_thread(void *)()
    4462 SKIP_WHITESPACE(p);
    4463
    4464 if (*p == &#39;;&#39;) /* comment */
    4465 continue;
    4466
    4467 tp = p; /* terminator pointer */
    &gt;&gt;&gt; CID 643131: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;(unsigned char)*tp == CP437_NO_BREAK_SPACE&quot; is always false regardless of the values of its operands. This occurs as the logical second operand of &quot;||&quot;.
    4468 FIND_WHITESPACE(tp);
    4469 if (*tp)
    4470 *tp = 0;
    4471
    4472 np = tp + 1; /* filename pointer */
    4473 SKIP_WHITESPACE(np);

    ** CID 643130: Error handling issues (CHECKED_RETURN)
    /ftpsrvr.cpp: 929 in receive_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 643130: Error handling issues (CHECKED_RETURN)
    /ftpsrvr.cpp: 929 in receive_thread(void *)()
    923
    924 *xfer.aborted = FALSE;
    925 if (xfer.filepos || startup-&gt;options &amp; FTP_OPT_DEBUG_DATA)
    926 lprintf(LOG_DEBUG, &quot;%04d &lt;%s&gt; DATA socket %d receiving %s from offset %&quot; PRIdOFF
    927 , xfer.ctrl_sock, xfer.user-&gt;alias, *xfer.data_sock, xfer.filename, xfer.filepos);
    928
    &gt;&gt;&gt; CID 643130: Error handling issues (CHECKED_RETURN) &gt;&gt;&gt; Calling &quot;fseeko(fp, xfer.filepos, 0)&quot; without checking return value. This library function may fail and return an error code.
    929 fseeko(fp, xfer.filepos, SEEK_SET);
    930
    931 // Determine the maximum file size to allow, accounting for minimum free space
    932 char path[MAX_PATH + 1];
    933 SAFECOPY(path, xfer.filename);
    934 *getfname(path) = &#39;\0&#39;;

    ** CID 643129: (Y2K38_SAFETY)
    /mailsrvr.cpp: 6497 in mail_server()
    /mailsrvr.cpp: 6496 in mail_server()


    _____________________________________________________________________________________________
    *** CID 643129: (Y2K38_SAFETY)
    /mailsrvr.cpp: 6497 in mail_server()
    6491 std::string most_active = request_rate_limiter-&gt;most_active(&amp;most_active_count);
    6492 char tmp[128], tmp2[128];
    6493 snprintf(str, sizeof str, &quot;Rate limiting current; clients=%zu, requests=%zu, most-active=%s (%zu), highest: %s (%u) on %s, limited: %u, last: %s on %s&quot;
    6494 , request_rate_limiter-&gt;client_count(), request_rate_limiter-&gt;total(), most_active.c_str(), most_active_count
    6495 , request_rate_limiter-&gt;currHighwater.client.c_str(), request_rate_limiter-&gt;currHighwater.count
    6496 , timestr(&amp;scfg, (time32_t)request_rate_limiter-&gt;currHighwater.time, tmp), request_rate_limiter-&gt;disallowed.load()
    &gt;&gt;&gt; CID 643129: (Y2K38_SAFETY)
    &gt;&gt;&gt; A &quot;time_t&quot; value is stored in an integer with too few bits to accommodate it. The expression &quot;request_rate_limiter-&gt;lastLimited.time&quot; is cast to &quot;time32_t&quot;.
    6497 , request_rate_limiter-&gt;lastLimited.client.c_str(), timestr(&amp;scfg, (time32_t)request_rate_limiter-&gt;lastLimited.time, tmp2));
    6498 if (strcmp(str, rate_limit_report) != 0) {
    6499 SAFECOPY(rate_limit_report, str);
    6500 lprintf(LOG_DEBUG, &quot;%s&quot;, rate_limit_report);
    6501 }
    6502 }
    /mailsrvr.cpp: 6496 in mail_server()
    6490 size_t most_active_count = 0;
    6491 std::string most_active = request_rate_limiter-&gt;most_active(&amp;most_active_count);
    6492 char tmp[128], tmp2[128];
    6493 snprintf(str, sizeof str, &quot;Rate limiting current; clients=%zu, requests=%zu, most-active=%s (%zu), highest: %s (%u) on %s, limited: %u, last: %s on %s&quot;
    6494 , request_rate_limiter-&gt;client_count(), request_rate_limiter-&gt;total(), most_active.c_str(), most_active_count
    6495 , request_rate_limiter-&gt;currHighwater.client.c_str(), request_rate_limiter-&gt;currHighwater.count
    &gt;&gt;&gt; CID 643129: (Y2K38_SAFETY)
    &gt;&gt;&gt; A &quot;time_t&quot; value is stored in an integer with too few bits to accommodate it. The expression &quot;request_rate_limiter-&gt;currHighwater.time&quot; is cast to &quot;time32_t&quot;.
    6496 , timestr(&amp;scfg, (time32_t)request_rate_limiter-&gt;currHighwater.time, tmp), request_rate_limiter-&gt;disallowed.load()
    6497 , request_rate_limiter-&gt;lastLimited.client.c_str(), timestr(&amp;scfg, (time32_t)request_rate_limiter-&gt;lastLimited.time, tmp2));
    6498 if (strcmp(str, rate_limit_report) != 0) {
    6499 SAFECOPY(rate_limit_report, str);
    6500 lprintf(LOG_DEBUG, &quot;%s&quot;, rate_limit_report);
    6501 }

    </pre>

    <p>
    <a href="https://scan.coverity.com/projects/synchronet?tab=overview" class="button">View Defects in Coverity Scan</a>
    </p>

    <p>Best regards,</p>
    <p>The Coverity Scan Admin Team</p>
    <img class="logo" width="140" src="https://scan.coverity.com/assets/BlackDuckLogo-6697adc63e07340464201a2ad534d3d3e44f95d36edda20b140440d34f05372f.svg" />
    </body>
    </html>
    ----==_mimepart_698f2d096fc4c_11e62b0ff68619ac1976e--

    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From scan-admin@coverity.com@1:103/705 to All on Tue Feb 17 13:48:48 2026

    ----==_mimepart_699471c04eaa2_41c9e2b0ff68619ac19769
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit

    Hi,

    Please find the latest report on new defect(s) introduced to Synchronet found with Coverity Scan.

    1 new defect(s) introduced to Synchronet found with Coverity Scan.


    New defect(s) Reported-by: Coverity Scan
    Showing 1 of 1 defect(s)


    ** CID 644193: Memory - corruptions (REVERSE_NEGATIVE)
    /websrvr.cpp: 1186 in close_request(http_session_t *)()


    _____________________________________________________________________________________________
    *** CID 644193: Memory - corruptions (REVERSE_NEGATIVE)
    /websrvr.cpp: 1186 in close_request(http_session_t *)()
    1180 * This causes all active http_session_threads to terminate. 1181 */
    1182 if ((!session->req.keep_alive) || terminate_server) {
    1183 drain_outbuf(session);
    1184 close_session_socket(session);
    1185 }
    CID 644193: Memory - corruptions (REVERSE_NEGATIVE)
    You might be using variable "session->socket" before verifying that it is >= 0.
    1186 if (session->socket == INVALID_SOCKET)
    1187 session->finished = true;
    1188
    1189 if (session->js_cx != NULL && (session->req.dynamic == IS_SSJS)) {
    1190 JS_BEGINREQUEST(session->js_cx);
    1191 JS_GC(session->js_cx);


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/synchronet?tab=overview


    ----==_mimepart_699471c04eaa2_41c9e2b0ff68619ac19769
    Content-Type: text/html; charset=us-ascii
    Content-Transfer-Encoding: 7bit

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>New Defects Reported - Synchronet</title>
    <style>
    body { font-family: Arial, sans-serif; color: #222; line-height: 1.6; }
    .button {
    display: inline-block;
    padding: 10px 20px;
    margin: 20px 0;
    font-size: 16px;
    color: #fff !important;
    background-color: #0056b3;
    text-decoration: none;
    border-radius: 5px;
    }
    pre {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    overflow-x: auto;
    }
    </style>
    </head>
    <body>
    <p>Hi,</p>

    <p>
    Please find the latest report on new defect(s) introduced to <strong>Synchronet</strong>
    found with Coverity Scan.
    </p>

    <ul>
    <li><strong>New Defects Found:</strong> 1</li>
    <li><strong>Defects Shown:</strong> Showing 1 of 1 defect(s)</li>
    </ul>

    <h3>Defect Details</h3>
    <pre>
    ** CID 644193: Memory - corruptions (REVERSE_NEGATIVE)
    /websrvr.cpp: 1186 in close_request(http_session_t *)()


    _____________________________________________________________________________________________
    *** CID 644193: Memory - corruptions (REVERSE_NEGATIVE)
    /websrvr.cpp: 1186 in close_request(http_session_t *)()
    1180 * This causes all active http_session_threads to terminate. 1181 */
    1182 if ((!session-&gt;req.keep_alive) || terminate_server) {
    1183 drain_outbuf(session);
    1184 close_session_socket(session);
    1185 }
    &gt;&gt;&gt; CID 644193: Memory - corruptions (REVERSE_NEGATIVE) &gt;&gt;&gt; You might be using variable &quot;session-&gt;socket&quot; before verifying that it is &gt;= 0.
    1186 if (session-&gt;socket == INVALID_SOCKET)
    1187 session-&gt;finished = true;
    1188
    1189 if (session-&gt;js_cx != NULL &amp;&amp; (session-&gt;req.dynamic == IS_SSJS)) {
    1190 JS_BEGINREQUEST(session-&gt;js_cx);
    1191 JS_GC(session-&gt;js_cx);

    </pre>

    <p>
    <a href="https://scan.coverity.com/projects/synchronet?tab=overview" class="button">View Defects in Coverity Scan</a>
    </p>

    <p>Best regards,</p>
    <p>The Coverity Scan Admin Team</p>
    <img class="logo" width="140" src="https://scan.coverity.com/assets/BlackDuckLogo-6697adc63e07340464201a2ad534d3d3e44f95d36edda20b140440d34f05372f.svg" />
    </body>
    </html>
    ----==_mimepart_699471c04eaa2_41c9e2b0ff68619ac19769--

    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From scan-admin@coverity.com@1:103/705 to All on Wed Feb 18 13:50:52 2026

    ----==_mimepart_6995c3bce9f7_51bf02b0ff68619ac19798
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit

    Hi,

    Please find the latest report on new defect(s) introduced to Synchronet found with Coverity Scan.

    2 new defect(s) introduced to Synchronet found with Coverity Scan.


    New defect(s) Reported-by: Coverity Scan
    Showing 2 of 2 defect(s)


    ** CID 644273: Resource leaks (RESOURCE_LEAK)
    /js_console.cpp: 422 in js_console_set(JSContext *, JSObject *, long, int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 644273: Resource leaks (RESOURCE_LEAK)
    /js_console.cpp: 422 in js_console_set(JSContext *, JSObject *, long, int, unsigned long *)()
    416 break;
    417
    418 default:
    419 return JS_TRUE;
    420 }
    421
    CID 644273: Resource leaks (RESOURCE_LEAK)
    Variable "sval" going out of scope leaks the storage it points to.
    422 return JS_TRUE;
    423 }
    424
    425 #define CON_PROP_FLAGS JSPROP_ENUMERATE
    426
    427 static jsSyncPropertySpec js_console_properties[] = {

    ** CID 644272: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)


    _____________________________________________________________________________________________
    *** CID 644272: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /con_hi.cpp: 61 in sbbs_t::uselect(bool, unsigned int, const char *, const char *, const unsigned char *)()
    55 if (add) {
    56 if (name == nullptr)
    57 return -1;
    58 if (ar != nullptr && !chk_ar(ar, &useron, &client))
    59 return 0;
    60 uselect_item item = { name, num };
    CID 644272: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "item" is copied and then passed-by-reference as parameter to STL insertion function "std::vector<sbbs_t::uselect_item, std::allocator<sbbs_t::uselect_item> >::push_back(std::vector<sbbs_t::uselect_item, std::allocator<sbbs_t::uselect_item> >::value_type const &)", when it could be moved instead.
    61 uselect_items.push_back(item);
    62 return 0;
    63 }
    64
    65 if (uselect_items.size() < 1)
    66 return -1;


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/synchronet?tab=overview


    ----==_mimepart_6995c3bce9f7_51bf02b0ff68619ac19798
    Content-Type: text/html; charset=us-ascii
    Content-Transfer-Encoding: 7bit

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>New Defects Reported - Synchronet</title>
    <style>
    body { font-family: Arial, sans-serif; color: #222; line-height: 1.6; }
    .button {
    display: inline-block;
    padding: 10px 20px;
    margin: 20px 0;
    font-size: 16px;
    color: #fff !important;
    background-color: #0056b3;
    text-decoration: none;
    border-radius: 5px;
    }
    pre {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    overflow-x: auto;
    }
    </style>
    </head>
    <body>
    <p>Hi,</p>

    <p>
    Please find the latest report on new defect(s) introduced to <strong>Synchronet</strong>
    found with Coverity Scan.
    </p>

    <ul>
    <li><strong>New Defects Found:</strong> 2</li>
    <li><strong>Defects Shown:</strong> Showing 2 of 2 defect(s)</li>
    </ul>

    <h3>Defect Details</h3>
    <pre>
    ** CID 644273: Resource leaks (RESOURCE_LEAK)
    /js_console.cpp: 422 in js_console_set(JSContext *, JSObject *, long, int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 644273: Resource leaks (RESOURCE_LEAK)
    /js_console.cpp: 422 in js_console_set(JSContext *, JSObject *, long, int, unsigned long *)()
    416 break;
    417
    418 default:
    419 return JS_TRUE;
    420 }
    421
    &gt;&gt;&gt; CID 644273: Resource leaks (RESOURCE_LEAK) &gt;&gt;&gt; Variable &quot;sval&quot; going out of scope leaks the storage it points to.
    422 return JS_TRUE;
    423 }
    424
    425 #define CON_PROP_FLAGS JSPROP_ENUMERATE
    426
    427 static jsSyncPropertySpec js_console_properties[] = {

    ** CID 644272: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)


    _____________________________________________________________________________________________
    *** CID 644272: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /con_hi.cpp: 61 in sbbs_t::uselect(bool, unsigned int, const char *, const char *, const unsigned char *)()
    55 if (add) {
    56 if (name == nullptr)
    57 return -1;
    58 if (ar != nullptr &amp;&amp; !chk_ar(ar, &amp;useron, &amp;client))
    59 return 0;
    60 uselect_item item = { name, num };
    &gt;&gt;&gt; CID 644272: Performance inefficiencies (COPY_INSTEAD_OF_MOVE)
    &gt;&gt;&gt; &quot;item&quot; is copied and then passed-by-reference as parameter to STL insertion function &quot;std::vector&lt;sbbs_t::uselect_item, std::allocator&lt;sbbs_t::uselect_item&gt; &gt;::push_back(std::vector&lt;sbbs_t::uselect_item, std::allocator&lt;sbbs_t::uselect_item&gt; &gt;::value_type const &amp;)&quot;, when it could be moved instead.
    61 uselect_items.push_back(item);
    62 return 0;
    63 }
    64
    65 if (uselect_items.size() &lt; 1)
    66 return -1;

    </pre>

    <p>
    <a href="https://scan.coverity.com/projects/synchronet?tab=overview" class="button">View Defects in Coverity Scan</a>
    </p>

    <p>Best regards,</p>
    <p>The Coverity Scan Admin Team</p>
    <img class="logo" width="140" src="https://scan.coverity.com/assets/BlackDuckLogo-6697adc63e07340464201a2ad534d3d3e44f95d36edda20b140440d34f05372f.svg" />
    </body>
    </html>
    ----==_mimepart_6995c3bce9f7_51bf02b0ff68619ac19798--

    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)