• New Defects reported by Coverity Scan for Synchronet

    From scan-admin@coverity.com@1:103/705 to cov-scan@synchro.net on Thu Jul 23 12:50:43 2026

    ----==_mimepart_6a620e22ad580_52bcf2cbc189f39a89368
    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 651667: (INTEGER_OVERFLOW)
    /main.cpp: 2844 in output_thread(void *)()
    /main.cpp: 2806 in output_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 651667: (INTEGER_OVERFLOW)
    /main.cpp: 2844 in output_thread(void *)()
    2838 int result = mqtt_pub_message(&mqtt, TOPIC_BBS, spy_topic, buf + bufbot, i, /* retain: */ false);
    2839 if (result != MQTT_SUCCESS)
    2840 lprintf(LOG_WARNING, "%s ERROR %d (%d) publishing node output (%u bytes): %s"
    2841 , node, result, errno, i, spy_topic);
    2842 }
    2843 if (spy_socket[sbbs->cfg.node_num - 1] != INVALID_SOCKET)
    CID 651667: (INTEGER_OVERFLOW)
    "i", which might have underflowed, is passed to "send(spy_socket[sbbs->cfg.node_num - 1], (char *)buf + bufbot, i, 0)".
    2844 if (sendsocket(spy_socket[sbbs->cfg.node_num - 1], (char*)buf + bufbot, i) != i && SOCKET_ERRNO != EPIPE)
    2845 errprintf(LOG_ERR, WHERE, "%s ERROR %d writing to spy socket", node, SOCKET_ERRNO);
    2846 #ifdef __unix__
    2847 if (uspy_socket[sbbs->cfg.node_num - 1] != INVALID_SOCKET)
    2848 if (sendsocket(uspy_socket[sbbs->cfg.node_num - 1], (char*)buf + bufbot, i) != i)
    2849 errprintf(LOG_ERR, WHERE, "%s ERROR %d writing to UNIX spy socket", node, SOCKET_ERRNO);
    /main.cpp: 2806 in output_thread(void *)()
    2800 }
    2801 }
    2802 pthread_mutex_unlock(&sbbs->ssh_mutex);
    2803 }
    2804 else
    2805 #endif
    CID 651667: (INTEGER_OVERFLOW)
    "sendbytes", which might have underflowed, is passed to "send(sbbs->client_socket.operator std::__atomic_base<int>::__int_type(), (char *)buf + bufbot, sendbytes, 0)".
    2806 i = sendsocket(sbbs->client_socket, (char*)buf + bufbot, sendbytes);
    2807 if (i == SOCKET_ERROR) {
    2808 SOCKET sock = sbbs->client_socket.load();
    2809 if (SOCKET_ERRNO == ENOTSOCK)
    2810 lprintf(LOG_NOTICE, "%04d %s [%s] client socket closed on send", sock, sbbs->client.protocol, sbbs->client_ipaddr);
    2811 else if (SOCKET_ERRNO == ECONNRESET)


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


    ----==_mimepart_6a620e22ad580_52bcf2cbc189f39a89368
    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 651667: (INTEGER_OVERFLOW)
    /main.cpp: 2844 in output_thread(void *)()
    /main.cpp: 2806 in output_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 651667: (INTEGER_OVERFLOW)
    /main.cpp: 2844 in output_thread(void *)()
    2838 int result = mqtt_pub_message(&amp;mqtt, TOPIC_BBS, spy_topic, buf + bufbot, i, /* retain: */ false);
    2839 if (result != MQTT_SUCCESS)
    2840 lprintf(LOG_WARNING, &quot;%s ERROR %d (%d) publishing node output (%u bytes): %s&quot;
    2841 , node, result, errno, i, spy_topic);
    2842 }
    2843 if (spy_socket[sbbs-&gt;cfg.node_num - 1] != INVALID_SOCKET)
    &gt;&gt;&gt; CID 651667: (INTEGER_OVERFLOW)
    &gt;&gt;&gt; &quot;i&quot;, which might have underflowed, is passed to &quot;send(spy_socket[sbbs-&gt;cfg.node_num - 1], (char *)buf + bufbot, i, 0)&quot;.
    2844 if (sendsocket(spy_socket[sbbs-&gt;cfg.node_num - 1], (char*)buf + bufbot, i) != i &amp;&amp; SOCKET_ERRNO != EPIPE)
    2845 errprintf(LOG_ERR, WHERE, &quot;%s ERROR %d writing to spy socket&quot;, node, SOCKET_ERRNO);
    2846 #ifdef __unix__
    2847 if (uspy_socket[sbbs-&gt;cfg.node_num - 1] != INVALID_SOCKET)
    2848 if (sendsocket(uspy_socket[sbbs-&gt;cfg.node_num - 1], (char*)buf + bufbot, i) != i)
    2849 errprintf(LOG_ERR, WHERE, &quot;%s ERROR %d writing to UNIX spy socket&quot;, node, SOCKET_ERRNO);
    /main.cpp: 2806 in output_thread(void *)()
    2800 }
    2801 }
    2802 pthread_mutex_unlock(&amp;sbbs-&gt;ssh_mutex); 2803 }
    2804 else
    2805 #endif
    &gt;&gt;&gt; CID 651667: (INTEGER_OVERFLOW)
    &gt;&gt;&gt; &quot;sendbytes&quot;, which might have underflowed, is passed to &quot;send(sbbs-&gt;client_socket.operator std::__atomic_base&lt;int&gt;::__int_type(), (char *)buf + bufbot, sendbytes, 0)&quot;.
    2806 i = sendsocket(sbbs-&gt;client_socket, (char*)buf + bufbot, sendbytes);
    2807 if (i == SOCKET_ERROR) {
    2808 SOCKET sock = sbbs-&gt;client_socket.load(); 2809 if (SOCKET_ERRNO == ENOTSOCK)
    2810 lprintf(LOG_NOTICE, &quot;%04d %s [%s] client socket closed on send&quot;, sock, sbbs-&gt;client.protocol, sbbs-&gt;client_ipaddr);
    2811 else if (SOCKET_ERRNO == ECONNRESET)

    </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_6a620e22ad580_52bcf2cbc189f39a89368--

    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From scan-admin@coverity.com@1:103/705 to cov-scan@synchro.net on Tue Jul 28 21:16:18 2026

    ----==_mimepart_6a691c21b30db_ab3f32cbc189f39a8936c3
    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.
    1 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 1 of 1 defect(s)


    ** CID 651709: Resource leaks (RESOURCE_LEAK)
    /useredit.cpp: 108 in sbbs_t::useredit(int)()


    _____________________________________________________________________________________________
    *** CID 651709: Resource leaks (RESOURCE_LEAK)
    /useredit.cpp: 108 in sbbs_t::useredit(int)()
    102 if (user.comment[0] || i)
    103 bprintf(text[UeditCommentLine], i ? '+' : ' ' 104 , user.comment);
    105 else
    106 term->newline();
    107 if (localtime32(&user.laston, &tm) == NULL)
    CID 651709: Resource leaks (RESOURCE_LEAK)
    Variable "find_expr" going out of scope leaks the storage it points to. 108 return;
    109 bprintf(text[UserDates]
    110 , datestr(user.firston, str), datestr(user.expire, tmp)
    111 , datestr(user.laston, tmp2), tm.tm_hour, tm.tm_min);
    112
    113 bprintf(text[UserTimes]


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


    ----==_mimepart_6a691c21b30db_ab3f32cbc189f39a8936c3
    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>
    1 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 1 of 1 defect(s)</li>
    </ul>

    <h3>Defect Details</h3>
    <pre>
    ** CID 651709: Resource leaks (RESOURCE_LEAK)
    /useredit.cpp: 108 in sbbs_t::useredit(int)()


    _____________________________________________________________________________________________
    *** CID 651709: Resource leaks (RESOURCE_LEAK)
    /useredit.cpp: 108 in sbbs_t::useredit(int)()
    102 if (user.comment[0] || i)
    103 bprintf(text[UeditCommentLine], i ? &#39;+&#39; : &#39; &#39;
    104 , user.comment);
    105 else
    106 term-&gt;newline();
    107 if (localtime32(&amp;user.laston, &amp;tm) == NULL) &gt;&gt;&gt; CID 651709: Resource leaks (RESOURCE_LEAK) &gt;&gt;&gt; Variable &quot;find_expr&quot; going out of scope leaks the storage it points to.
    108 return;
    109 bprintf(text[UserDates]
    110 , datestr(user.firston, str), datestr(user.expire, tmp)
    111 , datestr(user.laston, tmp2), tm.tm_hour, tm.tm_min);
    112
    113 bprintf(text[UserTimes]

    </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_6a691c21b30db_ab3f32cbc189f39a8936c3--

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