• New Defects reported by Coverity Scan for Synchronet

    From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Mon Jan 20 16:22:38 2025
    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.
    3 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 530902: (CHECKED_RETURN)
    /useredit.cpp: 745 in sbbs_t::user_config(user_t *)()
    /useredit.cpp: 740 in sbbs_t::user_config(user_t *)()


    ________________________________________________________________________________________________________
    *** CID 530902: (CHECKED_RETURN)
    /useredit.cpp: 745 in sbbs_t::user_config(user_t *)()
    739 exec_bin(cmdline, &main_csi);
    740 getuserdat(&cfg, user);
    741 return;
    742 }
    743 while (online) {
    744 CLS;
    CID 530902: (CHECKED_RETURN)
    Calling "getuserdat" without checking return value (as is done elsewhere 83 out of 98 times).
    745 getuserdat(&cfg, user);
    746 bprintf(text[UserDefaultsHdr], user->alias, user->number);
    747 if (user == &useron) {
    748 update_nodeterm();
    749 load_user_text();
    750 }
    /useredit.cpp: 740 in sbbs_t::user_config(user_t *)()
    734
    735 action = NODE_DFLT;
    736 if (cfg.usercfg_mod[0]) {
    737 char cmdline[256];
    738 snprintf(cmdline, sizeof(cmdline), "%s %u", cfg.usercfg_mod, user->number);
    739 exec_bin(cmdline, &main_csi);
    CID 530902: (CHECKED_RETURN)
    Calling "getuserdat" without checking return value (as is done elsewhere 83 out of 98 times).
    740 getuserdat(&cfg, user);
    741 return;
    742 }
    743 while (online) {
    744 CLS;
    745 getuserdat(&cfg, user);


    ________________________________________________________________________________________________________
    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 All on Fri Jan 24 14:15:30 2025
    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 531895: Integer handling issues (INTEGER_OVERFLOW) /tmp/sbbs-Jan-24-2025/src/conio/bitmap_con.c: 783 in draw_char_row_slow()


    ________________________________________________________________________________________________________
    *** CID 531895: Integer handling issues (INTEGER_OVERFLOW) /tmp/sbbs-Jan-24-2025/src/conio/bitmap_con.c: 783 in draw_char_row_slow()
    777
    778 uint8_t fb = cs->font[cs->fontoffset];
    779 for(unsigned x = 0; x < vstat.charwidth; x++) {
    780 unsigned bitnum = x & 0x07;
    781 if (bs->expand && x == bs->font_data_width) {
    782 if (cs->gexpand)
    CID 531895: Integer handling issues (INTEGER_OVERFLOW)
    Expression "x - 1U", where "x" is known to be equal to 0, underflows the type of "x - 1U", which is type "unsigned int".
    783 fbb = cs->font[cs->fontoffset - 1] & (0x80 >> ((x - 1) & 7));
    784 else
    785 fbb = 0;
    786 }
    787 else {
    788 if (bitnum == 0 && x != 0) {


    ________________________________________________________________________________________________________
    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 All on Sun Jan 26 15:12:28 2025
    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.
    2 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 531919: Integer handling issues (INTEGER_OVERFLOW) /tmp/sbbs-Jan-26-2025/src/xpdev/named_str_list.c: 43 in namedStrListDelete()


    ________________________________________________________________________________________________________
    *** CID 531919: Integer handling issues (INTEGER_OVERFLOW) /tmp/sbbs-Jan-26-2025/src/xpdev/named_str_list.c: 43 in namedStrListDelete()
    37 size_t count;
    38 named_string_t *old;
    39 named_string_t **newlist;
    40
    41 COUNT_LIST_ITEMS(*list, count);
    42 if (index == NAMED_STR_LIST_LAST_INDEX)
    CID 531919: Integer handling issues (INTEGER_OVERFLOW)
    Expression "count - 1UL", where "count" is known to be equal to 0, underflows the type of "count - 1UL", which is type "unsigned long".
    43 index = count - 1;
    44 if (index >= count)
    45 return false;
    46 newlist = (named_string_t **)realloc(*list, (count + 1) * sizeof(named_string_t*));
    47 if (newlist != NULL)
    48 *list = newlist;


    ________________________________________________________________________________________________________
    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 All on Sat Feb 1 13:42:14 2025
    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 532317: Error handling issues (CHECKED_RETURN)
    /js_socket.c: 2380 in js_socket_set()


    ________________________________________________________________________________________________________
    *** CID 532317: Error handling issues (CHECKED_RETURN)
    /js_socket.c: 2380 in js_socket_set()
    2374 size_t key_sz;
    2375 JS_IdToValue(cx, ids->vector[k], &js_id);
    2376 id = NULL;
    2377 JSVALUE_TO_MSTRING(cx, js_id, id, &id_sz);
    2378 if (id != NULL) {
    2379 if (!JS_IsExceptionPending(cx)) {
    CID 532317: Error handling issues (CHECKED_RETURN)
    Calling "JS_GetProperty" without checking return value (as is done elsewhere 196 out of 203 times).
    2380 JS_GetProperty(cx, p->tls_psk, id, &js_key);
    2381 JSVALUE_TO_MSTRING(cx, js_key, key, &key_sz);
    2382 if (key != NULL) {
    2383 if (!JS_IsExceptionPending(cx)) {
    2384 if (do_cryptAttributeString(p->session, CRYPT_SESSINFO_USERNAME, id, id_sz) == CRYPT_OK)
    2385 do_cryptAttributeString(p->session, CRYPT_SESSINFO_PASSWORD, key, key_sz);


    ________________________________________________________________________________________________________
    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