• New Defects reported by Coverity Scan for Synchronet

    From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Wednesday, March 11, 2026 13:28:10
    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 644869: Code maintainability issues (UNUSED_VALUE)
    /main.cpp: 5548 in bbs_thread()


    _____________________________________________________________________________________________
    *** CID 644869: Code maintainability issues (UNUSED_VALUE)
    /main.cpp: 5548 in bbs_thread()
    5542 client_socket = xpms_accept(ts_set, &client_addr
    5543 , &client_addr_len, startup->sem_chk_freq * 1000, (startup->options & BBS_OPT_HAPROXY_PROTO) ? XPMS_ACCEPT_FLAG_HAPROXY : XPMS_FLAGS_NONE, &ts_cb);
    5544
    5545 if (terminate_server) { /* terminated */
    5546 if (client_socket != INVALID_SOCKET) 5547 close_socket(client_socket); >>> CID 644869: Code maintainability issues (UNUSED_VALUE)
    Assigning value "-1" to "client_socket" here, but that stored value is overwritten before it can be used.
    5548 client_socket = INVALID_SOCKET;
    5549 break;
    5550 }
    5551
    5552 if ((p = semfile_list_check(&initialized, clear_attempts_semfiles)) != NULL) {
    5553 lprintf(LOG_INFO, "Clear Failed Login Attempts semaphore file (%s) detected", p);


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



    ---
    * Synchronet * Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Friday, March 13, 2026 13:00:05
    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 644892: Resource leaks (RESOURCE_LEAK)
    /smbutil.c: 836 in maint()


    _____________________________________________________________________________________________
    *** CID 644892: Resource leaks (RESOURCE_LEAK)
    /smbutil.c: 836 in maint()
    830 l = fread(idxbuf, idxreclen, smb.status.total_msgs, smb.sid_fp);
    831
    832 printf("\nDone.\n\n");
    833 printf("Scanning for pre-flagged messages...\n");
    834 for (m = 0; m < l; m++) {
    835 if (terminated)
    CID 644892: Resource leaks (RESOURCE_LEAK)
    Variable "idxbuf" going out of scope leaks the storage it points to. 836 return;
    837 idx = (idxrec_t*)(idxbuf + (m * idxreclen));
    838 // printf("\r%2lu%%",m ? (long)(100.0/((float)l/m)) : 0); 839 if (idx->attr & MSG_DELETE)
    840 flagged++;
    841 }


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



    ---
    * Synchronet * Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net