• New Defects reported by Coverity Scan for Synchronet

    From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Saturday, May 06, 2023 12:39:53
    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 453600: (NULL_RETURNS)
    /tmp/sbbs-May-06-2023/src/conio/genmap.c: 88 in main() /tmp/sbbs-May-06-2023/src/conio/genmap.c: 89 in main() /tmp/sbbs-May-06-2023/src/conio/genmap.c: 69 in main() /tmp/sbbs-May-06-2023/src/conio/genmap.c: 78 in main()


    ________________________________________________________________________________________________________
    *** CID 453600: (NULL_RETURNS)
    /tmp/sbbs-May-06-2023/src/conio/genmap.c: 88 in main()
    82 "#include <inttypes.h>\n"
    83 "\n"
    84 "extern const uint32_t r2y[16777216];\n"
    85 "extern const uint32_t y2r[16777216];\n"
    86 "\n"
    87 "#endif\n");
    CID 453600: (NULL_RETURNS)
    Dereferencing a pointer that might be "NULL" "r" when calling "fwrite". 88 fwrite(r2y, 4, 1 << 24, r);
    89 fwrite(y2r, 4, 1 << 24, y);
    90 fclose(s);
    91 fclose(h);
    92 fclose(r);
    93 fclose(y);
    94 return 0;
    /tmp/sbbs-May-06-2023/src/conio/genmap.c: 89 in main()
    83 "\n"
    84 "extern const uint32_t r2y[16777216];\n"
    85 "extern const uint32_t y2r[16777216];\n"
    86 "\n"
    87 "#endif\n");
    88 fwrite(r2y, 4, 1 << 24, r);
    CID 453600: (NULL_RETURNS)
    Dereferencing a pointer that might be "NULL" "y" when calling "fwrite". 89 fwrite(y2r, 4, 1 << 24, y);
    90 fclose(s);
    91 fclose(h);
    92 fclose(r);
    93 fclose(y);
    94 return 0;
    /tmp/sbbs-May-06-2023/src/conio/genmap.c: 69 in main()
    63 char *mangle = "";
    64
    65 init_r2y();
    66 if (argc > 1 && strcmp(argv[1], "win32") == 0)
    67 mangle = "_";
    68
    CID 453600: (NULL_RETURNS)
    Dereferencing a pointer that might be "NULL" "s" when calling "fprintf". [Note: The source code implementation of the function has been overridden by a builtin model.]
    69 fprintf(s,
    70 ".section .rodata\n"
    71 ".global %sr2y\n"
    72 ".global %sy2r\n"
    73 ".align 4\n"
    74 "%sr2y:\n"
    /tmp/sbbs-May-06-2023/src/conio/genmap.c: 78 in main()
    72 ".global %sy2r\n"
    73 ".align 4\n"
    74 "%sr2y:\n"
    75 " .incbin \"r2y.bin\"\n"
    76 "%sy2r:\n"
    77 " .incbin \"y2r.bin\"\n", mangle, mangle, mangle, mangle);
    CID 453600: (NULL_RETURNS)
    Dereferencing a pointer that might be "NULL" "h" when calling "fprintf". [Note: The source code implementation of the function has been overridden by a builtin model.]
    78 fprintf(h,
    79 "#ifndef RGBMAP_H\n"
    80 "#define RGBMAP_H\n"
    81 "\n"
    82 "#include <inttypes.h>\n"
    83 "\n"


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4BbWTBf-2B-2Fi5ZUVF-2Fo-2B6flxo-3D2OWw_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrA5TNjzrU6Rq5Mo9xdbzDwsTpy-2Bb09EocMoAjAvUXI0dqN9FjhoAs2WQX-2BupKjspvk11pluxiTxKgTDHQAhwzsXbwAERPEnGsAxkUULs14dstkoKyyk63U-2FI43vTGDPDLB-2BN8f1fqC8LeCf2cycw746w3RIwm3fIqgqrnx-2F8Y8WZA-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Sunday, May 07, 2023 14:09:59
    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 453850: Memory - corruptions (OVERRUN)


    ________________________________________________________________________________________________________
    *** CID 453850: Memory - corruptions (OVERRUN)
    /main.cpp: 2135 in input_thread(void *)()
    2129 else
    2130 wrbuf=telnet_interpret(sbbs, inbuf, rd, telbuf, wr);
    2131 if(wr > (int)sizeof(telbuf))
    2132 lprintf(LOG_ERR,"!TELBUF OVERFLOW (%d>%d)",wr,(int)sizeof(telbuf));
    2133
    2134 if(!(sbbs->console & CON_RAW_IN))
    CID 453850: Memory - corruptions (OVERRUN)
    Overrunning buffer pointed to by "wrbuf" of 4000 bytes by passing it to a function which accesses it at byte offset 4000 using argument "wr" (which evaluates to 4001).
    2135 sbbs->translate_input(wrbuf, wr);
    2136
    2137 if(sbbs->passthru_socket_active == true) {
    2138 BOOL writable = FALSE;
    2139 if(socket_check(sbbs->passthru_socket, NULL, &writable, 1000) && writable)
    2140 (void)sendsocket(sbbs->passthru_socket, (char*)wrbuf, wr);

    ** CID 453849: (STRING_SIZE)
    /tmp/sbbs-May-07-2023/src/conio/genmap.c: 72 in main() /tmp/sbbs-May-07-2023/src/conio/genmap.c: 74 in main() /tmp/sbbs-May-07-2023/src/conio/genmap.c: 68 in main() /tmp/sbbs-May-07-2023/src/conio/genmap.c: 70 in main()


    ________________________________________________________________________________________________________
    *** CID 453849: (STRING_SIZE)
    /tmp/sbbs-May-07-2023/src/conio/genmap.c: 72 in main()
    66 return EXIT_FAILURE;
    67 }
    68 sprintf(path, "%s/rgbmap.s", argv[2]);
    69 s = fopen(path, "w");
    70 sprintf(path, "%s/rgbmap.h", argv[2]);
    71 h = fopen(path, "w");
    CID 453849: (STRING_SIZE)
    Passing string "argv[2]" of unknown size to "sprintf".
    72 sprintf(path, "%s/r2y.bin", argv[2]);
    73 r = fopen(path, "wb");
    74 sprintf(path, "%s/y2r.bin", argv[2]);
    75 y = fopen(path, "wb");
    76 init_r2y();
    77 if (argc > 1 && strcmp(argv[1], "win32") == 0) /tmp/sbbs-May-07-2023/src/conio/genmap.c: 74 in main()
    68 sprintf(path, "%s/rgbmap.s", argv[2]);
    69 s = fopen(path, "w");
    70 sprintf(path, "%s/rgbmap.h", argv[2]);
    71 h = fopen(path, "w");
    72 sprintf(path, "%s/r2y.bin", argv[2]);
    73 r = fopen(path, "wb");
    CID 453849: (STRING_SIZE)
    Passing string "argv[2]" of unknown size to "sprintf".
    74 sprintf(path, "%s/y2r.bin", argv[2]);
    75 y = fopen(path, "wb");
    76 init_r2y();
    77 if (argc > 1 && strcmp(argv[1], "win32") == 0)
    78 mangle = "_";
    79
    /tmp/sbbs-May-07-2023/src/conio/genmap.c: 68 in main()
    62 char *mangle = "";
    63
    64 if (argc != 3) {
    65 fprintf(stderr, "Usage: %s <os> <path>\n", argv[0]);
    66 return EXIT_FAILURE;
    67 }
    CID 453849: (STRING_SIZE)
    Passing string "argv[2]" of unknown size to "sprintf".
    68 sprintf(path, "%s/rgbmap.s", argv[2]);
    69 s = fopen(path, "w");
    70 sprintf(path, "%s/rgbmap.h", argv[2]);
    71 h = fopen(path, "w");
    72 sprintf(path, "%s/r2y.bin", argv[2]);
    73 r = fopen(path, "wb");
    /tmp/sbbs-May-07-2023/src/conio/genmap.c: 70 in main()
    64 if (argc != 3) {
    65 fprintf(stderr, "Usage: %s <os> <path>\n", argv[0]);
    66 return EXIT_FAILURE;
    67 }
    68 sprintf(path, "%s/rgbmap.s", argv[2]);
    69 s = fopen(path, "w");
    CID 453849: (STRING_SIZE)
    Passing string "argv[2]" of unknown size to "sprintf".
    70 sprintf(path, "%s/rgbmap.h", argv[2]);
    71 h = fopen(path, "w");
    72 sprintf(path, "%s/r2y.bin", argv[2]);
    73 r = fopen(path, "wb");
    74 sprintf(path, "%s/y2r.bin", argv[2]);
    75 y = fopen(path, "wb");

    ** CID 453848: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-May-07-2023/src/conio/x_events.c: 562 in video_init()


    ________________________________________________________________________________________________________
    *** CID 453848: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-May-07-2023/src/conio/x_events.c: 562 in video_init()
    556 if (x_cvstat.scaling < 1 || vstat.scaling < 1)
    557 x_cvstat.scaling = vstat.scaling = 1;
    558 pthread_mutex_unlock(&vstatlock);
    559 /* Initialize mode 3 (text, 80x25, 16 colors) */
    560 if(load_vmode(&vstat, ciolib_initial_mode))
    561 return(-1);
    CID 453848: Concurrent data access violations (MISSING_LOCK)
    Accessing "x_cvstat" without holding lock "vstatlock". Elsewhere, "x_cvstat" is accessed with "vstatlock" held 3 out of 4 times (1 of these accesses strongly imply that it is necessary).
    562 x_cvstat = vstat;
    563 if(init_window())
    564 return(-1);
    565 bitmap_drv_init(x11_drawrect, x11_flush);
    566 pthread_mutex_lock(&vstatlock);
    567 bitmap_drv_init_mode(vstat.mode, NULL, NULL, 0, 0);


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4BbWTBf-2B-2Fi5ZUVF-2Fo-2B6flxo-3DHCK2_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrCrnxZlR95qbad06mHzW16hipyALzV0mFuj3ay6pFxYR0eStfRzX4PFZA0tGWVeDEIjb6ggx0scvHBcaLMTSmWKTHh-2BY-2F-2FJXVJUS-2FMWWRke5EcHM57k-2F70xISfOM2XGn-2F4aK35uR43soY3XaxM-2BxoxpO-2BmFSex4uKhKezwAhOx42w-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Friday, May 12, 2023 12:39:17
    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.
    4 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 3 of 3 defect(s)


    ** CID 454698: Incorrect expression (IDENTICAL_BRANCHES) /tmp/sbbs-May-12-2023/src/conio/x_events.c: 336 in map_window()


    ________________________________________________________________________________________________________
    *** CID 454698: Incorrect expression (IDENTICAL_BRANCHES) /tmp/sbbs-May-12-2023/src/conio/x_events.c: 336 in map_window()
    330 }
    331
    332 bitmap_get_scaled_win_size(x_cvstat.scaling, &sh->base_width, &sh->base_height, 0, 0);
    333 bitmap_get_scaled_win_size(1.0, &sh->min_width, &sh->min_height, 0, 0);
    334 pthread_mutex_unlock(&vstatlock);
    335
    CID 454698: Incorrect expression (IDENTICAL_BRANCHES)
    The same code is executed regardless of whether "x_cvstat.aspect_width != 0 && x_cvstat.aspect_height != 0" is true, because the 'then' and 'else' branches are identical. Should one of the branches be modified, or the entire 'if' statement replaced?
    336 if (x_cvstat.aspect_width != 0 && x_cvstat.aspect_height != 0) {
    337 sh->min_aspect.x = sh->max_aspect.x = sh->min_width; 338 sh->min_aspect.y = sh->max_aspect.y = sh->min_height; 339 }
    340 else {
    341 sh->min_aspect.x = sh->max_aspect.x = sh->min_width;

    ** CID 454697: Program hangs (LOCK) /tmp/sbbs-May-12-2023/src/conio/x_events.c: 565 in video_init()


    ________________________________________________________________________________________________________
    *** CID 454697: Program hangs (LOCK) /tmp/sbbs-May-12-2023/src/conio/x_events.c: 565 in video_init()
    559 if (ciolib_initial_scaling != 0.0)
    560 x_cvstat.scaling = vstat.scaling = ciolib_initial_scaling;
    561 if (x_cvstat.scaling < 1.0 || vstat.scaling < 1.0)
    562 x_cvstat.scaling = vstat.scaling = 1;
    563 /* Initialize mode 3 (text, 80x25, 16 colors) */
    564 if(load_vmode(&vstat, ciolib_initial_mode))
    CID 454697: Program hangs (LOCK)
    Returning without unlocking "vstatlock".
    565 return(-1);
    566 x_cvstat = vstat;
    567 pthread_mutex_unlock(&vstatlock);
    568 if(init_window())
    569 return(-1);
    570 bitmap_drv_init(x11_drawrect, x11_flush);

    ** CID 454696: Control flow issues (UNREACHABLE) /tmp/sbbs-May-12-2023/src/conio/sdl_con.c: 346 in window_can_scale_internally()


    ________________________________________________________________________________________________________
    *** CID 454696: Control flow issues (UNREACHABLE) /tmp/sbbs-May-12-2023/src/conio/sdl_con.c: 346 in window_can_scale_internally() 340 {
    341 double ival;
    342 double fval = modf(vstat.scaling, &ival);
    343
    344 // TODO: Add toggle for software scaling
    345 return true;
    CID 454696: Control flow issues (UNREACHABLE)
    This code cannot be reached: "if (fval == 0.)
    return true;".
    346 if (fval == 0.0)
    347 return true;
    348 return false;
    349 }
    350
    351 static int sdl_init_mode(int mode, bool init)


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4BbWTBf-2B-2Fi5ZUVF-2Fo-2B6flxo-3DX8P7_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrCo7meCvjTSwgjNWxh8U4aDHxfQHmMxsciENSIBRXp67uLEWOz8jwu3lZFR4uCjFHkbCONAY52JqWDBe66S35SQOx1f4wXv2LsZa7IQA5vCXFuyr8zmKHpG3m8Wuig8iyc7ux-2BQD0YVshzWBetWEqE7uzFZr9D2LkWv7T-2FSd8bmyg-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Saturday, June 03, 2023 12:40:58
    Hi,

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

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


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


    ** CID 462165: Null pointer dereferences (FORWARD_NULL) /tmp/sbbs-Jun-03-2023/src/conio/x_events.c: 904 in local_draw_rect()


    ________________________________________________________________________________________________________
    *** CID 462165: Null pointer dereferences (FORWARD_NULL) /tmp/sbbs-Jun-03-2023/src/conio/x_events.c: 904 in local_draw_rect()
    898 x11.XFillRectangle(dpy, win, gc, 0, yoff, xoff, yoff + xim->height);
    899 x11.XFillRectangle(dpy, win, gc, xoff+xim->width, yoff, w, yoff + xim->height);
    900 x11.XFillRectangle(dpy, win, gc, 0, yoff + xim->height, w, h);
    901 }
    902 if (x_internal_scaling || xrender_found == false) {
    903 if (last == NULL)
    CID 462165: Null pointer dereferences (FORWARD_NULL)
    Dereferencing null pointer "source".
    904 x11.XPutImage(dpy, win, gc, xim, 0, 0, xoff, yoff, source->w, source->h);
    905 else {
    906 release_buffer(last);
    907 last = NULL;
    908 }
    909 }

    ** CID 462164: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Jun-03-2023/src/conio/sdl_con.c: 448 in internal_setwinsize()


    ________________________________________________________________________________________________________
    *** CID 462164: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Jun-03-2023/src/conio/sdl_con.c: 448 in internal_setwinsize()
    442 pthread_mutex_lock(&win_mutex);
    443 sdl.GetWindowSize(win, &w, &h);
    444 pthread_mutex_unlock(&win_mutex);
    445 if (w != vs->winwidth || h != vs->winheight)
    446 changed = true;
    447 pthread_mutex_unlock(&vstatlock);
    CID 462164: Concurrent data access violations (MISSING_LOCK)
    Accessing "vstat.scaling" without holding lock "vstatlock". Elsewhere, "video_stats.scaling" is accessed with "vstatlock" held 13 out of 18 times (1 of these accesses strongly imply that it is necessary).
    448 vstat.scaling = sdl_getscaling();
    449 }
    450 if (changed)
    451 setup_surfaces(vs);
    452 }
    453

    ** CID 462163: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Jun-03-2023/src/conio/sdl_con.c: 408 in update_cvstat()


    ________________________________________________________________________________________________________
    *** CID 462163: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Jun-03-2023/src/conio/sdl_con.c: 408 in update_cvstat()
    402 }
    403
    404 static void
    405 update_cvstat(struct video_stats *vs)
    406 {
    407 if (vs != NULL && vs != &vstat) {
    CID 462163: Concurrent data access violations (MISSING_LOCK)
    Accessing "vstat.scaling" without holding lock "vstatlock". Elsewhere, "video_stats.scaling" is accessed with "vstatlock" held 13 out of 18 times (1 of these accesses strongly imply that it is necessary).
    408 vstat.scaling = sdl_getscaling();
    409 pthread_mutex_lock(&vstatlock);
    410 *vs = vstat;
    411 pthread_mutex_unlock(&vstatlock);
    412 }
    413 }

    ** CID 462162: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Jun-03-2023/src/conio/sdl_con.c: 657 in setup_surfaces()


    ________________________________________________________________________________________________________
    *** CID 462162: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Jun-03-2023/src/conio/sdl_con.c: 657 in setup_surfaces()
    651 else if(sdl_init_good) {
    652 ev.type=SDL_QUIT;
    653 sdl_exitcode=1;
    654 sdl.PeepEvents(&ev, 1, SDL_ADDEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT);
    655 }
    656 pthread_mutex_unlock(&win_mutex);
    CID 462162: Concurrent data access violations (MISSING_LOCK)
    Accessing "vstat.scaling" without holding lock "vstatlock". Elsewhere, "video_stats.scaling" is accessed with "vstatlock" held 13 out of 18 times (1 of these accesses strongly imply that it is necessary).
    657 vstat.scaling = sdl_getscaling();
    658 }
    659
    660 /* Called from event thread only */
    661 static void sdl_add_key(unsigned int keyval, struct video_stats *vs) 662 {

    ** CID 462161: Null pointer dereferences (FORWARD_NULL) /tmp/sbbs-Jun-03-2023/src/conio/x_cio.c: 511 in x_init()


    ________________________________________________________________________________________________________
    *** CID 462161: Null pointer dereferences (FORWARD_NULL) /tmp/sbbs-Jun-03-2023/src/conio/x_cio.c: 511 in x_init()
    505 xp_dlclose(dl);
    506 return(-1);
    507 }
    508 #ifdef WITH_XRENDER
    509 xrender_found = true;
    510 if ((dl2 = xp_dlopen(libnames2,RTLD_LAZY,7)) == NULL) {
    CID 462161: Null pointer dereferences (FORWARD_NULL)
    Passing null pointer "dl2" to "dlclose", which dereferences it.
    511 xp_dlclose(dl2);
    512 xrender_found = false;
    513 }
    514 if (xrender_found && ((x11.XRenderFindStandardFormat = xp_dlsym(dl2, XRenderFindStandardFormat)) == NULL)) {
    515 xp_dlclose(dl);
    516 xrender_found = false;

    ** CID 462160: Null pointer dereferences (REVERSE_INULL) /tmp/sbbs-Jun-03-2023/src/conio/x_events.c: 589 in init_window()


    ________________________________________________________________________________________________________
    *** CID 462160: Null pointer dereferences (REVERSE_INULL) /tmp/sbbs-Jun-03-2023/src/conio/x_events.c: 589 in init_window()
    583 if (classhints) {
    584 classhints->res_name = (char *)ciolib_initial_program_name;
    585 classhints->res_class = (char *)ciolib_initial_program_class;
    586 }
    587 wmhints=x11.XAllocWMHints();
    588 wmhints->flags = 0;
    CID 462160: Null pointer dereferences (REVERSE_INULL)
    Null-checking "wmhints" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
    589 if(wmhints) {
    590 wmhints->initial_state=NormalState;
    591 wmhints->flags |= (StateHint | InputHint);
    592 wmhints->input = True;
    593 set_icon(ciolib_initial_icon, ciolib_initial_icon_width, wmhints);
    594 x11.XSetWMProperties(dpy, win, NULL, NULL, 0, 0, NULL, wmhints, classhints);

    ** CID 462159: (RESOURCE_LEAK)
    /tmp/sbbs-Jun-03-2023/src/conio/x_cio.c: 591 in x_init() /tmp/sbbs-Jun-03-2023/src/conio/x_cio.c: 552 in x_init() /tmp/sbbs-Jun-03-2023/src/conio/x_cio.c: 552 in x_init() /tmp/sbbs-Jun-03-2023/src/conio/x_cio.c: 557 in x_init() /tmp/sbbs-Jun-03-2023/src/conio/x_cio.c: 552 in x_init() /tmp/sbbs-Jun-03-2023/src/conio/x_cio.c: 563 in x_init() /tmp/sbbs-Jun-03-2023/src/conio/x_cio.c: 570 in x_init()


    ________________________________________________________________________________________________________
    *** CID 462159: (RESOURCE_LEAK)
    /tmp/sbbs-Jun-03-2023/src/conio/x_cio.c: 591 in x_init()
    585 xp_dlclose(dl);
    586 sem_destroy(&pastebuf_set);
    587 sem_destroy(&pastebuf_used);
    588 sem_destroy(&init_complete);
    589 sem_destroy(&mode_set);
    590 pthread_mutex_destroy(&copybuf_mutex);
    CID 462159: (RESOURCE_LEAK)
    Variable "dl2" going out of scope leaks the storage it points to.
    591 return(-1);
    592 }
    593 _beginthread(x11_mouse_thread,1<<16,NULL);
    594 cio_api.options |= CONIO_OPT_SET_TITLE | CONIO_OPT_SET_NAME | CONIO_OPT_SET_ICON;
    595 return(0);
    596 }
    /tmp/sbbs-Jun-03-2023/src/conio/x_cio.c: 552 in x_init()
    546 #endif
    547 setlocale(LC_ALL, "");
    548 x11.XSetLocaleModifiers("@im=none");
    549
    550 if(sem_init(&pastebuf_set, 0, 0)) {
    551 xp_dlclose(dl);
    CID 462159: (RESOURCE_LEAK)
    Variable "dl2" going out of scope leaks the storage it points to.
    552 return(-1);
    553 }
    554 if(sem_init(&pastebuf_used, 0, 0)) {
    555 xp_dlclose(dl);
    556 sem_destroy(&pastebuf_set);
    557 return(-1);
    /tmp/sbbs-Jun-03-2023/src/conio/x_cio.c: 552 in x_init()
    546 #endif
    547 setlocale(LC_ALL, "");
    548 x11.XSetLocaleModifiers("@im=none");
    549
    550 if(sem_init(&pastebuf_set, 0, 0)) {
    551 xp_dlclose(dl);
    CID 462159: (RESOURCE_LEAK)
    Variable "dl2" going out of scope leaks the storage it points to.
    552 return(-1);
    553 }
    554 if(sem_init(&pastebuf_used, 0, 0)) {
    555 xp_dlclose(dl);
    556 sem_destroy(&pastebuf_set);
    557 return(-1);
    /tmp/sbbs-Jun-03-2023/src/conio/x_cio.c: 557 in x_init()
    551 xp_dlclose(dl);
    552 return(-1);
    553 }
    554 if(sem_init(&pastebuf_used, 0, 0)) {
    555 xp_dlclose(dl);
    556 sem_destroy(&pastebuf_set);
    CID 462159: (RESOURCE_LEAK)
    Variable "dl2" going out of scope leaks the storage it points to.
    557 return(-1);
    558 }
    559 if(sem_init(&init_complete, 0, 0)) {
    560 xp_dlclose(dl);
    561 sem_destroy(&pastebuf_set);
    562 sem_destroy(&pastebuf_used); /tmp/sbbs-Jun-03-2023/src/conio/x_cio.c: 552 in x_init()
    546 #endif
    547 setlocale(LC_ALL, "");
    548 x11.XSetLocaleModifiers("@im=none");
    549
    550 if(sem_init(&pastebuf_set, 0, 0)) {
    551 xp_dlclose(dl);
    CID 462159: (RESOURCE_LEAK)
    Variable "dl2" going out of scope leaks the storage it points to.
    552 return(-1);
    553 }
    554 if(sem_init(&pastebuf_used, 0, 0)) {
    555 xp_dlclose(dl);
    556 sem_destroy(&pastebuf_set);
    557 return(-1);
    /tmp/sbbs-Jun-03-2023/src/conio/x_cio.c: 563 in x_init()
    557 return(-1);
    558 }
    559 if(sem_init(&init_complete, 0, 0)) {
    560 xp_dlclose(dl);
    561 sem_destroy(&pastebuf_set);
    562 sem_destroy(&pastebuf_used);
    CID 462159: (RESOURCE_LEAK)
    Variable "dl2" going out of scope leaks the storage it points to.
    563 return(-1);
    564 }
    565 if(sem_init(&mode_set, 0, 0)) {
    566 xp_dlclose(dl);
    567 sem_destroy(&pastebuf_set);
    568 sem_destroy(&pastebuf_used); /tmp/sbbs-Jun-03-2023/src/conio/x_cio.c: 570 in x_init()
    564 }
    565 if(sem_init(&mode_set, 0, 0)) {
    566 xp_dlclose(dl);
    567 sem_destroy(&pastebuf_set);
    568 sem_destroy(&pastebuf_used);
    569 sem_destroy(&init_complete);
    CID 462159: (RESOURCE_LEAK)
    Variable "dl2" going out of scope leaks the storage it points to.
    570 return(-1);
    571 }
    572
    573 if(pthread_mutex_init(&copybuf_mutex, 0)) {
    574 xp_dlclose(dl);
    575 sem_destroy(&pastebuf_set);


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4BbWTBf-2B-2Fi5ZUVF-2Fo-2B6flxo-3DIG4__g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrBPyDfdctenEpBqzGZNVHs42ttgLTzzOGVhZnCvXDhpCF9jzW-2Bs67lHgn4mRJqKpKp0lKywESuC-2B8aPwq-2BHoGo6NvVv2XtDxVwk0ttDNXD70ZWDHBkynCZQ-2FnfDOJmi8gjr3lodcSxrI82eFAdcseucYkY4oNbs56dG5-2FpY2OKpzQ-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Sunday, June 04, 2023 12:43:02
    Hi,

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

    6 new defect(s) introduced to Synchronet found with Coverity Scan.
    9 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 6 of 6 defect(s)


    ** CID 462184: (RESOURCE_LEAK)
    /smbutil.c: 1166 in packmsgs()
    /smbutil.c: 1161 in packmsgs()
    /smbutil.c: 1249 in packmsgs()


    ________________________________________________________________________________________________________
    *** CID 462184: (RESOURCE_LEAK)
    /smbutil.c: 1166 in packmsgs()
    1160 if(fread(&hdr,1,sizeof(smbhdr_t),smb.shd_fp) < 1)
    1161 return;
    1162 fwrite(&hdr,1,sizeof(smbhdr_t),tmp_shd);
    1163 fwrite(&(smb.status),1,sizeof(smbstatus_t),tmp_shd);
    1164 for(l=sizeof(smbhdr_t)+sizeof(smbstatus_t);l<smb.status.header_offset;l++) {
    1165 if(fread(&ch,1,1,smb.shd_fp) < 1) /* copy additional base header records */
    CID 462184: (RESOURCE_LEAK)
    Variable "datoffset" going out of scope leaks the storage it points to. 1166 return;
    1167 fwrite(&ch,1,1,tmp_shd);
    1168 }
    1169 total=0;
    1170 for(l=0;l<smb.status.total_msgs;l++) {
    1171 ZERO_VAR(msg);
    /smbutil.c: 1161 in packmsgs()
    1155 fclose(tmp_sid);
    1156 fprintf(errfp,"\n%s!Error allocating memory\n",beep); 1157 return;
    1158 }
    1159 fseek(smb.shd_fp,0L,SEEK_SET);
    1160 if(fread(&hdr,1,sizeof(smbhdr_t),smb.shd_fp) < 1)
    CID 462184: (RESOURCE_LEAK)
    Variable "datoffset" going out of scope leaks the storage it points to. 1161 return;
    1162 fwrite(&hdr,1,sizeof(smbhdr_t),tmp_shd);
    1163 fwrite(&(smb.status),1,sizeof(smbstatus_t),tmp_shd);
    1164 for(l=sizeof(smbhdr_t)+sizeof(smbstatus_t);l<smb.status.header_offset;l++) {
    1165 if(fread(&ch,1,1,smb.shd_fp) < 1) /* copy additional base header records */
    1166 return;
    /smbutil.c: 1249 in packmsgs()
    1243
    1244 /* Actually copy the data */
    1245
    1246 n=smb_datblocks(m);
    1247 for(m=0;m<n;m++) {
    1248 if(fread(buf,1,SDT_BLOCK_LEN,smb.sdt_fp) < 1)
    CID 462184: (RESOURCE_LEAK)
    Variable "datoffset" going out of scope leaks the storage it points to. 1249 return;
    1250 if(!m && *(ushort *)buf!=XLAT_NONE && *(ushort *)buf!=XLAT_LZH) {
    1251 printf("\nUnsupported translation type (%04X)\n"
    1252 ,*(ushort *)buf);
    1253 break;
    1254 }

    ** CID 462183: Null pointer dereferences (FORWARD_NULL) /tmp/sbbs-Jun-04-2023/src/conio/x_cio.c: 564 in x_init()


    ________________________________________________________________________________________________________
    *** CID 462183: Null pointer dereferences (FORWARD_NULL) /tmp/sbbs-Jun-04-2023/src/conio/x_cio.c: 564 in x_init()
    558 xrender_found = false;
    559 }
    560 #endif
    561 #ifdef WITH_XINERAMA
    562 xinerama_found = true;
    563 if ((dl3 = xp_dlopen(libnames3,RTLD_LAZY,1)) == NULL) {
    CID 462183: Null pointer dereferences (FORWARD_NULL)
    Passing null pointer "dl3" to "dlclose", which dereferences it.
    564 xp_dlclose(dl3);
    565 xinerama_found = false;
    566 }
    567 if (xinerama_found && ((x11.XineramaQueryVersion = xp_dlsym(dl3, XineramaQueryVersion)) == NULL)) {
    568 xp_dlclose(dl3);
    569 xinerama_found = false;

    ** CID 462182: (RESOURCE_LEAK)
    /tmp/sbbs-Jun-04-2023/src/conio/x_cio.c: 619 in x_init() /tmp/sbbs-Jun-04-2023/src/conio/x_cio.c: 608 in x_init() /tmp/sbbs-Jun-04-2023/src/conio/x_cio.c: 613 in x_init() /tmp/sbbs-Jun-04-2023/src/conio/x_cio.c: 626 in x_init() /tmp/sbbs-Jun-04-2023/src/conio/x_cio.c: 647 in x_init()


    ________________________________________________________________________________________________________
    *** CID 462182: (RESOURCE_LEAK)
    /tmp/sbbs-Jun-04-2023/src/conio/x_cio.c: 619 in x_init()
    613 return(-1);
    614 }
    615 if(sem_init(&init_complete, 0, 0)) {
    616 xp_dlclose(dl);
    617 sem_destroy(&pastebuf_set);
    618 sem_destroy(&pastebuf_used);
    CID 462182: (RESOURCE_LEAK)
    Variable "dl4" going out of scope leaks the storage it points to.
    619 return(-1);
    620 }
    621 if(sem_init(&mode_set, 0, 0)) {
    622 xp_dlclose(dl);
    623 sem_destroy(&pastebuf_set);
    624 sem_destroy(&pastebuf_used); /tmp/sbbs-Jun-04-2023/src/conio/x_cio.c: 608 in x_init()
    602 #endif
    603 setlocale(LC_ALL, "");
    604 x11.XSetLocaleModifiers("@im=none");
    605
    606 if(sem_init(&pastebuf_set, 0, 0)) {
    607 xp_dlclose(dl);
    CID 462182: (RESOURCE_LEAK)
    Variable "dl4" going out of scope leaks the storage it points to.
    608 return(-1);
    609 }
    610 if(sem_init(&pastebuf_used, 0, 0)) {
    611 xp_dlclose(dl);
    612 sem_destroy(&pastebuf_set);
    613 return(-1);
    /tmp/sbbs-Jun-04-2023/src/conio/x_cio.c: 613 in x_init()
    607 xp_dlclose(dl);
    608 return(-1);
    609 }
    610 if(sem_init(&pastebuf_used, 0, 0)) {
    611 xp_dlclose(dl);
    612 sem_destroy(&pastebuf_set);
    CID 462182: (RESOURCE_LEAK)
    Variable "dl4" going out of scope leaks the storage it points to.
    613 return(-1);
    614 }
    615 if(sem_init(&init_complete, 0, 0)) {
    616 xp_dlclose(dl);
    617 sem_destroy(&pastebuf_set);
    618 sem_destroy(&pastebuf_used); /tmp/sbbs-Jun-04-2023/src/conio/x_cio.c: 626 in x_init()
    620 }
    621 if(sem_init(&mode_set, 0, 0)) {
    622 xp_dlclose(dl);
    623 sem_destroy(&pastebuf_set);
    624 sem_destroy(&pastebuf_used);
    625 sem_destroy(&init_complete);
    CID 462182: (RESOURCE_LEAK)
    Variable "dl4" going out of scope leaks the storage it points to.
    626 return(-1);
    627 }
    628
    629 if(pthread_mutex_init(&copybuf_mutex, 0)) {
    630 xp_dlclose(dl);
    631 sem_destroy(&pastebuf_set); /tmp/sbbs-Jun-04-2023/src/conio/x_cio.c: 647 in x_init()
    641 xp_dlclose(dl);
    642 sem_destroy(&pastebuf_set);
    643 sem_destroy(&pastebuf_used);
    644 sem_destroy(&init_complete);
    645 sem_destroy(&mode_set);
    646 pthread_mutex_destroy(&copybuf_mutex);
    CID 462182: (RESOURCE_LEAK)
    Variable "dl4" going out of scope leaks the storage it points to.
    647 return(-1);
    648 }
    649 _beginthread(x11_mouse_thread,1<<16,NULL);
    650 cio_api.options |= CONIO_OPT_SET_TITLE | CONIO_OPT_SET_NAME | CONIO_OPT_SET_ICON;
    651 return(0);
    652 }

    ** CID 462181: Resource leaks (RESOURCE_LEAK) /tmp/sbbs-Jun-04-2023/src/conio/x_cio.c: 608 in x_init()


    ________________________________________________________________________________________________________
    *** CID 462181: Resource leaks (RESOURCE_LEAK) /tmp/sbbs-Jun-04-2023/src/conio/x_cio.c: 608 in x_init()
    602 #endif
    603 setlocale(LC_ALL, "");
    604 x11.XSetLocaleModifiers("@im=none");
    605
    606 if(sem_init(&pastebuf_set, 0, 0)) {
    607 xp_dlclose(dl);
    CID 462181: Resource leaks (RESOURCE_LEAK)
    Variable "dl3" going out of scope leaks the storage it points to.
    608 return(-1);
    609 }
    610 if(sem_init(&pastebuf_used, 0, 0)) {
    611 xp_dlclose(dl);
    612 sem_destroy(&pastebuf_set);
    613 return(-1);

    ** CID 462180: Null pointer dereferences (FORWARD_NULL) /tmp/sbbs-Jun-04-2023/src/conio/x_cio.c: 579 in x_init()


    ________________________________________________________________________________________________________
    *** CID 462180: Null pointer dereferences (FORWARD_NULL) /tmp/sbbs-Jun-04-2023/src/conio/x_cio.c: 579 in x_init()
    573 xinerama_found = false;
    574 }
    575 #endif
    576 #ifdef WITH_XRANDR
    577 xrandr_found = true;
    578 if ((dl4 = xp_dlopen(libnames4,RTLD_LAZY,2)) == NULL) {
    CID 462180: Null pointer dereferences (FORWARD_NULL)
    Passing null pointer "dl4" to "dlclose", which dereferences it.
    579 xp_dlclose(dl4);
    580 xrandr_found = false;
    581 }
    582 if (xinerama_found && ((x11.XRRQueryVersion = xp_dlsym(dl4, XRRQueryVersion)) == NULL)) {
    583 xp_dlclose(dl4);
    584 xrandr_found = false;

    ** CID 462179: Control flow issues (DEADCODE) /tmp/sbbs-Jun-04-2023/src/conio/x_events.c: 304 in fullscreen_geometry()


    ________________________________________________________________________________________________________
    *** CID 462179: Control flow issues (DEADCODE) /tmp/sbbs-Jun-04-2023/src/conio/x_events.c: 304 in fullscreen_geometry()
    298 *height = xrrci->height;
    299 if (xrrci != NULL)
    300 x11.XRRFreeCrtcInfo(xrrci);
    301 return true;
    302 }
    303 if (xrrci != NULL)
    CID 462179: Control flow issues (DEADCODE)
    Execution cannot reach this statement: "x11.XRRFreeCrtcInfo(xrrci);". 304 x11.XRRFreeCrtcInfo(xrrci);
    305 }
    306 #endif
    307 #ifdef WITH_XINERAMA
    308 if (xinerama_found) {
    309 // NOTE: Xinerama is limited to a short for the entire screen dimensions.


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4BbWTBf-2B-2Fi5ZUVF-2Fo-2B6flxo-3DlE0W_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrCCsYoL8-2BRAB8pSd-2BoykiJD4ftNgwReCmSBDHZUsIOaydl7n91VpHFpH-2B-2B6udD22Zx0rJjM18W-2BwzJlbPPHAhfNuJskDA1GbbK5bVcFums-2B-2FM-2F0YW6XnLxiKz5gFyKgOgNGYfroq20XOP9rDSr4aT-2Fr9-2BqXnGFlm6brcyj727rBsg-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Tuesday, June 06, 2023 12:40:22
    Hi,

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

    6 new defect(s) introduced to Synchronet found with Coverity Scan.
    38 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 6 of 6 defect(s)


    ** CID 462239: (CHECKED_RETURN) /tmp/sbbs-Jun-06-2023/3rdp/src/mozjs/js-1.8.5/js/src/ctypes/libffi/src/closures.c: 428 in dlmmap_locked()
    /tmp/sbbs-Jun-06-2023/3rdp/src/mozjs/js-1.8.5/js/src/ctypes/libffi/src/closures.c: 416 in dlmmap_locked()


    ________________________________________________________________________________________________________
    *** CID 462239: (CHECKED_RETURN) /tmp/sbbs-Jun-06-2023/3rdp/src/mozjs/js-1.8.5/js/src/ctypes/libffi/src/closures.c: 428 in dlmmap_locked()
    422
    423 start = mmap (start, length, prot, flags, execfd, offset);
    424
    425 if (start == MFAIL)
    426 {
    427 munmap (ptr, length);
    CID 462239: (CHECKED_RETURN)
    Calling "ftruncate" without checking return value (as is done elsewhere 45 out of 52 times).
    428 ftruncate (execfd, offset);
    429 return start;
    430 }
    431
    432 mmap_exec_offset ((char *)start, length) = (char*)ptr - (char*)start; 433 /tmp/sbbs-Jun-06-2023/3rdp/src/mozjs/js-1.8.5/js/src/ctypes/libffi/src/closures.c: 416 in dlmmap_locked()
    410 {
    411 if (!offset)
    412 {
    413 close (execfd);
    414 goto retry_open;
    415 }
    CID 462239: (CHECKED_RETURN)
    Calling "ftruncate" without checking return value (as is done elsewhere 45 out of 52 times).
    416 ftruncate (execfd, offset);
    417 return MFAIL;
    418 }
    419 else if (!offset
    420 && open_temp_exec_file_opts[open_temp_exec_file_opts_idx].repeat)
    421 open_temp_exec_file_opts_next ();

    ** CID 462238: (RESOURCE_LEAK)
    /writemsg.cpp: 1731 in sbbs_t::editmsg(smb_t *, smbmsg_t *)()
    /writemsg.cpp: 1717 in sbbs_t::editmsg(smb_t *, smbmsg_t *)()


    ________________________________________________________________________________________________________
    *** CID 462238: (RESOURCE_LEAK)
    /writemsg.cpp: 1731 in sbbs_t::editmsg(smb_t *, smbmsg_t *)()
    1725 if(j>1 && (j!=x || feof(instream)) && buf[j-1]==LF && buf[j-2]==CR)
    1726 buf[j-1]=buf[j-2]=0; /* Convert to NULL */ 1727 if(fwrite(buf,j,1,smb->sdt_fp) != 1) {
    1728 errormsg(WHERE, ERR_WRITE, smb->file, j);
    1729 smb_unlocksmbhdr(smb);
    1730 smb_freemsgdat(smb,offset,length,1);
    CID 462238: (RESOURCE_LEAK)
    Variable "instream" going out of scope leaks the storage it points to. 1731 return false;
    1732 }
    1733 x=SDT_BLOCK_LEN;
    1734 }
    1735 fflush(smb->sdt_fp);
    1736 fclose(instream);
    /writemsg.cpp: 1717 in sbbs_t::editmsg(smb_t *, smbmsg_t *)()
    1711 fseeko(smb->sdt_fp,offset,SEEK_SET);
    1712 xlat=XLAT_NONE;
    1713 if(fwrite(&xlat,2,1,smb->sdt_fp) != 1) {
    1714 errormsg(WHERE, ERR_WRITE, smb->file, 2);
    1715 smb_unlocksmbhdr(smb);
    1716 smb_freemsgdat(smb,offset,length,1);
    CID 462238: (RESOURCE_LEAK)
    Variable "instream" going out of scope leaks the storage it points to. 1717 return false;
    1718 }
    1719 x=SDT_BLOCK_LEN-2; /* Don't read/write more than 255 */
    1720 while(!feof(instream)) {
    1721 memset(buf,0,x);
    1722 j=fread(buf,1,x,instream);

    ** CID 462237: Resource leaks (RESOURCE_LEAK)
    /writemsg.cpp: 244 in sbbs_t::process_edited_file(const char *, const char *, int, unsigned int *, unsigned int)()


    ________________________________________________________________________________________________________
    *** CID 462237: Resource leaks (RESOURCE_LEAK)
    /writemsg.cpp: 244 in sbbs_t::process_edited_file(const char *, const char *, int, unsigned int *, unsigned int)()
    238 }
    239
    240 memset(buf,0,len+1);
    241 int rd = fread(buf,len,1,fp);
    242 fclose(fp);
    243 if(rd != 1)
    CID 462237: Resource leaks (RESOURCE_LEAK)
    Variable "buf" going out of scope leaks the storage it points to.
    244 return -4;
    245
    246 if((fp=fopen(dest,"wb"))!=NULL) {
    247 len=process_edited_text(buf, fp, mode, lines, maxlines);
    248 fclose(fp);
    249 }

    ** CID 462236: Null pointer dereferences (FORWARD_NULL) /tmp/sbbs-Jun-06-2023/src/conio/x_cio.c: 588 in x_initciolib()


    ________________________________________________________________________________________________________
    *** CID 462236: Null pointer dereferences (FORWARD_NULL) /tmp/sbbs-Jun-06-2023/src/conio/x_cio.c: 588 in x_initciolib()
    582 }
    583 #endif
    584 #ifdef WITH_XRANDR
    585 xrandr_found = true;
    586 if ((dl4 = xp_dlopen(libnames4,RTLD_LAZY,2)) == NULL)
    587 xrandr_found = false;
    CID 462236: Null pointer dereferences (FORWARD_NULL)
    Passing null pointer "dl4" to "dlsym", which dereferences it.
    588 if (xinerama_found && ((x11.XRRQueryVersion = xp_dlsym(dl4, XRRQueryVersion)) == NULL)) {
    589 xp_dlclose(dl4);
    590 xrandr_found = false;
    591 }
    592 if (xinerama_found && ((x11.XRRGetScreenResources = xp_dlsym(dl4, XRRGetScreenResources)) == NULL)) {
    593 xp_dlclose(dl4);

    ** CID 462235: Resource leaks (RESOURCE_LEAK)
    /fmsgdump.c: 114 in msgdump()


    ________________________________________________________________________________________________________
    *** CID 462235: Resource leaks (RESOURCE_LEAK)
    /fmsgdump.c: 114 in msgdump()
    108 fprintf(stderr, "!MALLOC failure\n");
    109 return __COUNTER__;
    110 }
    111 fseek(fp, sizeof(hdr), SEEK_SET);
    112 if(fread(body, len, 1, fp) != 1) {
    113 perror("reading body text");
    CID 462235: Resource leaks (RESOURCE_LEAK)
    Variable "body" going out of scope leaks the storage it points to.
    114 return __COUNTER__;
    115 }
    116 fprintf(bodyfp, "\n-start of message text-\n");
    117 char* p = body;
    118 while(*p && p < body + len) {
    119 if((p == body || *(p - 1) == '\r') && *p == 1) {

    ** CID 462234: Resource leaks (RESOURCE_LEAK)
    /netmail.cpp: 303 in sbbs_t::netmail(const char *, const char *, int, smb_t *, smbmsg_t *, char **)()


    ________________________________________________________________________________________________________
    *** CID 462234: Resource leaks (RESOURCE_LEAK)
    /netmail.cpp: 303 in sbbs_t::netmail(const char *, const char *, int, smb_t *, smbmsg_t *, char **)()
    297 errormsg(WHERE,ERR_ALLOC,str,length);
    298 return(false);
    299 }
    300 if(read(file,buf,length) != length) {
    301 close(file);
    302 errormsg(WHERE, ERR_READ, str, length);
    CID 462234: Resource leaks (RESOURCE_LEAK)
    Variable "buf" going out of scope leaks the storage it points to.
    303 return false;
    304 }
    305 close(file);
    306
    307 smb_net_type_t nettype = NET_FIDO;
    308 smb_hfield_str(&msg,SENDER, from);


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4BbWTBf-2B-2Fi5ZUVF-2Fo-2B6flxo-3DcBRy_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrB-2FxlaM9N-2BytN4abAlhxBOfL2Gc48Kht9DWsIw0TGq4KCIUCjvrRsYhjbSc3n6GrPlyk6u8jzpB0aqRS4dcNK81E-2FeN0SyAuTTv987PncAi-2FzopZuXT78jKuoT04lLRnCeEbfBKD6ahQnLeiOpkIZgmfmv57IglbC4RNT9dRkvaUQ-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Friday, June 09, 2023 12:40:16
    Hi,

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

    14 new defect(s) introduced to Synchronet found with Coverity Scan.
    28 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 14 of 14 defect(s)


    ** CID 462300: Control flow issues (MISSING_BREAK) /tmp/sbbs-Jun-09-2023/src/conio/cterm.c: 3525 in do_ansi()


    ________________________________________________________________________________________________________
    *** CID 462300: Control flow issues (MISSING_BREAK) /tmp/sbbs-Jun-09-2023/src/conio/cterm.c: 3525 in do_ansi()
    3519 case 'e': /* Line Position Forward */
    3520 seq_default(seq, 0, 1);
    3521 if (seq->param_int[0] < 1)
    3522 break; 3523 adjust_currpos(cterm, 0, seq->param_int[0], 0);
    3524 break;
    CID 462300: Control flow issues (MISSING_BREAK)
    The case for value "'a'" is not terminated by a "break" statement.
    3525 case 'a': /* Character Position Forward */
    3526 clear_lcf(cterm);
    3527 case 'C': /* Cursor Right */
    3528 seq_default(seq, 0, 1);
    3529 if (seq->param_int[0] < 1)
    3530 break;

    ** CID 462299: Control flow issues (MISSING_BREAK) /tmp/sbbs-Jun-09-2023/src/conio/cterm.c: 3533 in do_ansi()


    ________________________________________________________________________________________________________
    *** CID 462299: Control flow issues (MISSING_BREAK) /tmp/sbbs-Jun-09-2023/src/conio/cterm.c: 3533 in do_ansi()
    3527 case 'C': /* Cursor Right */
    3528 seq_default(seq, 0, 1);
    3529 if (seq->param_int[0] < 1)
    3530 break; 3531 adjust_currpos(cterm, seq->param_int[0], 0, 0);
    3532 break;
    CID 462299: Control flow issues (MISSING_BREAK)
    The case for value "'j'" is not terminated by a "break" statement.
    3533 case 'j': /* Character Position Backward */
    3534 clear_lcf(cterm);
    3535 case 'D': /* Cursor Left */
    3536 seq_default(seq, 0, 1);
    3537 if (seq->param_int[0] < 1)
    3538 break;

    ** CID 462298: (NEGATIVE_RETURNS)


    ________________________________________________________________________________________________________
    *** CID 462298: (NEGATIVE_RETURNS)
    /exec.cpp: 1892 in sbbs_t::exec(csi_t *)()
    1886 }
    1887 else
    1888 csi->logic=LOGIC_FALSE;
    1889 return(0);
    1890
    1891 case CS_SELECT_EDITOR:
    CID 462298: (NEGATIVE_RETURNS)
    "this->curdirnum" is passed to a parameter that cannot be negative. 1892 csi->logic=select_editor() ? LOGIC_TRUE:LOGIC_FALSE;
    1893 return(0);
    1894 case CS_SET_EDITOR:
    1895 csi->logic=LOGIC_TRUE;
    1896 for(i=0;i<cfg.total_xedits;i++)
    1897 if(!stricmp(csi->str,cfg.xedit[i]->code)
    /exec.cpp: 1880 in sbbs_t::exec(csi_t *)()
    1874 case CS_SELECT_SHELL:
    1875 csi->logic=select_shell() ? LOGIC_TRUE:LOGIC_FALSE;
    1876 return(0);
    1877 case CS_SET_SHELL:
    1878 csi->logic=LOGIC_TRUE;
    1879 for(i=0;i<cfg.total_shells;i++)
    CID 462298: (NEGATIVE_RETURNS)
    "this->curdirnum" is passed to a parameter that cannot be negative. 1880 if(!stricmp(csi->str,cfg.shell[i]->code)
    1881 && chk_ar(cfg.shell[i]->ar,&useron,&client))
    1882 break;
    1883 if(i<cfg.total_shells) {
    1884 useron.shell=i;
    1885 putuserstr(useron.number, USER_SHELL, cfg.shell[i]->code);
    /exec.cpp: 1181 in sbbs_t::exec(csi_t *)()
    1175 now=time(NULL);
    1176
    1177 if(csi->ip>=csi->cs+csi->length)
    1178 return(1);
    1179
    1180 if(*csi->ip>=CS_FUNCTIONS)
    CID 462298: (NEGATIVE_RETURNS)
    "this->curdirnum" is passed to a parameter that cannot be negative. 1181 return(exec_function(csi));
    1182
    1183 /**********************************************/
    1184 /* Miscellaneous variable length instructions */
    1185 /**********************************************/
    1186
    /exec.cpp: 1499 in sbbs_t::exec(csi_t *)()
    1493
    1494 if(*csi->ip>=CS_TWO_BYTE) {
    1495 switch(*(csi->ip++)) {
    1496 case CS_TWO_MORE_BYTES:
    1497 switch(*(csi->ip++)) {
    1498 case CS_USER_EVENT:
    CID 462298: (NEGATIVE_RETURNS)
    "this->curdirnum" is passed to a parameter that cannot be negative. 1499 user_event((user_event_t)*(csi->ip++));
    1500 return(0);
    1501 }
    1502 errormsg(WHERE,ERR_CHK,"shell instruction",*(csi->ip-1));
    1503 return(0);
    1504 case CS_SETLOGIC:
    /exec.cpp: 1181 in sbbs_t::exec(csi_t *)()
    1175 now=time(NULL);
    1176
    1177 if(csi->ip>=csi->cs+csi->length)
    1178 return(1);
    1179
    1180 if(*csi->ip>=CS_FUNCTIONS)
    CID 462298: (NEGATIVE_RETURNS)
    "this->cursubnum" is passed to a parameter that cannot be negative. 1181 return(exec_function(csi));
    1182
    1183 /**********************************************/
    1184 /* Miscellaneous variable length instructions */
    1185 /**********************************************/
    1186
    /exec.cpp: 1761 in sbbs_t::exec(csi_t *)()
    1755 if(logon())
    1756 csi->logic=LOGIC_TRUE; 1757 else
    1758 csi->logic=LOGIC_FALSE; 1759 return(0);
    1760 case CS_LOGOUT:
    CID 462298: (NEGATIVE_RETURNS)
    "this->curdirnum" is passed to a parameter that cannot be negative. 1761 logout();
    1762 return(0);
    1763 case CS_EXIT:
    1764 return(1);
    1765 case CS_LOOP_BEGIN:
    1766 if(csi->loops<MAX_LOOPDEPTH) /exec.cpp: 1538 in sbbs_t::exec(csi_t *)()
    1532 thisnode.status=*csi->ip++; 1533 putnodedat(cfg.node_num,&thisnode);
    1534 } else
    1535 csi->ip++;
    1536 return(0);
    1537 case CS_MULTINODE_CHAT:
    CID 462298: (NEGATIVE_RETURNS)
    "this->curdirnum" is passed to a parameter that cannot be negative. 1538 multinodechat(*csi->ip++);
    1539 return(0);
    1540 case CS_GETSTR:
    1541 csi->logic=LOGIC_TRUE;
    1542 getstr(csi->str,*csi->ip++,0);
    1543 if(sys_status&SS_ABORT) {
    /exec.cpp: 1875 in sbbs_t::exec(csi_t *)()
    1869 saveline();
    1870 return(0);
    1871 case CS_RESTORELINE:
    1872 restoreline();
    1873 return(0);
    1874 case CS_SELECT_SHELL:
    CID 462298: (NEGATIVE_RETURNS)
    "this->curdirnum" is passed to a parameter that cannot be negative. 1875 csi->logic=select_shell() ? LOGIC_TRUE:LOGIC_FALSE;
    1876 return(0);
    1877 case CS_SET_SHELL:
    1878 csi->logic=LOGIC_TRUE;
    1879 for(i=0;i<cfg.total_shells;i++)
    1880 if(!stricmp(csi->str,cfg.shell[i]->code)
    /exec.cpp: 1897 in sbbs_t::exec(csi_t *)()
    1891 case CS_SELECT_EDITOR:
    1892 csi->logic=select_editor() ? LOGIC_TRUE:LOGIC_FALSE;
    1893 return(0);
    1894 case CS_SET_EDITOR:
    1895 csi->logic=LOGIC_TRUE;
    1896 for(i=0;i<cfg.total_xedits;i++)
    CID 462298: (NEGATIVE_RETURNS)
    "this->curdirnum" is passed to a parameter that cannot be negative. 1897 if(!stricmp(csi->str,cfg.xedit[i]->code)
    1898 && chk_ar(cfg.xedit[i]->ar,&useron,&client))
    1899 break;
    1900 if(i<cfg.total_xedits) {
    1901 useron.xedit=i+1;
    1902 putuserstr(useron.number, USER_XEDIT, cfg.xedit[i]->code);

    ** CID 462297: Uninitialized variables (UNINIT)


    ________________________________________________________________________________________________________
    *** CID 462297: Uninitialized variables (UNINIT)
    /readmsgs.cpp: 218 in sbbs_t::loadposts(unsigned int *, int, unsigned int, int, unsigned int *, unsigned int *)()
    212 if(idx.to!=namecrc && idx.from!=namecrc
    213 && idx.to!=aliascrc && idx.from!=aliascrc
    214 && (useron.number!=1 || idx.to!=sysop)) 215 continue;
    216 msg.idx=idx;
    217 if(!smb_lockmsghdr(&smb,&msg)) {
    CID 462297: Uninitialized variables (UNINIT)
    Using uninitialized value "msg.idx_offset" when calling "smb_getmsghdr".
    218 if(!smb_getmsghdr(&smb,&msg)) {
    219 if(stricmp(msg.to,useron.alias) 220 && stricmp(msg.from,useron.alias)
    221 && stricmp(msg.to,useron.name)
    222 && stricmp(msg.from,useron.name)
    223 && (useron.number!=1 || stricmp(msg.to,"sysop")

    ** CID 462296: Integer handling issues (SIGN_EXTENSION)
    /writemsg.cpp: 296 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()


    ________________________________________________________________________________________________________
    *** CID 462296: Integer handling issues (SIGN_EXTENSION)
    /writemsg.cpp: 296 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()
    290
    291 useron_level=useron.level;
    292
    293 if(editor!=NULL)
    294 *editor=NULL;
    295
    CID 462296: Integer handling issues (SIGN_EXTENSION)
    Suspicious implicit sign extension: "this->cfg.level_linespermsg[useron_level]" with type "uint16_t" (16 bits, unsigned) is promoted in "this->cfg.level_linespermsg[useron_level] * (this->cols - 1 + 2) + 1" to type "int" (32 bits, signed), then sign-extended to type "unsigned long" (64 bits, unsigned). If "this->cfg.level_linespermsg[useron_level] * (this->cols - 1 + 2) + 1" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1.
    296 if((buf=(char*)malloc((cfg.level_linespermsg[useron_level]*MAX_LINE_LEN) + 1))
    297 ==NULL) {
    298 errormsg(WHERE,ERR_ALLOC,fname
    299 ,(cfg.level_linespermsg[useron_level]*MAX_LINE_LEN) +1);
    300 return(false);
    301 }

    ** CID 462295: Control flow issues (MISSING_BREAK) /tmp/sbbs-Jun-09-2023/src/conio/cterm.c: 3509 in do_ansi()


    ________________________________________________________________________________________________________
    *** CID 462295: Control flow issues (MISSING_BREAK) /tmp/sbbs-Jun-09-2023/src/conio/cterm.c: 3509 in do_ansi()
    3503 seq->param_int[0] = cterm->width - j;
    3504 MOVETEXT(col, row, max_col - seq->param_int[0], row, col + seq->param_int[0], row);
    3505 for(l=0; l < seq->param_int[0]; l++)
    3506 PUTCH(' ');
    3507 cterm_gotoxy(cterm, i, j);
    3508 break;
    CID 462295: Control flow issues (MISSING_BREAK)
    The case for value "'A'" is not terminated by a "break" statement.
    3509 case 'A': /* Cursor Up */
    3510 clear_lcf(cterm);
    3511 case 'k': /* Line Position Backward */
    3512 seq_default(seq, 0, 1);
    3513 if (seq->param_int[0] < 1)
    3514 break;

    ** CID 462294: Integer handling issues (NEGATIVE_RETURNS)


    ________________________________________________________________________________________________________
    *** CID 462294: Integer handling issues (NEGATIVE_RETURNS)
    /netmail.cpp: 1038 in sbbs_t::inetmail(const char *, const char *, int, smb_t *, smbmsg_t *, char **)()
    1032 if(remsg != NULL && resmb != NULL && !(mode&WM_QUOTE)) {
    1033 if(quotemsg(resmb, remsg, /* include tails: */true)) 1034 mode |= WM_QUOTE;
    1035 }
    1036
    1037 SAFEPRINTF(msgpath,"%snetmail.msg",cfg.node_dir);
    CID 462294: Integer handling issues (NEGATIVE_RETURNS)
    A negative constant "-1" is passed as an argument to a parameter that cannot be negative.
    1038 if(!writemsg(msgpath,nulstr,title,WM_NETMAIL|mode,INVALID_SUB, to_list, /* from: */your_addr, &editor, &charset)) {
    1039 strListFree(&rcpt_list);
    1040 bputs(text[Aborted]);
    1041 return(false);
    1042 }
    1043

    ** CID 462293: Integer handling issues (NEGATIVE_RETURNS)


    ________________________________________________________________________________________________________
    *** CID 462293: Integer handling issues (NEGATIVE_RETURNS)
    /netmail.cpp: 200 in sbbs_t::netmail(const char *, const char *, int, smb_t *, smbmsg_t *, char **)()
    194 if(remsg != NULL && resmb != NULL && !(mode&WM_QUOTE)) {
    195 if(quotemsg(resmb, remsg, /* include tails: */true)) 196 mode |= WM_QUOTE;
    197 }
    198
    199 msg_tmp_fname(useron.xedit, msgpath, sizeof(msgpath));
    CID 462293: Integer handling issues (NEGATIVE_RETURNS)
    A negative constant "-1" is passed as an argument to a parameter that cannot be negative.
    200 if(!writemsg(msgpath,nulstr,subj,WM_NETMAIL|mode,INVALID_SUB, to, from, &editor, &charset)) {
    201 bputs(text[Aborted]);
    202 return(false);
    203 }
    204
    205 if(mode&WM_FILE) {

    ** CID 462292: (NULL_RETURNS)
    /execmisc.cpp: 526 in sbbs_t::exec_misc(csi_t *, const char *)()
    /execmisc.cpp: 526 in sbbs_t::exec_misc(csi_t *, const char *)()


    ________________________________________________________________________________________________________
    *** CID 462292: (NULL_RETURNS)
    /execmisc.cpp: 526 in sbbs_t::exec_misc(csi_t *, const char *)()
    520 if(*pp1!=csi->str && (!*pp1 || i==MAX_SYSVARS)) {
    521 if(*pp1)
    522 *pp1=(char *)realloc(*pp1,strlen(*pp1)+strlen(*pp2)+1);
    523 else
    524 *pp1=(char *)realloc(*pp1,strlen(*pp2)+1);
    525 }
    CID 462292: (NULL_RETURNS)
    Dereferencing a pointer that might be "nullptr" "*pp1" when calling "strcat". [Note: The source code implementation of the function has been overridden by a builtin model.]
    526 strcat(*pp1,*pp2);
    527 return(0);
    528 case FORMAT_STR_VAR:
    529 pp=getstrvar(csi,*(int32_t *)csi->ip);
    530 csi->ip+=4; /* Skip variable name */
    531 p=format_string(this, csi); /execmisc.cpp: 526 in sbbs_t::exec_misc(csi_t *, const char *)()
    520 if(*pp1!=csi->str && (!*pp1 || i==MAX_SYSVARS)) {
    521 if(*pp1)
    522 *pp1=(char *)realloc(*pp1,strlen(*pp1)+strlen(*pp2)+1);
    523 else
    524 *pp1=(char *)realloc(*pp1,strlen(*pp2)+1);
    525 }
    CID 462292: (NULL_RETURNS)
    Dereferencing a pointer that might be "nullptr" "*pp1" when calling "strcat". [Note: The source code implementation of the function has been overridden by a builtin model.]
    526 strcat(*pp1,*pp2);
    527 return(0);
    528 case FORMAT_STR_VAR:
    529 pp=getstrvar(csi,*(int32_t *)csi->ip);
    530 csi->ip+=4; /* Skip variable name */
    531 p=format_string(this, csi);

    ** CID 462291: Control flow issues (MISSING_BREAK) /tmp/sbbs-Jun-09-2023/src/conio/cterm.c: 3517 in do_ansi()


    ________________________________________________________________________________________________________
    *** CID 462291: Control flow issues (MISSING_BREAK) /tmp/sbbs-Jun-09-2023/src/conio/cterm.c: 3517 in do_ansi()
    3511 case 'k': /* Line Position Backward */
    3512 seq_default(seq, 0, 1);
    3513 if (seq->param_int[0] < 1)
    3514 break; 3515 adjust_currpos(cterm, 0, 0 - seq->param_int[0], 0);
    3516 break;
    CID 462291: Control flow issues (MISSING_BREAK)
    The case for value "'B'" is not terminated by a "break" statement.
    3517 case 'B': /* Cursor Down */
    3518 clear_lcf(cterm);
    3519 case 'e': /* Line Position Forward */
    3520 seq_default(seq, 0, 1);
    3521 if (seq->param_int[0] < 1)
    3522 break;

    ** CID 462290: Integer handling issues (NEGATIVE_RETURNS)


    ________________________________________________________________________________________________________
    *** CID 462290: Integer handling issues (NEGATIVE_RETURNS)
    /netmail.cpp: 1316 in sbbs_t::qnetmail(const char *, const char *, int, smb_t *, smbmsg_t *)()
    1310 if(remsg != NULL && resmb != NULL && !(mode&WM_QUOTE)) {
    1311 if(quotemsg(resmb, remsg, /* include tails: */true)) 1312 mode |= WM_QUOTE;
    1313 }
    1314
    1315 SAFEPRINTF(msgpath,"%snetmail.msg",cfg.node_dir);
    CID 462290: Integer handling issues (NEGATIVE_RETURNS)
    A negative constant "-1" is passed as an argument to a parameter that cannot be negative.
    1316 if(!writemsg(msgpath,nulstr,title, (mode|WM_QWKNET|WM_NETMAIL) ,INVALID_SUB,to,/* from: */useron.alias, &editor, &charset)) {
    1317 bputs(text[Aborted]);
    1318 return(false);
    1319 }
    1320
    1321 if((i=smb_stack(&smb,SMB_STACK_PUSH))!=SMB_SUCCESS) {

    ** CID 462289: Integer handling issues (NEGATIVE_RETURNS)


    ________________________________________________________________________________________________________
    *** CID 462289: Integer handling issues (NEGATIVE_RETURNS)
    /bulkmail.cpp: 53 in sbbs_t::bulkmail(unsigned char *)()
    47 && !noyes(text[AnonymousQ])) {
    48 msg.hdr.attr|=MSG_ANONYMOUS;
    49 wm_mode|=WM_ANON;
    50 }
    51
    52 msg_tmp_fname(useron.xedit, msgpath, sizeof(msgpath));
    CID 462289: Integer handling issues (NEGATIVE_RETURNS)
    A negative constant "-1" is passed as an argument to a parameter that cannot be negative.
    53 if(!writemsg(msgpath,nulstr,title,wm_mode,INVALID_SUB,"Bulk Mailing"
    54 ,/* From: */useron.alias
    55 ,&editor
    56 ,&charset)) {
    57 bputs(text[Aborted]);
    58 return(false);

    ** CID 462288: High impact quality (Y2K38_SAFETY)
    /upload.cpp: 351 in sbbs_t::upload(int)()


    ________________________________________________________________________________________________________
    *** CID 462288: High impact quality (Y2K38_SAFETY)
    /upload.cpp: 351 in sbbs_t::upload(int)()
    345 SAFEPRINTF(descbeg,text[Rated],toupper(ch));
    346 }
    347 if(cfg.dir[dirnum]->misc&DIR_ULDATE) {
    348 now=time(NULL);
    349 if(descbeg[0])
    350 strcat(descbeg," ");
    CID 462288: High impact quality (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "this->now" is cast to "time32_t".
    351 SAFEPRINTF(str,"%s ",unixtodstr(&cfg,(time32_t)now,tmp));
    352 strcat(descbeg,str);
    353 }
    354 if(cfg.dir[dirnum]->misc&DIR_MULT) {
    355 sync();
    356 if(!noyes(text[MultipleDiskQ])) {

    ** CID 462287: Insecure data handling (TAINTED_SCALAR)


    ________________________________________________________________________________________________________
    *** CID 462287: Insecure data handling (TAINTED_SCALAR)
    /writemsg.cpp: 762 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()
    756 while(!feof(tag)) {
    757 if(!fgets(str,sizeof(str),tag)) 758 break;
    759 truncsp(str);
    760 if(utf8) {
    761 char buf[sizeof(str)*4];
    CID 462287: Insecure data handling (TAINTED_SCALAR)
    Passing tainted expression "str" to "cp437_to_utf8_str", which uses it as an offset.
    762 cp437_to_utf8_str(str, buf, sizeof(buf) - 1, /* minval: */'\x02');
    763 l+=fprintf(stream,"%s\r\n", buf);
    764 } else
    765 l+=fprintf(stream,"%s\r\n",str);
    766 lines++; /* line counter */
    767 }


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4BbWTBf-2B-2Fi5ZUVF-2Fo-2B6flxo-3DtLKg_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrAqovISQpoxJCpfGf5WxBSwicKqoI1-2FF-2FaRmTPl-2BdVuGdSUZJZL-2FtmrL2VG6EaSuRynvnKTam4RxYwMKuXCyGzW07U-2FihjT83mqDNq6SOIYF1Sr-2FPyTE6vlrslg0L6d5zkvnLZ7buAIgjMdQW0NPYYLOxV54tcIwBqmxUNrcgSYSA-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Friday, July 21, 2023 12:39:32
    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 462777: Error handling issues (CHECKED_RETURN)
    /sbbsecho.c: 1796 in alter_areas()


    ________________________________________________________________________________________________________
    *** CID 462777: Error handling issues (CHECKED_RETURN)
    /sbbsecho.c: 1796 in alter_areas()
    1790 chmod(outpath, st.st_mode);
    1791 if(cfg.areafile_backups == 0 || !backup(cfg.areafile, cfg.areafile_backups, /* ren: */TRUE))
    1792 delfile(cfg.areafile, __LINE__); /* Delete AREAS.BBS */
    1793 if(rename(outpath,cfg.areafile)) /* Rename new AREAS.BBS file */
    1794 lprintf(LOG_ERR,"ERROR line %d renaming %s to %s",__LINE__,outpath,cfg.areafile);
    1795 }
    CID 462777: Error handling issues (CHECKED_RETURN)
    Calling "remove(outpath)" without checking return value. This library function may fail and return an error code.
    1796 remove(outpath); // expected to fail (file does not exist) much of the time
    1797 }
    1798
    1799 bool add_sub_to_arealist(sub_t* sub, fidoaddr_t uplink)
    1800 {
    1801 FILE* fp = NULL;


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4BbWTBf-2B-2Fi5ZUVF-2Fo-2B6flxo-3D9Jsa_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrBb4277PBgEvmZlC-2F75f6Wn0OW7OlFk2c1B-2BHtshOYvFkBSQP9EqEdk2ezaBaEw-2BucLGwfFouHIfPe-2Fyudqe7-2BvtImpG7nG3GNHNovDhmEdP7PSdTfD3wACCQeKNpizxWyAzNP4xAGsoa5IGtqS3OShzACd7MFIxkk2Y7iSTOvrLw-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Wednesday, September 06, 2023 12:42:06
    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.
    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 2 of 2 defect(s)


    ** CID 465170: Resource leaks (RESOURCE_LEAK)
    /scfg/scfg.c: 2447 in new_item()


    ________________________________________________________________________________________________________
    *** CID 465170: Resource leaks (RESOURCE_LEAK)
    /scfg/scfg.c: 2447 in new_item()
    2441 void** p;
    2442 void* item;
    2443
    2444 if((item = calloc(size, 1)) == NULL)
    2445 return NULL;
    2446 if((p = realloc(list, size * ((*total) + 1))) == NULL)
    CID 465170: Resource leaks (RESOURCE_LEAK)
    Variable "item" going out of scope leaks the storage it points to.
    2447 return NULL;
    2448 list = p;
    2449 for(int i = *total; i > index; --i)
    2450 list[i] = list[i - 1];
    2451 list[index] = item;
    2452 ++(*total);

    ** CID 465169: (SIZEOF_MISMATCH)
    /scfg/scfgxfr1.c: 544 in xfer_opts()
    /scfg/scfgxfr1.c: 698 in xfer_opts()
    /scfg/scfgxfr1.c: 1124 in xfer_opts()
    /scfg/scfgxfr1.c: 844 in xfer_opts()
    /scfg/scfgxfr1.c: 412 in xfer_opts()
    /scfg/scfgxfr1.c: 982 in xfer_opts()


    ________________________________________________________________________________________________________
    *** CID 465169: (SIZEOF_MISMATCH)
    /scfg/scfgxfr1.c: 544 in xfer_opts()
    538 }
    539 if(msk == MSK_COPY) {
    540 savftest=*cfg.ftest[i]; 541 continue;
    542 }
    543 if(msk == MSK_PASTE) {
    CID 465169: (SIZEOF_MISMATCH)
    Passing argument "240UL /* sizeof (ftest_t) */" to function "new_item" and then casting the return value to "ftest_t **" is suspicious.
    544 if((cfg.ftest = (ftest_t**)new_item(cfg.ftest, sizeof(ftest_t), i, &cfg.total_ftests)) == NULL) {
    545 errormsg(WHERE, ERR_ALLOC, "ftests", sizeof(ftest_t) * (cfg.total_ftests + 1));
    546 cfg.total_ftests = 0;
    547 bail(1);
    548 }
    549 *cfg.ftest[i]=savftest; /scfg/scfgxfr1.c: 698 in xfer_opts()
    692 }
    693 if(msk == MSK_COPY) {
    694 savdlevent=*cfg.dlevent[i];
    695 continue;
    696 }
    697 if(msk == MSK_PASTE) {
    CID 465169: (SIZEOF_MISMATCH)
    Passing argument "240UL /* sizeof (dlevent_t) */" to function "new_item" and then casting the return value to "dlevent_t **" is suspicious.
    698 if((cfg.dlevent = (dlevent_t**)new_item(cfg.dlevent, sizeof(dlevent_t), i, &cfg.total_dlevents)) == NULL) {
    699 errormsg(WHERE, ERR_ALLOC, "dlevents", sizeof(dlevent_t) * (cfg.total_dlevents + 1));
    700 cfg.total_dlevents = 0;
    701 bail(1);
    702 }
    703 *cfg.dlevent[i]=savdlevent;
    /scfg/scfgxfr1.c: 1124 in xfer_opts()
    1118 }
    1119 if(msk == MSK_COPY) {
    1120 savprot=*cfg.prot[i]; 1121 continue;
    1122 }
    1123 if(msk == MSK_PASTE) {
    CID 465169: (SIZEOF_MISMATCH)
    Passing argument "720UL /* sizeof (prot_t) */" to function "new_item" and then casting the return value to "prot_t **" is suspicious.
    1124 if((cfg.prot = (prot_t**)new_item(cfg.prot, sizeof(prot_t), i, &cfg.total_prots)) == NULL) {
    1125 errormsg(WHERE, ERR_ALLOC, "prots", sizeof(prot_t) * (cfg.total_prots + 1));
    1126 cfg.total_prots=0;
    1127 bail(1);
    1128 }
    1129 *cfg.prot[i]=savprot; /scfg/scfgxfr1.c: 844 in xfer_opts()
    838 }
    839 if(msk == MSK_COPY) {
    840 savfextr=*cfg.fextr[i]; 841 continue;
    842 }
    843 if(msk == MSK_PASTE) {
    CID 465169: (SIZEOF_MISMATCH)
    Passing argument "199UL /* sizeof (fextr_t) */" to function "new_item" and then casting the return value to "fextr_t **" is suspicious.
    844 if((cfg.fextr = (fextr_t**)new_item(cfg.fextr, sizeof(fextr_t), i, &cfg.total_fextrs)) == NULL) {
    845 errormsg(WHERE, ERR_ALLOC, "fextrs", sizeof(fextr_t) * (cfg.total_fextrs + 1));
    846 cfg.total_fextrs = 0;
    847 bail(1);
    848 }
    849 *cfg.fextr[i]=savfextr; /scfg/scfgxfr1.c: 412 in xfer_opts()
    406 }
    407 if(msk == MSK_COPY) {
    408 savfview=*cfg.fview[i]; 409 continue;
    410 }
    411 if(msk == MSK_PASTE) {
    CID 465169: (SIZEOF_MISMATCH)
    Passing argument "199UL /* sizeof (fview_t) */" to function "new_item" and then casting the return value to "fview_t **" is suspicious.
    412 if((cfg.fview = (fview_t**)new_item(cfg.fview, sizeof(fview_t), i, &cfg.total_fviews)) == NULL) {
    413 errormsg(WHERE, ERR_ALLOC, "fviews", sizeof(fview_t) * (cfg.total_fviews + 1));
    414 cfg.total_fviews = 0;
    415 bail(1);
    416 }
    417 *cfg.fview[i]=savfview; /scfg/scfgxfr1.c: 982 in xfer_opts()
    976 }
    977 if(msk == MSK_COPY) {
    978 savfcomp=*cfg.fcomp[i]; 979 continue;
    980 }
    981 if(msk == MSK_PASTE) {
    CID 465169: (SIZEOF_MISMATCH)
    Passing argument "199UL /* sizeof (fcomp_t) */" to function "new_item" and then casting the return value to "fcomp_t **" is suspicious.
    982 if((cfg.fcomp = (fcomp_t**)new_item(cfg.fcomp, sizeof(fcomp_t), i, &cfg.total_fcomps)) == NULL) {
    983 errormsg(WHERE, ERR_ALLOC, "fcomps", sizeof(fcomp_t) * (cfg.total_fcomps + 1));
    984 cfg.total_fcomps = 0;
    985 bail(1);
    986 }
    987 *cfg.fcomp[i]=savfcomp;


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4BbWTBf-2B-2Fi5ZUVF-2Fo-2B6flxo-3D5wZ8_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrCnsQIL3fFmuqL7faauDZIkRsjaF7SdWuX9-2F6F0cLhQPK2eigoJW5CI-2BTBbzcwuB-2Fnb9gU96N518jXtyrLldNWW25I5ASjWizI9KxhCsvWXL8lcGsg-2BB04X9jrEFEkrP4hbjq1CPbLr3dEPsMh2-2BJD6OG7PFXOCZ8vIf02fm0mzeA-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Tuesday, September 26, 2023 12:41:14
    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 465835: High impact quality (Y2K38_SAFETY)
    /atcodes.cpp: 1344 in sbbs_t::atcode(const char *, char *, unsigned long, int *, bool, JSObject *)()


    ________________________________________________________________________________________________________
    *** CID 465835: High impact quality (Y2K38_SAFETY)
    /atcodes.cpp: 1344 in sbbs_t::atcode(const char *, char *, unsigned long, int *, bool, JSObject *)()
    1338 f = (float)useron.dls / useron.uls;
    1339 safe_snprintf(str, maxlen, "%u", f ? (uint)(100 / f) : 0);
    1340 return str;
    1341 }
    1342
    1343 if(!strcmp(sp,"LASTNEW"))
    CID 465835: High impact quality (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "this->ns_time" is cast to "time32_t".
    1344 return(unixtodstr(&cfg,(time32_t)ns_time,str));
    1345
    1346 if(strncmp(sp, "LASTNEW:", 8) == 0) {
    1347 SAFECOPY(tmp, sp + 8);
    1348 c_unescape_str(tmp);
    1349 memset(&tm, 0, sizeof(tm));


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4BbWTBf-2B-2Fi5ZUVF-2Fo-2B6flxo-3DUPeu_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrC3rkJOOdMBm7nMBMgGcmpBP39czlPogoepUuUAf0jPqohwQMNy1ulVEkqUkOGShQTw40WBv406LhOm367tfkxK7FUNIoQlZBuwZ1omfunbNxXxVCmVw8GO3npVkZ3YxshRBZDZsP1O5VMLZ6DNCGvJ679Mp4a2XGGuVrVV7McBrQ-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Wednesday, November 22, 2023 13:38:53
    Hi,

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

    39 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 20 of 39 defect(s)


    ** CID 469141: Data race undermines locking (LOCK_EVASION)
    /answer.cpp: 450 in sbbs_t::answer()()


    ________________________________________________________________________________________________________
    *** CID 469141: Data race undermines locking (LOCK_EVASION)
    /answer.cpp: 450 in sbbs_t::answer()()
    444 if(telnet_cols >= TERM_COLS_MIN && telnet_cols <= TERM_COLS_MAX)
    445 cols = telnet_cols;
    446 if(telnet_rows >= TERM_ROWS_MIN && telnet_rows <= TERM_ROWS_MAX)
    447 rows = telnet_rows;
    448 } else {
    449 lprintf(LOG_NOTICE, "no Telnet commands received, reverting to Raw TCP mode");
    CID 469141: Data race undermines locking (LOCK_EVASION)
    Thread1 sets "telnet_mode" to a new value. Now the two threads have an inconsistent view of "telnet_mode" and updates to fields correlated with "telnet_mode" may be lost.
    450 telnet_mode |= TELNET_MODE_OFF;
    451 client.protocol = "Raw";
    452 client_on(client_socket, &client,/* update: */true);
    453 SAFECOPY(connection, client.protocol);
    454 node_connection = NODE_CONNECTION_RAW;
    455 }

    ** CID 469140: Error handling issues (CHECKED_RETURN)
    /mqtt.c: 521 in mqtt_message_received()


    ________________________________________________________________________________________________________
    *** CID 469140: Error handling issues (CHECKED_RETURN)
    /mqtt.c: 521 in mqtt_message_received()
    515 if(bbs_startup->node_inbuf != NULL && bbs_startup->node_inbuf[i - 1] != NULL)
    516 RingBufWrite(bbs_startup->node_inbuf[i - 1], msg->payload, msg->payloadlen);
    517 return;
    518 }
    519 for(int i = bbs_startup->first_node; i <= bbs_startup->last_node; i++) {
    520 if(strcmp(msg->topic, mqtt_topic(mqtt, TOPIC_BBS, topic, sizeof(topic), "node/%d/msg", i)) == 0) {
    CID 469140: Error handling issues (CHECKED_RETURN)
    Calling "putnmsg" without checking return value (as is done elsewhere 4 out of 5 times).
    521 putnmsg(mqtt->cfg, i, msg->payload); 522 return;
    523 }
    524 if(strcmp(msg->topic, mqtt_topic(mqtt, TOPIC_BBS, topic, sizeof(topic), "node/%d/set/status", i)) == 0) {
    525 set_node_status(mqtt->cfg, i, mqtt_message_value(msg, 0));
    526 return;

    ** CID 469139: Resource leaks (RESOURCE_LEAK) /tmp/sbbs-Nov-22-2023/3rdp/src/mozjs/js-1.8.5/js/src/jscntxt.h: 1376 in JSRuntime::realloc(void *, unsigned long, unsigned long, JSContext *)()


    ________________________________________________________________________________________________________
    *** CID 469139: Resource leaks (RESOURCE_LEAK) /tmp/sbbs-Nov-22-2023/3rdp/src/mozjs/js-1.8.5/js/src/jscntxt.h: 1376 in JSRuntime::realloc(void *, unsigned long, unsigned long, JSContext *)()
    1370 }
    1371
    1372 void* realloc(void* p, size_t oldBytes, size_t newBytes, JSContext *cx = NULL) {
    1373 JS_ASSERT(oldBytes < newBytes);
    1374 updateMallocCounter(newBytes - oldBytes);
    1375 void *p2 = ::js_realloc(p, newBytes);
    CID 469139: Resource leaks (RESOURCE_LEAK)
    Failing to save or free storage allocated by "this->onOutOfMemory(p, newBytes, cx)" leaks it.
    1376 return JS_LIKELY(!!p2) ? p2 : onOutOfMemory(p, newBytes, cx); 1377 }
    1378
    1379 void* realloc(void* p, size_t bytes, JSContext *cx = NULL) {
    1380 /*
    1381 * For compatibility we do not account for realloc that increases

    ** CID 469138: Uninitialized variables (UNINIT)
    /getkey.cpp: 354 in sbbs_t::getkeys(const char *, unsigned int, int)()


    ________________________________________________________________________________________________________
    *** CID 469138: Uninitialized variables (UNINIT)
    /getkey.cpp: 354 in sbbs_t::getkeys(const char *, unsigned int, int)()
    348 attr(LIGHTGRAY);
    349 CRLF;
    350 }
    351 lncntr=0;
    352 return(-1);
    353 }
    CID 469138: Uninitialized variables (UNINIT)
    Using uninitialized value "*str" when calling "strchr". [Note: The source code implementation of the function has been overridden by a builtin model.]
    354 if(ch && !n && ((keys == NULL && !IS_DIGIT(ch)) || (strchr(str,ch)))) { /* return character if in string */
    355 if(ch > ' ') {
    356 if(!(mode&K_NOECHO))
    357 outchar(ch);
    358 if(useron.misc&COLDKEYS) {
    359 while(online && !(sys_status&SS_ABORT)) {

    ** CID 469137: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Nov-22-2023/3rdp/src/mozjs/js-1.8.5/js/src/ctypes/libffi/src/dlmalloc.c: 3549 in sys_alloc()


    ________________________________________________________________________________________________________
    *** CID 469137: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Nov-22-2023/3rdp/src/mozjs/js-1.8.5/js/src/ctypes/libffi/src/dlmalloc.c: 3549 in sys_alloc()
    3543 m->max_footprint = m->footprint;
    3544
    3545 if (!is_initialized(m)) { /* first-time initialization */
    3546 m->seg.base = m->least_addr = tbase;
    3547 m->seg.size = tsize;
    3548 set_segment_flags(&m->seg, mmap_flag);
    CID 469137: Concurrent data access violations (MISSING_LOCK)
    Accessing "mparams.magic" without holding lock "magic_init_mutex". Elsewhere, "malloc_params.magic" is written to with "magic_init_mutex" held 1 out of 1 times.
    3549 m->magic = mparams.magic;
    3550 init_bins(m);
    3551 if (is_global(m))
    3552 init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
    3553 else {
    3554 /* Offset top by embedded malloc_state */

    ** CID 469136: Program hangs (LOCK)
    /js_console.cpp: 2175 in js_lock_input(JSContext *, unsigned int, unsigned long *)()


    ________________________________________________________________________________________________________
    *** CID 469136: Program hangs (LOCK)
    /js_console.cpp: 2175 in js_lock_input(JSContext *, unsigned int, unsigned long *)()
    2169 pthread_mutex_lock(&sbbs->input_thread_mutex);
    2170 } else {
    2171 pthread_mutex_unlock(&sbbs->input_thread_mutex);
    2172 }
    2173 JS_RESUMEREQUEST(cx, rc);
    2174
    CID 469136: Program hangs (LOCK)
    Returning without unlocking "sbbs->input_thread_mutex".
    2175 return(JS_TRUE);
    2176 }
    2177
    2178 static JSBool
    2179 js_telnet_cmd(JSContext *cx, uintN argc, jsval *arglist)
    2180 {

    ** CID 469135: Concurrent data access violations (MISSING_LOCK)
    /js_rtpool.c: 35 in jsrt_GetNew()


    ________________________________________________________________________________________________________
    *** CID 469135: Concurrent data access violations (MISSING_LOCK) /js_rtpool.c: 35 in jsrt_GetNew()
    29 {
    30 JSRuntime *ret;
    31
    32 if(!initialized) {
    33 initialized=TRUE;
    34 pthread_mutex_init(&jsrt_mutex, NULL);
    CID 469135: Concurrent data access violations (MISSING_LOCK)
    Accessing "rt_list" without holding lock "jsrt_mutex". Elsewhere, "rt_list" is written to with "jsrt_mutex" held 4 out of 5 times.
    35 listInit(&rt_list, 0);
    36 _beginthread(trigger_thread, TRIGGER_THREAD_STACK_SIZE, NULL); 37 }
    38 pthread_mutex_lock(&jsrt_mutex);
    39 ret=JS_NewRuntime(maxbytes);
    40 listPushNode(&rt_list, ret);

    ** CID 469134: Program hangs (LOCK)
    /writemsg.cpp: 1274 in sbbs_t::editfile(char *, unsigned int)()


    ________________________________________________________________________________________________________
    *** CID 469134: Program hangs (LOCK)
    /writemsg.cpp: 1274 in sbbs_t::editfile(char *, unsigned int)()
    1268 if(cfg.xedit[useron_xedit-1]->misc&WWIVCOLOR) 1269 mode|=EX_WWIV;
    1270 }
    1271 CLS;
    1272 rioctl(IOCM|PAUSE|ABORT);
    1273 if(external(cmdstr(cfg.xedit[useron_xedit-1]->rcmd,msgtmp,nulstr,NULL,mode), mode, cfg.node_dir)!=0)
    CID 469134: Program hangs (LOCK)
    Returning without unlocking "this->input_thread_mutex".
    1274 return false;
    1275 l=process_edited_file(msgtmp, path, /* mode: */WM_EDIT, &lines,maxlines);
    1276 if(l>0) {
    1277 SAFEPRINTF3(str,"created or edited file: %s (%ld bytes, %u lines)"
    1278 ,path, l, lines);
    1279 logline(LOG_NOTICE,nulstr,str);

    ** CID 469133: Memory - corruptions (OVERRUN)


    ________________________________________________________________________________________________________
    *** CID 469133: Memory - corruptions (OVERRUN) /tmp/sbbs-Nov-22-2023/3rdp/src/mozjs/js-1.8.5/js/src/jsobjinlines.h: 952 in js::NewNativeClassInstance(JSContext *, js::Class *, JSObject *, JSObject *)()
    946 }
    947
    948 static inline JSObject *
    949 NewNativeClassInstance(JSContext *cx, Class *clasp, JSObject *proto, JSObject *parent)
    950 {
    951 gc::FinalizeKind kind = gc::GetGCObjectKind(JSCLASS_RESERVED_SLOTS(clasp));
    CID 469133: Memory - corruptions (OVERRUN)
    Overrunning callee's array of size 11 by passing argument "kind" (which evaluates to 11) in call to "NewNativeClassInstance".
    952 return NewNativeClassInstance(cx, clasp, proto, parent, kind);
    953 }
    954
    955 bool
    956 FindClassPrototype(JSContext *cx, JSObject *scope, JSProtoKey protoKey, JSObject **protop,
    957 Class *clasp);

    ** CID 469132: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Nov-22-2023/src/conio/sdl_con.c: 692 in sdl_add_key()


    ________________________________________________________________________________________________________
    *** CID 469132: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Nov-22-2023/src/conio/sdl_con.c: 692 in sdl_add_key()
    686 static void sdl_add_key(unsigned int keyval, struct video_stats *vs) 687 {
    688 if(keyval==0xa600 && vs != NULL) {
    689 fullscreen=!fullscreen;
    690 cio_api.mode=fullscreen?CIOLIB_MODE_SDL_FULLSCREEN:CIOLIB_MODE_SDL;
    691 update_cvstat(vs);
    CID 469132: Concurrent data access violations (MISSING_LOCK)
    Accessing "win" without holding lock "win_mutex". Elsewhere, "win" is written to with "win_mutex" held 1 out of 1 times.
    692 sdl.SetWindowFullscreen(win, fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0);
    693 if (!fullscreen) {
    694 int w, h;
    695
    696 // Get current window size
    697 sdl.GetWindowSize(win, &w, &h);

    ** CID 469131: Concurrent data access violations (MISSING_LOCK)
    /exec.cpp: 848 in sbbs_t::skipto(csi_t *, unsigned char)()


    ________________________________________________________________________________________________________
    *** CID 469131: Concurrent data access violations (MISSING_LOCK)
    /exec.cpp: 848 in sbbs_t::skipto(csi_t *, unsigned char)()
    842 /* Skcsi->ip to a specific instruction */
    843 /****************************************************************************/
    844 void sbbs_t::skipto(csi_t *csi, uchar inst)
    845 {
    846 int i,j;
    847
    CID 469131: Concurrent data access violations (MISSING_LOCK)
    Accessing "csi->cs" without holding lock "sbbs_t.input_thread_mutex". Elsewhere, "csi_t.cs" is written to with "sbbs_t.input_thread_mutex" held 3 out of 3 times.
    848 while(csi->ip<csi->cs+csi->length && ((inst&0x80) || *csi->ip!=inst)) {
    849
    850 if(*csi->ip==CS_IF_TRUE || *csi->ip==CS_IF_FALSE
    851 || (*csi->ip>=CS_IF_GREATER && *csi->ip<=CS_IF_LESS_OR_EQUAL)) {
    852 csi->ip++;
    853 skipto(csi,CS_ENDIF);

    ** CID 469130: Program hangs (LOCK)
    /writemsg.cpp: 628 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()


    ________________________________________________________________________________________________________
    *** CID 469130: Program hangs (LOCK)
    /writemsg.cpp: 628 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()
    622 lprintf(LOG_ERR, "ERROR %d (%s) saving draft message: %s", errno, strerror(errno), draft);
    623 }
    624
    625 if(result != EXIT_SUCCESS || !fexistcase(msgtmp) || !online
    626 || (linesquoted && qlen==flength(msgtmp) && qtime==fdate(msgtmp))) {
    627 free(buf);
    CID 469130: Program hangs (LOCK)
    Returning without unlocking "this->input_thread_mutex".
    628 return(false);
    629 }
    630 SAFEPRINTF(str,"%sRESULT.ED",cfg.node_dir);
    631 if(!(mode&(WM_EXTDESC|WM_FILE))
    632 && fexistcase(str)) {
    633 if((fp=fopen(str,"r")) != NULL) {

    ** CID 469129: Data race undermines locking (LOCK_EVASION)
    /main.cpp: 3908 in sbbs_t::hangup()()


    ________________________________________________________________________________________________________
    *** CID 469129: Data race undermines locking (LOCK_EVASION)
    /main.cpp: 3908 in sbbs_t::hangup()()
    3902 if(client_socket!=INVALID_SOCKET) {
    3903 mswait(1000); /* Give socket output buffer time to flush */
    3904 client_off(client_socket);
    3905 if(ssh_mode) {
    3906 pthread_mutex_lock(&ssh_mutex);
    3907 ssh_session_destroy(client_socket, ssh_session, __LINE__);
    CID 469129: Data race undermines locking (LOCK_EVASION)
    Thread1 sets "ssh_mode" to a new value. Now the two threads have an inconsistent view of "ssh_mode" and updates to fields correlated with "ssh_mode" may be lost.
    3908 ssh_mode = false;
    3909 pthread_mutex_unlock(&ssh_mutex);
    3910 }
    3911 close_socket(client_socket);
    3912 client_socket=INVALID_SOCKET;
    3913 }

    ** CID 469128: Code maintainability issues (UNUSED_VALUE)
    /scfg/scfgchat.c: 716 in guru_cfg()


    ________________________________________________________________________________________________________
    *** CID 469128: Code maintainability issues (UNUSED_VALUE)
    /scfg/scfgchat.c: 716 in guru_cfg()
    710 *cfg.guru[i]=savguru;
    711 uifc.changes=1;
    712 continue;
    713 }
    714 if (msk != 0)
    715 continue;
    CID 469128: Code maintainability issues (UNUSED_VALUE)
    Assigning value "0" to "j" here, but that stored value is overwritten before it can be used.
    716 j=0;
    717 done=0;
    718 while(!done) {
    719 k=0;
    720 snprintf(opt[k++],MAX_OPLN,"%-27.27s%s","Guru Name",cfg.guru[i]->name);
    721 snprintf(opt[k++],MAX_OPLN,"%-27.27s%s","Guru Internal Code",cfg.guru[i]->code);

    ** CID 469127: Code maintainability issues (UNUSED_VALUE)
    /scfg/scfgchat.c: 873 in actsets_cfg()


    ________________________________________________________________________________________________________
    *** CID 469127: Code maintainability issues (UNUSED_VALUE)
    /scfg/scfgchat.c: 873 in actsets_cfg()
    867 uifc.changes=1;
    868 continue;
    869 }
    870 if (msk != 0)
    871 continue;
    872
    CID 469127: Code maintainability issues (UNUSED_VALUE)
    Assigning value "0" to "j" here, but that stored value is overwritten before it can be used.
    873 j=0;
    874 done=0;
    875 while(!done) {
    876 k=0;
    877 snprintf(opt[k++],MAX_OPLN,"%-27.27s%s","Action Set Name",cfg.actset[i]->name);
    878 snprintf(opt[k++],MAX_OPLN,"%-27.27s","Configure Chat Actions...");

    ** CID 469126: Data race undermines locking (LOCK_EVASION) /tmp/sbbs-Nov-22-2023/src/conio/sdl_con.c: 1196 in sdl_video_event_thread()


    ________________________________________________________________________________________________________
    *** CID 469126: Data race undermines locking (LOCK_EVASION) /tmp/sbbs-Nov-22-2023/src/conio/sdl_con.c: 1196 in sdl_video_event_thread() 1190 break;
    1191 case SDL_USEREVENT_INIT:
    1192 if(!sdl_init_good) { 1193 if(sdl.WasInit(SDL_INIT_VIDEO)==SDL_INIT_VIDEO) {
    1194 pthread_mutex_lock(&win_mutex);
    1195 _beginthread(sdl_mouse_thread, 0, NULL);
    CID 469126: Data race undermines locking (LOCK_EVASION)
    Thread1 sets "sdl_init_good" to a new value. Now the two threads have an inconsistent view of "sdl_init_good" and updates to fields correlated with "sdl_init_good" may be lost.
    1196 sdl_init_good=1;
    1197 pthread_mutex_unlock(&win_mutex);
    1198 }
    1199 }
    1200 sdl_ufunc_retval=0; 1201 sem_post(&sdl_ufunc_ret);

    ** CID 469125: Program hangs (LOCK)
    /js_console.cpp: 2149 in js_do_lock_input()


    ________________________________________________________________________________________________________
    *** CID 469125: Program hangs (LOCK)
    /js_console.cpp: 2149 in js_do_lock_input()
    2143
    2144 if(lock) {
    2145 pthread_mutex_lock(&sbbs->input_thread_mutex);
    2146 } else {
    2147 pthread_mutex_unlock(&sbbs->input_thread_mutex);
    2148 }
    CID 469125: Program hangs (LOCK)
    Returning without unlocking "sbbs->input_thread_mutex".
    2149 }
    2150
    2151 static JSBool
    2152 js_lock_input(JSContext *cx, uintN argc, jsval *arglist)
    2153 {
    2154 jsval *argv=JS_ARGV(cx, arglist);

    ** CID 469124: Resource leaks (RESOURCE_LEAK) /tmp/sbbs-Nov-22-2023/3rdp/src/mozjs/js-1.8.5/js/src/jscntxt.h: 1387 in JSRuntime::realloc(void *, unsigned long, JSContext *)()


    ________________________________________________________________________________________________________
    *** CID 469124: Resource leaks (RESOURCE_LEAK) /tmp/sbbs-Nov-22-2023/3rdp/src/mozjs/js-1.8.5/js/src/jscntxt.h: 1387 in JSRuntime::realloc(void *, unsigned long, JSContext *)()
    1381 * For compatibility we do not account for realloc that increases
    1382 * previously allocated memory.
    1383 */
    1384 if (!p)
    1385 updateMallocCounter(bytes);
    1386 void *p2 = ::js_realloc(p, bytes);
    CID 469124: Resource leaks (RESOURCE_LEAK)
    Failing to save or free storage allocated by "this->onOutOfMemory(p, bytes, cx)" leaks it.
    1387 return JS_LIKELY(!!p2) ? p2 : onOutOfMemory(p, bytes, cx); 1388 }
    1389
    1390 void free(void* p) { ::js_free(p); }
    1391
    1392 bool isGCMallocLimitReached() const { return gcMallocBytes <= 0; }

    ** CID 469123: Memory - corruptions (USE_AFTER_FREE) /tmp/sbbs-Nov-22-2023/3rdp/src/mozjs/js-1.8.5/js/src/ctypes/libffi/src/dlmalloc.c: 3642 in release_unused_segments()


    ________________________________________________________________________________________________________
    *** CID 469123: Memory - corruptions (USE_AFTER_FREE) /tmp/sbbs-Nov-22-2023/3rdp/src/mozjs/js-1.8.5/js/src/ctypes/libffi/src/dlmalloc.c: 3642 in release_unused_segments()
    3636 m->footprint -= size;
    3637 /* unlink obsoleted record */
    3638 sp = pred;
    3639 sp->next = next;
    3640 }
    3641 else { /* back out if cannot unmap */
    CID 469123: Memory - corruptions (USE_AFTER_FREE)
    Dereferencing freed pointer "tp".
    3642 insert_large_chunk(m, tp, psize);
    3643 }
    3644 }
    3645 }
    3646 pred = sp;
    3647 sp = next;

    ** CID 469122: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Nov-22-2023/src/conio/bitmap_con.c: 1945 in bitmap_drv_init()


    ________________________________________________________________________________________________________
    *** CID 469122: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Nov-22-2023/src/conio/bitmap_con.c: 1945 in bitmap_drv_init()
    1939 }
    1940 pthread_mutex_unlock(&screenlock);
    1941 pthread_mutex_unlock(&vstatlock);
    1942
    1943 callbacks.drawrect=drawrect_cb;
    1944 callbacks.flush=flush_cb;
    CID 469122: Concurrent data access violations (MISSING_LOCK)
    Accessing "callbacks.rects" without holding lock "bitmap_callbacks.lock". Elsewhere, "bitmap_callbacks.rects" is written to with "bitmap_callbacks.lock" held 2 out of 3 times.
    1945 callbacks.rects = 0;
    1946 bitmap_initialized=1;
    1947 _beginthread(blinker_thread,0,NULL);
    1948
    1949 return(0);
    1950 }


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3DezJc_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrDT3F0wM8qs717Yj7QnFBvYyAUS7vXZd5Pzj9EaE-2FCuUUR9NEokXV0L9QGkQnwKG-2F4JnYcm1wvoWK2grpdczQI6n7wuX-2Bi09RPQD8-2Fo5FYqgA3L383Nxk-2F3tA3xct0exbA8dNWXjcBJFMBco67mM0qFopWSHsWYNweS2rfwVJx4JQ-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Thursday, November 23, 2023 13:39:20
    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.
    11 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 469167: (SLEEP)


    ________________________________________________________________________________________________________
    *** CID 469167: (SLEEP)
    /main.cpp: 2494 in output_thread(void *)()
    2488 */
    2489 size_t sendbytes = buftop-bufbot;
    2490 if (sendbytes > 0x2000)
    2491 sendbytes = 0x2000;
    2492 if(cryptStatusError((err=cryptPushData(sbbs->ssh_session, (char*)buf+bufbot, buftop-bufbot, &i)))) {
    2493 /* Handle the SSH error here... */
    CID 469167: (SLEEP)
    Call to "lprintf" might sleep while holding lock "sbbs->ssh_mutex". 2494 GCESSTR(err, node, sbbs->ssh_session, "pushing data");
    2495 ssh_errors++;
    2496 sbbs->online=FALSE;
    2497 i=buftop-bufbot; // Pretend we sent it all
    2498 }
    2499 else {
    /main.cpp: 2479 in output_thread(void *)()
    2473 }
    2474 if(!sbbs->ssh_mode) {
    2475 pthread_mutex_unlock(&sbbs->ssh_mutex); 2476 continue;
    2477 }
    2478 if (cryptStatusError((err=cryptSetAttribute(sbbs->ssh_session, CRYPT_SESSINFO_SSH_CHANNEL, sbbs->session_channel)))) {
    CID 469167: (SLEEP)
    Call to "lprintf" might sleep while holding lock "sbbs->ssh_mutex". 2479 GCESSTR(err, node, sbbs->ssh_session, "setting channel");
    2480 ssh_errors++;
    2481 sbbs->online=FALSE;
    2482 i=buftop-bufbot; // Pretend we sent it all
    2483 }
    2484 else {


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3D5OUN_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrAWre6lEuRZshFB9v23oRHfb6cJViSmU6jeWo6H6qjr2TD-2FKFU3E7Wk43r5o6gE3xpEUu2LCxXDEO7eIcPPMxFL1Nq6AhOVschJGcr-2Bj9V3IL2-2BV5MIEfM79IRScL2ukizExtyrX8BpZAnSaCd3CJdrnZtJg68NUadTHcpkaQqA0A-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Saturday, December 09, 2023 13:46:36
    Hi,

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

    5 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 5 of 5 defect(s)


    ** CID 470390: Program hangs (LOCK)
    /viewfile.cpp: 111 in sbbs_t::viewfile(const char *)()


    ________________________________________________________________________________________________________
    *** CID 470390: Program hangs (LOCK)
    /viewfile.cpp: 111 in sbbs_t::viewfile(const char *)()
    105 if(i >= cfg.total_fviews) {
    106 bprintf(text[NonviewableFile], getfname(path));
    107 return false;
    108 }
    109 if((i=external(cmdstr(viewcmd, path, path, NULL), EX_STDIO|EX_SH))!=0) {
    110 errormsg(WHERE,ERR_EXEC,viewcmd,i); /* must have EX_SH to ^C */
    CID 470390: Program hangs (LOCK)
    Returning without unlocking "this->input_thread_mutex".
    111 return false;
    112 }
    113 return true;
    114 }
    115
    116 /****************************************************************************/

    ** CID 470389: (SLEEP)


    ________________________________________________________________________________________________________
    *** CID 470389: (SLEEP)
    /upload.cpp: 84 in sbbs_t::uploadfile(smbmsg_t *)()
    78 safe_snprintf(str,sizeof(str),"attempted to upload %s to %s %s (%s error code %d)"
    79 ,f->name
    80 ,cfg.lib[cfg.dir[f->dir]->lib]->sname,cfg.dir[f->dir]->sname,cfg.ftest[i]->ext
    81 ,result);
    82 logline(LOG_NOTICE,"U!",str);
    83 bprintf(text[FileHadErrors],f->name,cfg.ftest[i]->ext);
    CID 470389: (SLEEP)
    Call to "yesno" might sleep while holding lock "this->input_thread_mutex".
    84 if(!SYSOP || yesno(text[DeleteFileQ]))
    85 remove(path);
    86 return false;
    87 }
    88 SAFEPRINTF(str,"%ssbbsfile.nam",cfg.node_dir);
    89 if((stream=fopen(str,"r"))!=NULL) {
    /upload.cpp: 76 in sbbs_t::uploadfile(smbmsg_t *)()
    70 if(f->desc != NULL)
    71 fprintf(stream, "%s", f->desc);
    72 fclose(stream);
    73 }
    74 // Note: str (%s) is path/to/sbbsfile.des (used to be the description itself)
    75 int result = external(cmdstr(cfg.ftest[i]->cmd, path, str, NULL), EX_OFFLINE);
    CID 470389: (SLEEP)
    Call to "clearline" might sleep while holding lock "this->input_thread_mutex".
    76 clearline();
    77 if(result != 0) {
    78 safe_snprintf(str,sizeof(str),"attempted to upload %s to %s %s (%s error code %d)"
    79 ,f->name
    80 ,cfg.lib[cfg.dir[f->dir]->lib]->sname,cfg.dir[f->dir]->sname,cfg.ftest[i]->ext
    81 ,result);

    ** CID 470388: Program hangs (SLEEP)


    ________________________________________________________________________________________________________
    *** CID 470388: Program hangs (SLEEP)
    /inkey.cpp: 203 in sbbs_t::handle_ctrlkey(char, int)()
    197 }
    198 js_execfile(cmdstr(cfg.hotkey[i]->cmd+1,nulstr,nulstr,tmp), /* startup_dir: */NULL, /* scope: */js_hotkey_glob, js_hotkey_cx, js_hotkey_glob);
    199 } else
    200 external(cmdstr(cfg.hotkey[i]->cmd,nulstr,nulstr,tmp),0);
    201 if(!(sys_status&SS_SPLITP)) {
    202 CRLF;
    CID 470388: Program hangs (SLEEP)
    Call to "restoreline" might sleep while holding lock "this->input_thread_mutex".
    203 restoreline();
    204 }
    205 lncntr=0;
    206 hotkey_inside &= ~(1<<ch);
    207 return(0);
    208 }

    ** CID 470387: Program hangs (LOCK)
    /chat.cpp: 654 in sbbs_t::sysop_page()()


    ________________________________________________________________________________________________________
    *** CID 470387: Program hangs (LOCK)
    /chat.cpp: 654 in sbbs_t::sysop_page()()
    648 ,sys_status&SS_SYSPAGE ? text[On] : text[Off]);
    649 nosound();
    650 }
    651 if(!(sys_status&SS_SYSPAGE))
    652 remove(syspage_semfile);
    653
    CID 470387: Program hangs (LOCK)
    Returning without unlocking "this->input_thread_mutex".
    654 return(true);
    655 }
    656
    657 bprintf(text[SysopIsNotAvailable],cfg.sys_op);
    658
    659 return(false);

    ** CID 470386: Program hangs (LOCK)
    /upload.cpp: 86 in sbbs_t::uploadfile(smbmsg_t *)()


    ________________________________________________________________________________________________________
    *** CID 470386: Program hangs (LOCK)
    /upload.cpp: 86 in sbbs_t::uploadfile(smbmsg_t *)()
    80 ,cfg.lib[cfg.dir[f->dir]->lib]->sname,cfg.dir[f->dir]->sname,cfg.ftest[i]->ext
    81 ,result);
    82 logline(LOG_NOTICE,"U!",str);
    83 bprintf(text[FileHadErrors],f->name,cfg.ftest[i]->ext);
    84 if(!SYSOP || yesno(text[DeleteFileQ]))
    85 remove(path);
    CID 470386: Program hangs (LOCK)
    Returning without unlocking "this->input_thread_mutex".
    86 return false;
    87 }
    88 SAFEPRINTF(str,"%ssbbsfile.nam",cfg.node_dir);
    89 if((stream=fopen(str,"r"))!=NULL) {
    90 if(fgets(str, sizeof(str), stream)) {
    91 truncsp(str);


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3DH5pk_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrA21pPFXGEfXQOHUavDSOcBiYGiM9SWkNBClk7lfGbusFiEUl9SxTFTJ4pQ4-2BlyM1UpLT55ROOl-2F1zOiBksbquFQPYPy5IMrVblt0Rt7EqhjGmGGXslDjsDDEmF37IS-2FgX2UOIpLYk00zJWe4Ps-2Bw7o9YA3yT5trQhVa4wKyo5Ljw-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Monday, December 11, 2023 13:38:31
    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 470457: Incorrect expression (SIZEOF_MISMATCH)
    /umonitor/chat.c: 201 in chat()


    ________________________________________________________________________________________________________
    *** CID 470457: Incorrect expression (SIZEOF_MISMATCH)
    /umonitor/chat.c: 201 in chat()
    195 in=-1;
    196 }
    197
    198 utime(inpath,NULL);
    199 _setcursortype(_NORMALCURSOR);
    200 while(1) {
    CID 470457: Incorrect expression (SIZEOF_MISMATCH)
    Passing argument "&ch" of type "int *" and argument "1UL" to function "read" is suspicious because "sizeof (int) /*4*/" is expected.
    201 switch(read(in,&ch,1)) {
    202 case -1:
    203 close(in);
    204 in=-1;
    205 break;
    206


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3Dn7r8_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrC64hJyXzK3aRg-2FOh461xBPdPC3vMQG8wDm6SWRjPpByDWCbozrDoO3h7iN9haQ83FqvIEsneqqmYW1iHtvLfyFr9U7fTJVs-2FgzA-2B3NTVwG-2FkEOdCKTFxrJHyVvcaeKfjx-2FNRzmWtNl3SJh8ILqS8rD31VNGhVX-2F4wDJ-2F-2FhL0JK9w-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Thursday, December 14, 2023 13:44:11
    Hi,

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

    5 new defect(s) introduced to Synchronet found with Coverity Scan.
    6 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 5 of 5 defect(s)


    ** CID 470557: Resource leaks (RESOURCE_LEAK)
    /mailsrvr.c: 3122 in smtp_client_thread()


    ________________________________________________________________________________________________________
    *** CID 470557: Resource leaks (RESOURCE_LEAK)
    /mailsrvr.c: 3122 in smtp_client_thread()
    3116 }
    3117
    3118 BOOL* mailproc_to_match = calloc(sizeof(*mailproc_to_match), mailproc_count);
    3119 if(mailproc_to_match == NULL) {
    3120 lprintf(LOG_CRIT,"%04d %s !ERROR allocating memory for mailproc_to_match", socket, client.protocol);
    3121 sockprintf(socket,client.protocol,session,smtp_error, "malloc failure");
    CID 470557: Resource leaks (RESOURCE_LEAK)
    Variable "spy" going out of scope leaks the storage it points to.
    3122 return false;
    3123 }
    3124
    3125 /* SMTP session active: */
    3126
    3127 sockprintf(socket,client.protocol,session,"220 %s Synchronet %s Server %s%c-%s Ready"

    ** CID 470556: (DC.WEAK_CRYPTO)
    /mailsrvr.c: 1157 in pop3_client_thread()
    /mailsrvr.c: 1159 in pop3_client_thread()


    ________________________________________________________________________________________________________
    *** CID 470556: (DC.WEAK_CRYPTO)
    /mailsrvr.c: 1157 in pop3_client_thread()
    1151 memset(&smb,0,sizeof(smb));
    1152 memset(&msg,0,sizeof(msg));
    1153 memset(&user,0,sizeof(user));
    1154 password[0]=0;
    1155
    1156 srand((unsigned int)(time(NULL) ^ (time_t)GetCurrentThreadId())); /* seed random number generator */
    CID 470556: (DC.WEAK_CRYPTO)
    "rand" should not be used for security-related applications, because linear congruential algorithms are too easy to break.
    1157 rand(); /* throw-away first result */
    1158 safe_snprintf(challenge,sizeof(challenge),"<%x%x%lx%lx@%.128s>"
    1159 ,rand(),socket,(ulong)time(NULL),(ulong)clock(), server_host_name());
    1160
    1161 sockprintf(socket,client.protocol,session,"+OK Synchronet %s Server %s%c-%s Ready %s"
    1162 ,client.protocol, VERSION, REVISION, PLATFORM_DESC, challenge);
    /mailsrvr.c: 1159 in pop3_client_thread()
    1153 memset(&user,0,sizeof(user));
    1154 password[0]=0;
    1155
    1156 srand((unsigned int)(time(NULL) ^ (time_t)GetCurrentThreadId())); /* seed random number generator */
    1157 rand(); /* throw-away first result */
    1158 safe_snprintf(challenge,sizeof(challenge),"<%x%x%lx%lx@%.128s>"
    CID 470556: (DC.WEAK_CRYPTO)
    "rand" should not be used for security-related applications, because linear congruential algorithms are too easy to break.
    1159 ,rand(),socket,(ulong)time(NULL),(ulong)clock(), server_host_name());
    1160
    1161 sockprintf(socket,client.protocol,session,"+OK Synchronet %s Server %s%c-%s Ready %s"
    1162 ,client.protocol, VERSION, REVISION, PLATFORM_DESC, challenge);
    1163
    1164 /* Requires USER or APOP command first */

    ** CID 470555: Error handling issues (CHECKED_RETURN)
    /mailsrvr.c: 1089 in pop3_client_thread()


    ________________________________________________________________________________________________________
    *** CID 470555: Error handling issues (CHECKED_RETURN)
    /mailsrvr.c: 1089 in pop3_client_thread()
    1083 if ((stat=cryptSetAttribute(session, CRYPT_SESSINFO_PRIVATEKEY, scfg.tls_certificate)) != CRYPT_OK) {
    1084 unlock_ssl_cert();
    1085 GCESH(stat, client.protocol, socket, host_ip, session, "setting private key");
    1086 return false;
    1087 }
    1088 nodelay = TRUE;
    CID 470555: Error handling issues (CHECKED_RETURN)
    Calling "setsockopt(socket, IPPROTO_TCP, 1, (char *)&nodelay, 4U)" without checking return value. This library function may fail and return an error code.
    1089 setsockopt(socket,IPPROTO_TCP,TCP_NODELAY,(char*)&nodelay,sizeof(nodelay));
    1090 nb=0;
    1091 ioctlsocket(socket,FIONBIO,&nb);
    1092 if ((stat = cryptSetAttribute(session, CRYPT_SESSINFO_NETWORKSOCKET, socket)) != CRYPT_OK) {
    1093 unlock_ssl_cert();
    1094 GCESH(stat, client.protocol, socket, host_ip, session, "setting session socket");

    ** CID 470554: Resource leaks (RESOURCE_LEAK)
    /mailsrvr.c: 3122 in smtp_client_thread()


    ________________________________________________________________________________________________________
    *** CID 470554: Resource leaks (RESOURCE_LEAK)
    /mailsrvr.c: 3122 in smtp_client_thread()
    3116 }
    3117
    3118 BOOL* mailproc_to_match = calloc(sizeof(*mailproc_to_match), mailproc_count);
    3119 if(mailproc_to_match == NULL) {
    3120 lprintf(LOG_CRIT,"%04d %s !ERROR allocating memory for mailproc_to_match", socket, client.protocol);
    3121 sockprintf(socket,client.protocol,session,smtp_error, "malloc failure");
    CID 470554: Resource leaks (RESOURCE_LEAK)
    Variable "rcptlst" going out of scope leaks the storage it points to. 3122 return false;
    3123 }
    3124
    3125 /* SMTP session active: */
    3126
    3127 sockprintf(socket,client.protocol,session,"220 %s Synchronet %s Server %s%c-%s Ready"

    ** CID 470553: (DC.WEAK_CRYPTO)
    /mailsrvr.c: 4204 in smtp_client_thread()
    /mailsrvr.c: 3078 in smtp_client_thread()
    /mailsrvr.c: 3079 in smtp_client_thread()


    ________________________________________________________________________________________________________
    *** CID 470553: (DC.WEAK_CRYPTO)
    /mailsrvr.c: 4204 in smtp_client_thread()
    4198 }
    4199 if(!stricmp(buf,"AUTH CRAM-MD5")) {
    4200 ZERO_VAR(relay_user);
    4201 listRemoveTaggedNode(&current_logins, socket, /* free_data */TRUE);
    4202
    4203 safe_snprintf(challenge,sizeof(challenge),"<%x%x%lx%lx@%s>"
    CID 470553: (DC.WEAK_CRYPTO)
    "rand" should not be used for security-related applications, because linear congruential algorithms are too easy to break.
    4204 ,rand(),socket,(ulong)time(NULL),(ulong)clock(),server_host_name());
    4205 #if 0
    4206 lprintf(LOG_DEBUG,"%04d SMTP CRAM-MD5 challenge: %s"
    4207 ,socket,challenge);
    4208 #endif
    4209 b64_encode(str,sizeof(str),challenge,strlen(challenge));
    /mailsrvr.c: 3078 in smtp_client_thread()
    3072 }
    3073 SAFEPRINTF(spam.file,"%sspam",scfg.data_dir);
    3074 spam.retry_time=scfg.smb_retry_time;
    3075 spam.subnum=INVALID_SUB;
    3076
    3077 srand((unsigned int)(time(NULL) ^ (time_t)GetCurrentThreadId())); /* seed random number generator */
    CID 470553: (DC.WEAK_CRYPTO)
    "rand" should not be used for security-related applications, because linear congruential algorithms are too easy to break.
    3078 rand(); /* throw-away first result */
    3079 SAFEPRINTF4(session_id,"%x%x%x%lx",getpid(),socket,rand(),(long)clock());
    3080 lprintf(LOG_DEBUG,"%04d %s [%s] Session ID=%s", socket, client.protocol, host_ip, session_id);
    3081 SAFEPRINTF3(msgtxt_fname,"%sSBBS_%s.%s.msg", scfg.temp_dir, client.protocol, session_id);
    3082 SAFEPRINTF3(newtxt_fname,"%sSBBS_%s.%s.new", scfg.temp_dir, client.protocol, session_id);
    3083 SAFEPRINTF3(logtxt_fname,"%sSBBS_%s.%s.log", scfg.temp_dir, client.protocol, session_id);
    /mailsrvr.c: 3079 in smtp_client_thread()
    3073 SAFEPRINTF(spam.file,"%sspam",scfg.data_dir);
    3074 spam.retry_time=scfg.smb_retry_time;
    3075 spam.subnum=INVALID_SUB;
    3076
    3077 srand((unsigned int)(time(NULL) ^ (time_t)GetCurrentThreadId())); /* seed random number generator */
    3078 rand(); /* throw-away first result */
    CID 470553: (DC.WEAK_CRYPTO)
    "rand" should not be used for security-related applications, because linear congruential algorithms are too easy to break.
    3079 SAFEPRINTF4(session_id,"%x%x%x%lx",getpid(),socket,rand(),(long)clock());
    3080 lprintf(LOG_DEBUG,"%04d %s [%s] Session ID=%s", socket, client.protocol, host_ip, session_id);
    3081 SAFEPRINTF3(msgtxt_fname,"%sSBBS_%s.%s.msg", scfg.temp_dir, client.protocol, session_id);
    3082 SAFEPRINTF3(newtxt_fname,"%sSBBS_%s.%s.new", scfg.temp_dir, client.protocol, session_id);
    3083 SAFEPRINTF3(logtxt_fname,"%sSBBS_%s.%s.log", scfg.temp_dir, client.protocol, session_id);
    3084 SAFEPRINTF3(rcptlst_fname,"%sSBBS_%s.%s.lst", scfg.temp_dir, client.protocol, session_id);


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3DMQd3_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrCHTmGHVnVaZLqSbII6djd5LCfNN4WsVVM-2FraC40TFEmwnFiU15BSJwMmbqsO51yAB8H1Xj6zJDPHok6MSfH6DLipAvEvqiECGEj92Ja08CPuUfomEyNGrm6oICWjy04z9LEXD-2FV3t10gYjDHAgXUzBxC2US2YfoE3y-2FXo4-2F5AMeg-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Monday, December 18, 2023 13:39:50
    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 470929: Error handling issues (CHECKED_RETURN)
    /js_system.c: 1474 in js_filter_ip()


    ________________________________________________________________________________________________________
    *** CID 470929: Error handling issues (CHECKED_RETURN)
    /js_system.c: 1474 in js_filter_ip()
    1468 js_system_private_t* sys;
    1469 if((sys = (js_system_private_t*)js_GetClassPrivate(cx,obj,&js_system_class))==NULL)
    1470 return JS_FALSE;
    1471
    1472 for(i=0; i<argc && fname == NULL; i++) {
    1473 if(JSVAL_IS_NUMBER(argv[i])) {
    CID 470929: Error handling issues (CHECKED_RETURN)
    Calling "JS_ValueToInt32" without checking return value (as is done elsewhere 261 out of 293 times).
    1474 JS_ValueToInt32(cx, argv[i], &duration);
    1475 continue;
    1476 }
    1477 if(!JSVAL_IS_STRING(argv[i]))
    1478 continue;
    1479 JSVALUE_TO_MSTRING(cx, argv[i], p, NULL);


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3Dx5vI_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrD-2FFZVvmg9UFbNVSslGQHixwK2gY0JhpVYuBk-2BPEk2wVNUawfpNFUquIquIwrbnMLyXyOL-2Bbdyy88jhCHaZkpnLltM6SvZPalWR8uvzHGJLXvipDKrDTZ6KfbbjJDM-2B9TK-2Bfg-2Bntn7n3JXz8-2BbuvXtlotoQiRFNfFKyqSao3USU5A-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Thursday, December 21, 2023 15:17:37
    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 471381: Null pointer dereferences (NULL_RETURNS)
    /ssl.c: 412 in get_ssl_cert()


    ________________________________________________________________________________________________________
    *** CID 471381: Null pointer dereferences (NULL_RETURNS)
    /ssl.c: 412 in get_ssl_cert()
    406
    407 if(!do_cryptInit())
    408 return -1;
    409 ssl_sync(cfg);
    410 lock_ssl_cert_write();
    411 cert_entry = malloc(sizeof(*cert_entry));
    CID 471381: Null pointer dereferences (NULL_RETURNS)
    Dereferencing "cert_entry", which is known to be "NULL".
    412 cert_entry->sess = -1;
    413 cert_entry->epoch = cert_epoch;
    414 cert_entry->next = NULL;
    415
    416 /* Get the certificate... first try loading it from a file... */
    417 if(cryptStatusOK(cryptKeysetOpen(&ssl_keyset, CRYPT_UNUSED, CRYPT_KEYSET_FILE, cert_path, CRYPT_KEYOPT_READONLY))) {


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3DNVYG_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrAIQBrbLtBWXBu7NOIgqUVW-2FO9u7UhLy-2BFNLgqIU41zpqPfBM73Awa3dQxk3-2F184GO6VUS7KkG6sPhNBuQiQ4Keqf56uFZ5RoDxe4X35uihMatLZZvu1DTj5op2mLHIzl6CugzzedJw-2FjcHjqyoRYDdN5cjuB-2Bi1UXQGnATKvNQkg-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Tuesday, December 26, 2023 13:39:07
    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 471656: Memory - corruptions (OVERRUN)


    ________________________________________________________________________________________________________
    *** CID 471656: Memory - corruptions (OVERRUN) /tmp/sbbs-Dec-26-2023/src/smblib/smbfile.c: 367 in smb_addfile_withlist()
    361
    362 if(list != NULL && *list != NULL) {
    363 size_t size = strListCount(list) * 1024;
    364 auxdata = calloc(1, size);
    365 if(auxdata == NULL)
    366 return SMB_ERR_MEM;
    CID 471656: Memory - corruptions (OVERRUN)
    Calling "strListCombine" with "auxdata" and "size - 1UL" is suspicious because of the very large index, 18446744073709551615. The index may be due to a negative parameter being interpreted as unsigned.
    367 strListCombine(list, auxdata, size - 1, "\r\n");
    368 }
    369 result = smb_addfile(smb, file, storage, extdesc, auxdata, path);
    370 free(auxdata);
    371 return result;
    372 }


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3D2BKI_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrCT6x0GAlc7xThQfLCGiCZdmR4qZP1NcowX1yNXO3dy1e3iYdu3LqPMf8Ps-2BXyXIS9z1-2BExxr9YuMCEQ-2FkgG8-2FT0EoCNRZOLQUTkkQaenBh-2FjMptDjEjYYaLSTPN90hBdPvbODU2Cx91ZtvmuRMrZszCSUsoWukacGJvvm4ij2thw-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Saturday, December 30, 2023 13:39:01
    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.
    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 2 of 2 defect(s)


    ** CID 476254: (NULL_RETURNS) /tmp/sbbs-Dec-30-2023/3rdp/src/cl/session/ssh2_chn.c: 505 in getChannelAttribute()
    /tmp/sbbs-Dec-30-2023/3rdp/src/cl/session/ssh2_chn.c: 517 in getChannelAttribute()
    /tmp/sbbs-Dec-30-2023/3rdp/src/cl/session/ssh2_chn.c: 511 in getChannelAttribute()
    /tmp/sbbs-Dec-30-2023/3rdp/src/cl/session/ssh2_chn.c: 525 in getChannelAttribute()


    ________________________________________________________________________________________________________
    *** CID 476254: (NULL_RETURNS) /tmp/sbbs-Dec-30-2023/3rdp/src/cl/session/ssh2_chn.c: 505 in getChannelAttribute()
    499 if( isNullChannel( channelInfoPtr ) )
    500 return( CRYPT_ERROR_NOTFOUND );
    501 *value = channelInfoPtr->channelID;
    502 return( CRYPT_OK );
    503
    504 case CRYPT_SESSINFO_SSH_CHANNEL_ACTIVE:
    CID 476254: (NULL_RETURNS)
    Dereferencing "writeChannelInfoPtr", which is known to be "NULL".
    505 if( isNullChannel( writeChannelInfoPtr ) )
    506 return( CRYPT_ERROR_NOTFOUND );
    507 *value = isActiveChannel( writeChannelInfoPtr ) ? TRUE : FALSE;
    508 return( CRYPT_OK );
    509
    510 case CRYPT_SESSINFO_SSH_CHANNEL_OPEN: /tmp/sbbs-Dec-30-2023/3rdp/src/cl/session/ssh2_chn.c: 517 in getChannelAttribute()
    511 if( isNullChannel( writeChannelInfoPtr ) )
    512 return( CRYPT_ERROR_NOTFOUND );
    513 *value = ( writeChannelInfoPtr->flags & CHANNEL_FLAG_READCLOSED ) ? FALSE : TRUE;
    514 return( CRYPT_OK );
    515
    516 case CRYPT_SESSINFO_SSH_CHANNEL_WIDTH:
    CID 476254: (NULL_RETURNS)
    Dereferencing "writeChannelInfoPtr", which is known to be "NULL".
    517 if( isNullChannel( writeChannelInfoPtr ) )
    518 return( CRYPT_ERROR_NOTFOUND );
    519 if (writeChannelInfoPtr->width == 0)
    520 return CRYPT_ERROR_NOTFOUND;
    521 *value = channelInfoPtr->width;
    522 return( CRYPT_OK ); /tmp/sbbs-Dec-30-2023/3rdp/src/cl/session/ssh2_chn.c: 511 in getChannelAttribute()
    505 if( isNullChannel( writeChannelInfoPtr ) )
    506 return( CRYPT_ERROR_NOTFOUND );
    507 *value = isActiveChannel( writeChannelInfoPtr ) ? TRUE : FALSE;
    508 return( CRYPT_OK );
    509
    510 case CRYPT_SESSINFO_SSH_CHANNEL_OPEN:
    CID 476254: (NULL_RETURNS)
    Dereferencing "writeChannelInfoPtr", which is known to be "NULL".
    511 if( isNullChannel( writeChannelInfoPtr ) )
    512 return( CRYPT_ERROR_NOTFOUND );
    513 *value = ( writeChannelInfoPtr->flags & CHANNEL_FLAG_READCLOSED ) ? FALSE : TRUE;
    514 return( CRYPT_OK );
    515
    516 case CRYPT_SESSINFO_SSH_CHANNEL_WIDTH: /tmp/sbbs-Dec-30-2023/3rdp/src/cl/session/ssh2_chn.c: 525 in getChannelAttribute()
    519 if (writeChannelInfoPtr->width == 0)
    520 return CRYPT_ERROR_NOTFOUND;
    521 *value = channelInfoPtr->width;
    522 return( CRYPT_OK );
    523
    524 case CRYPT_SESSINFO_SSH_CHANNEL_HEIGHT:
    CID 476254: (NULL_RETURNS)
    Dereferencing "writeChannelInfoPtr", which is known to be "NULL".
    525 if( isNullChannel( writeChannelInfoPtr ) )
    526 return( CRYPT_ERROR_NOTFOUND );
    527 if (writeChannelInfoPtr->height == 0)
    528 return CRYPT_ERROR_NOTFOUND;
    529 *value = channelInfoPtr->height;
    530 return( CRYPT_OK );

    ** CID 476253: Resource leaks (RESOURCE_LEAK)
    /jsdebug.c: 335 in script_debug_prompt()


    ________________________________________________________________________________________________________
    *** CID 476253: Resource leaks (RESOURCE_LEAK)
    /jsdebug.c: 335 in script_debug_prompt()
    329 JS_SetInterrupt(JS_GetRuntime(dbg->cx), finish_handler, NULL);
    330 return DEBUG_CONTINUE;
    331 }
    332 if(strncmp(line, "quit\n", 5)==0 ||
    333 strncmp(line, "q\n", 2)==0
    334 ) {
    CID 476253: Resource leaks (RESOURCE_LEAK)
    Variable "line" going out of scope leaks the storage it points to.
    335 return (DEBUG_EXIT);
    336 }
    337 if(strncmp(line, "eval ", 5)==0 ||
    338 strncmp(line, "e ", 2)==0
    339 ) {
    340 jsval ret;


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3Dk6EJ_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrA-2FX8i-2FapdB1BvZRHSxZvnvG9Gt4EGgnMOyOKJdrt0Ow7WO8U9rY3qdLrGQhhG9KhbgCqQ-2BdjF-2FCZbP8g3Gc1r4QsbMjorELhC-2FfCV8hEXjaVc-2BoAqZ2-2FQeAkDjxFrK3m04is-2FE5aOQcl1hrivcYLiwVEHyHlsUWiqdJNrqtFX4OA-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Tuesday, January 09, 2024 13:51:54
    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 477525: Error handling issues (CHECKED_RETURN)
    /ssl.c: 413 in get_ssl_cert()


    ________________________________________________________________________________________________________
    *** CID 477525: Error handling issues (CHECKED_RETURN)
    /ssl.c: 413 in get_ssl_cert()
    407 CRYPT_CERTIFICATE ssl_cert;
    408 char sysop_email[sizeof(cfg->sys_inetaddr)+6];
    409 struct cert_list *cert_entry;
    410
    411 if(!do_cryptInit(lprintf))
    412 return -1;
    CID 477525: Error handling issues (CHECKED_RETURN)
    Calling "ssl_sync" without checking return value (as is done elsewhere 6 out of 7 times).
    413 ssl_sync(cfg, lprintf);
    414 lock_ssl_cert_write();
    415 cert_entry = malloc(sizeof(*cert_entry));
    416 if(cert_entry == NULL) {
    417 unlock_ssl_cert_write(lprintf);
    418 free(cert_entry);


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3DG04V_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrDEpEnmlDe-2FjbKZ4LOKbSyZqFRJl-2FW97DzLqL9YhzmfB5NVnMDaFqAVAu8sqMXAtM7gluOaLuz78sK9hLjatBB8CSJ6nN9iJHgKoglAvkWzF0D2D3-2FP2KvQ4r0FVsLXVQDobxZi1VHS1fHv1o1JN4QuvSLew5iAWvpjb3EkIuqiHp61IxzA0v1Q4zB-2F2vdQH-2Fs-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Wednesday, January 24, 2024 13:43:19
    Hi,

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

    40 new defect(s) introduced to Synchronet found with Coverity Scan.
    65 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 20 of 40 defect(s)


    ** CID 479110: Program hangs (LOCK)
    /pack_qwk.cpp: 753 in sbbs_t::pack_qwk(char *, unsigned int *, bool)()


    ________________________________________________________________________________________________________
    *** CID 479110: Program hangs (LOCK)
    /pack_qwk.cpp: 753 in sbbs_t::pack_qwk(char *, unsigned int *, bool)()
    747 if(flength(packet) < 1) {
    748 remove(packet);
    749 if((i = external(cmdstr(temp_cmd(),packet,path,NULL), ex|EX_WILDCARD)) != 0)
    750 errormsg(WHERE,ERR_EXEC,cmdstr(temp_cmd(),packet,path,NULL),i);
    751 if(flength(packet) < 1) {
    752 bputs(text[QWKCompressionFailed]);
    CID 479110: Program hangs (LOCK)
    Returning without unlocking "this->input_thread_mutex".
    753 return(false);
    754 }
    755 }
    756
    757 if(!prepack && useron.rest&FLAG('Q')) {
    758 dir=opendir(cfg.temp_dir);

    ** CID 479109: (DEADCODE) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/session/cmp_err.c: 349 in readPkiStatusInfo() /tmp/sbbs-Jan-24-2024/3rdp/src/cl/session/cmp_err.c: 364 in readPkiStatusInfo()


    ________________________________________________________________________________________________________
    *** CID 479109: (DEADCODE) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/session/cmp_err.c: 349 in readPkiStatusInfo() 343 ( status, errorInfo,
    344 "Invalid PKI status string" ) );
    345 }
    346 hasErrorMessage = TRUE;
    347 }
    348 if( cryptStatusError( status ) )
    CID 479109: (DEADCODE)
    Execution cannot reach this statement: "return status;".
    349 return( status ); /* Residual error from peekTag() */
    350
    351 /* Read the failure information */
    352 if( checkStatusLimitsPeekTag( stream, status, tag, endPos ) && \
    353 tag == BER_BITSTRING )
    354 {
    /tmp/sbbs-Jan-24-2024/3rdp/src/cl/session/cmp_err.c: 364 in readPkiStatusInfo() 358 retExt( status,
    359 ( status, errorInfo,
    360 "Invalid PKI failure information" ) );
    361 }
    362 }
    363 if( cryptStatusError( status ) )
    CID 479109: (DEADCODE)
    Execution cannot reach this statement: "return status;".
    364 return( status ); /* Residual error from peekTag() */
    365
    366 /* If everything's OK, we're done */
    367 if( cmpStatusOK( errorCode ) )
    368 return( CRYPT_OK );
    369

    ** CID 479108: Control flow issues (MISSING_BREAK) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/context/ctx_attr.c: 425 in getContextAttributeS()


    ________________________________________________________________________________________________________
    *** CID 479108: Control flow issues (MISSING_BREAK) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/context/ctx_attr.c: 425 in getContextAttributeS()
    419 out */
    420 return( attributeCopy( msgData, contextInfoPtr->ctxPKC->publicKeyInfo,
    421 contextInfoPtr->ctxPKC->publicKeyInfoSize ) );
    422 }
    423 STDC_FALLTHROUGH;
    424
    CID 479108: Control flow issues (MISSING_BREAK)
    The case for value "CRYPT_CTXINFO_SSH_PUBLIC_KEY" is not terminated by a "break" statement.
    425 case CRYPT_CTXINFO_SSH_PUBLIC_KEY:
    426 if ( needsKey( contextInfoPtr ) )
    427 return CRYPT_ERROR_NOTFOUND;
    428 if (contextType != CONTEXT_PKC)
    429 return CRYPT_ERROR_NOTFOUND;
    430 case CRYPT_IATTRIBUTE_KEY_PGP:

    ** CID 479107: Control flow issues (DEADCODE) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/session/session.c: 857 in activateSession()


    ________________________________________________________________________________________________________
    *** CID 479107: Control flow issues (DEADCODE) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/session/session.c: 857 in activateSession() 851 {
    852 const SES_ACTIVATESUBPROTOCOL_FUNCTION activateSubprotocolFunction = \
    853 ( SES_ACTIVATESUBPROTOCOL_FUNCTION ) \
    854 FNPTR_GET( sessionInfoPtr->activateInnerSubprotocolFunction );
    855 REQUIRES( activateSubprotocolFunction != NULL );
    856
    CID 479107: Control flow issues (DEADCODE)
    Execution cannot reach this statement: "status = activateSubprotoco...".
    857 status = activateSubprotocolFunction( sessionInfoPtr );
    858 if( cryptStatusError( status ) )
    859 return( status );
    860
    861 /* Record the fact that the layered protocol has been
    862 activated */

    ** CID 479106: Error handling issues (CHECKED_RETURN) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/session/scvp_cli.c: 621 in readScvpResponse()


    ________________________________________________________________________________________________________
    *** CID 479106: Error handling issues (CHECKED_RETURN) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/session/scvp_cli.c: 621 in readScvpResponse() 615 assert( isWritePtr( stream, sizeof( STREAM ) ) );
    616 assert( isWritePtr( sessionInfoPtr, sizeof( SESSION_INFO ) ) ); 617 assert( isWritePtr( protocolInfo, sizeof( SCVP_PROTOCOL_INFO ) ) );
    618
    619 /* Skip the wrapper, version, and server configuration ID */ 620 readSequence( stream, NULL );
    CID 479106: Error handling issues (CHECKED_RETURN)
    Calling "readShortIntegerTag" without checking return value (as is done elsewhere 36 out of 45 times).
    621 readShortInteger( stream, &value );
    622 status = readShortInteger( stream, &value );
    623 if( cryptStatusError( status ) )
    624 {
    625 retExt( status,
    626 ( status, SESSION_ERRINFO,

    ** CID 479105: Control flow issues (DEADCODE) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/session/session.c: 1030 in closeSession()


    ________________________________________________________________________________________________________
    *** CID 479105: Control flow issues (DEADCODE) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/session/session.c: 1030 in closeSession() 1024 #if defined( USE_WEBSOCKETS ) || defined( USE_EAP )
    1025 if( sessionInfoPtr->subProtocol != CRYPT_SUBPROTOCOL_NONE ) 1026 {
    1027 /* If there's an inner protocol present, shut that down as well */
    1028 if( FNPTR_ISSET( sessionInfoPtr->closeInnerSubprotocolFunction ) )
    1029 {
    CID 479105: Control flow issues (DEADCODE)
    Execution cannot reach the expression "sessionInfoPtr->closeInnerSubprotocolFunction.fnPtr" inside this statement: "closeSubprotocolFunction = ...".
    1030 const SES_CLOSESUBPROTOCOL_FUNCTION closeSubprotocolFunction = \
    1031 ( SES_CLOSESUBPROTOCOL_FUNCTION ) \
    1032 FNPTR_GET( sessionInfoPtr->closeInnerSubprotocolFunction );
    1033 REQUIRES( closeSubprotocolFunction != NULL ); 1034
    1035 ( void ) closeSubprotocolFunction( sessionInfoPtr );

    ** CID 479104: (BAD_SHIFT) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/cert/dn_string.c: 220 in getWidechar() /tmp/sbbs-Jan-24-2024/3rdp/src/cl/cert/dn_string.c: 220 in getWidechar()


    ________________________________________________________________________________________________________
    *** CID 479104: (BAD_SHIFT) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/cert/dn_string.c: 220 in getWidechar()
    214 non-char values can only be accessed on word-aligned boundaries */
    215 LOOP_SMALL( i = 0, i < WCHAR_SIZE, i++ )
    216 {
    217 ENSURES_EXT( LOOP_INVARIANT_SMALL( i, 0, WCHAR_SIZE - 1 ), 0 );
    218
    219 #ifdef DATA_LITTLEENDIAN
    CID 479104: (BAD_SHIFT)
    In expression "string[i] << shiftAmt", left shifting by more than 31 bits has undefined behavior. The shift amount, "shiftAmt", is at least 72.
    220 ch |= string[ i ] << shiftAmt;
    221 shiftAmt += 8;
    222 #else
    223 ch = ( ch << 8 ) | string[ i ];
    224 #endif /* DATA_LITTLEENDIAN */
    225 }
    /tmp/sbbs-Jan-24-2024/3rdp/src/cl/cert/dn_string.c: 220 in getWidechar()
    214 non-char values can only be accessed on word-aligned boundaries */
    215 LOOP_SMALL( i = 0, i < WCHAR_SIZE, i++ )
    216 {
    217 ENSURES_EXT( LOOP_INVARIANT_SMALL( i, 0, WCHAR_SIZE - 1 ), 0 );
    218
    219 #ifdef DATA_LITTLEENDIAN
    CID 479104: (BAD_SHIFT)
    In expression "string[i] << shiftAmt", left shifting by more than 31 bits has undefined behavior. The shift amount, "shiftAmt", is at least 72.
    220 ch |= string[ i ] << shiftAmt;
    221 shiftAmt += 8;
    222 #else
    223 ch = ( ch << 8 ) | string[ i ];
    224 #endif /* DATA_LITTLEENDIAN */
    225 }

    ** CID 479103: (SLEEP)


    ________________________________________________________________________________________________________
    *** CID 479103: (SLEEP)
    /pack_rep.cpp: 120 in sbbs_t::pack_rep(unsigned int)()
    114 /*********************/
    115 /* Pack new messages */
    116 /*********************/
    117 SAFEPRINTF(smb.file,"%smail",cfg.data_dir);
    118 smb.retry_time=cfg.smb_retry_time;
    119 smb.subnum=INVALID_SUB;
    CID 479103: (SLEEP)
    Call to "smb_open" might sleep while holding lock "this->input_thread_mutex".
    120 if((i=smb_open(&smb))!=0) {
    121 fclose(rep);
    122 if(hdrs!=NULL)
    123 fclose(hdrs);
    124 if(voting!=NULL)
    125 fclose(voting);
    /pack_rep.cpp: 112 in sbbs_t::pack_rep(unsigned int)()
    106 errormsg(WHERE,ERR_CREATE,str,0);
    107 }
    108 if(!(cfg.qhub[hubnum]->misc&QHUB_NOVOTING)) {
    109 SAFEPRINTF(str,"%sVOTING.DAT",cfg.temp_dir);
    110 fexistcase(str);
    111 if((voting=fopen(str,"a"))==NULL)
    CID 479103: (SLEEP)
    Call to "errormsg" might sleep while holding lock "this->input_thread_mutex".
    112 errormsg(WHERE,ERR_CREATE,str,0);
    113 }
    114 /*********************/
    115 /* Pack new messages */
    116 /*********************/
    117 SAFEPRINTF(smb.file,"%smail",cfg.data_dir);
    /pack_rep.cpp: 106 in sbbs_t::pack_rep(unsigned int)()
    100 ,QWK_BLOCK_LEN, hubid_upper); /* So write header */
    101 }
    102 if(!(cfg.qhub[hubnum]->misc&QHUB_NOHEADERS)) {
    103 SAFEPRINTF(str,"%sHEADERS.DAT",cfg.temp_dir);
    104 fexistcase(str);
    105 if((hdrs=fopen(str,"a"))==NULL)
    CID 479103: (SLEEP)
    Call to "errormsg" might sleep while holding lock "this->input_thread_mutex".
    106 errormsg(WHERE,ERR_CREATE,str,0);
    107 }
    108 if(!(cfg.qhub[hubnum]->misc&QHUB_NOVOTING)) {
    109 SAFEPRINTF(str,"%sVOTING.DAT",cfg.temp_dir);
    110 fexistcase(str);
    111 if((voting=fopen(str,"a"))==NULL)

    ** CID 479102: Error handling issues (CHECKED_RETURN) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/enc_dec/asn1_algoenc.c: 662 in readCryptAlgoParams()


    ________________________________________________________________________________________________________
    *** CID 479102: Error handling issues (CHECKED_RETURN) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/enc_dec/asn1_algoenc.c: 662 in readCryptAlgoParams()
    656 RC2_KEYSIZE_MAGIC (corresponding to a 128-bit key) but in
    657 practice this doesn't really matter, we just use whatever we
    658 find inside the PKCS #1 padding */
    659 readSequence( stream, NULL );
    660 if( queryInfo->cryptMode != CRYPT_MODE_CBC ) 661 return( readShortInteger( stream, NULL ) );
    CID 479102: Error handling issues (CHECKED_RETURN)
    Calling "readShortIntegerTag" without checking return value (as is done elsewhere 36 out of 45 times).
    662 readShortInteger( stream, NULL );
    663 return( readOctetString( stream, queryInfo->iv, 664 &queryInfo->ivLength,
    665 MIN_IVSIZE, CRYPT_MAX_IVSIZE ) );
    666 #endif /* USE_RC2 */
    667

    ** CID 479101: (CHECKED_RETURN)
    /ssl.c: 353 in internal_do_cryptInit()
    /ssl.c: 345 in internal_do_cryptInit()


    ________________________________________________________________________________________________________
    *** CID 479101: (CHECKED_RETURN)
    /ssl.c: 353 in internal_do_cryptInit()
    347 }
    348 ret = cryptGetAttributeString(CRYPT_UNUSED, CRYPT_OPTION_INFO_PATCHES, patches, &stp);
    349 if (cryptStatusError(ret) || stp != 32 || memcmp(patches, CRYPTLIB_PATCHES, 32) != 0) {
    350 cryptInit_error = ret;
    351 cryptlib_initialized = false;
    352 cryptEnd();
    CID 479101: (CHECKED_RETURN)
    Calling "asprintf" without checking return value (as is done elsewhere 19 out of 21 times).
    353 asprintf(&cryptfail, "Incorrect cryptlib patch set %.32s (expected %s)", patches, CRYPTLIB_PATCHES);
    354 return;
    355 }
    356 return;
    357 }
    358
    /ssl.c: 345 in internal_do_cryptInit()
    339 }
    340 tmp = (maj * 100) + (min * 10) + stp;
    341 if (tmp != CRYPTLIB_VERSION) {
    342 cryptInit_error = CRYPT_ERROR_INVALID;
    343 cryptlib_initialized = false;
    344 cryptEnd();
    CID 479101: (CHECKED_RETURN)
    Calling "asprintf" without checking return value (as is done elsewhere 19 out of 21 times).
    345 asprintf(&cryptfail, "Incorrect cryptlib version %d (expected %d)", tmp, CRYPTLIB_VERSION);
    346 return;
    347 }
    348 ret = cryptGetAttributeString(CRYPT_UNUSED, CRYPT_OPTION_INFO_PATCHES, patches, &stp);
    349 if (cryptStatusError(ret) || stp != 32 || memcmp(patches, CRYPTLIB_PATCHES, 32) != 0) {
    350 cryptInit_error = ret;

    ** CID 479100: (ATOMICITY)
    /ssl.c: 659 in destroy_session()
    /ssl.c: 659 in destroy_session()


    ________________________________________________________________________________________________________
    *** CID 479100: (ATOMICITY)
    /ssl.c: 659 in destroy_session()
    653 lprintf(LOG_ERR, "Unable to unlock cert_epoch_lock for write at %d", __LINE__);
    654 return CRYPT_ERROR_INTERNAL;
    655 }
    656 sess->sess = -1;
    657 pthread_mutex_lock(&ssl_cert_list_mutex);
    658 sess->next = cert_list;
    CID 479100: (ATOMICITY)
    Using an unreliable value of "sess" inside the second locked section. If the data that "sess" depends on was changed by another thread, this use might be incorrect.
    659 cert_list = sess;
    660 pthread_mutex_unlock(&ssl_cert_list_mutex);
    661 ret = cryptDestroySession(csess);
    662 }
    663 else {
    664 if (!rwlock_unlock(&cert_epoch_lock)) {
    /ssl.c: 659 in destroy_session()
    653 lprintf(LOG_ERR, "Unable to unlock cert_epoch_lock for write at %d", __LINE__);
    654 return CRYPT_ERROR_INTERNAL;
    655 }
    656 sess->sess = -1;
    657 pthread_mutex_lock(&ssl_cert_list_mutex);
    658 sess->next = cert_list;
    CID 479100: (ATOMICITY)
    Using an unreliable value of "sess" inside the second locked section. If the data that "sess" depends on was changed by another thread, this use might be incorrect.
    659 cert_list = sess;
    660 pthread_mutex_unlock(&ssl_cert_list_mutex);
    661 ret = cryptDestroySession(csess);
    662 }
    663 else {
    664 if (!rwlock_unlock(&cert_epoch_lock)) {

    ** CID 479099: Control flow issues (DEADCODE) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/session/cmp_rdmsg.c: 495 in readResponseBody()


    ________________________________________________________________________________________________________
    *** CID 479099: Control flow issues (DEADCODE) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/session/cmp_rdmsg.c: 495 in readResponseBody()
    489 ( status, SESSION_ERRINFO,
    490 "Invalid caPubs field in %s", 491 getCMPMessageName( messageType ) ) );
    492 }
    493 }
    494 if( cryptStatusError( status ) )
    CID 479099: Control flow issues (DEADCODE)
    Execution cannot reach this statement: "return status;".
    495 return( status ); /* Residual error from checkStatusPeekTag() */
    496
    497 /* If it's a revocation response then the only returned data is the
    498 status value */
    499 if( protocolInfo->operation == CTAG_PB_RR )
    500 {

    ** CID 479098: Program hangs (LOCK)
    /pack_rep.cpp: 95 in sbbs_t::pack_rep(unsigned int)()


    ________________________________________________________________________________________________________
    *** CID 479098: Program hangs (LOCK)
    /pack_rep.cpp: 95 in sbbs_t::pack_rep(unsigned int)()
    89 if(fexistcase(str))
    90 fmode="r+b";
    91 else
    92 fmode="w+b";
    93 if((rep=fopen(str, fmode))==NULL) {
    94 errormsg(WHERE, ERR_CREATE, str, 0, fmode);
    CID 479098: Program hangs (LOCK)
    Returning without unlocking "this->input_thread_mutex".
    95 return false;
    96 }
    97 fseek(rep, 0, SEEK_END);
    98 if(ftell(rep) < 1) { /* New REP packet */
    99 fprintf(rep, "%-*s"
    100 ,QWK_BLOCK_LEN, hubid_upper); /* So write header */

    ** CID 479097: Control flow issues (DEADCODE) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/session/session.c: 1035 in closeSession()


    ________________________________________________________________________________________________________
    *** CID 479097: Control flow issues (DEADCODE) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/session/session.c: 1035 in closeSession() 1029 {
    1030 const SES_CLOSESUBPROTOCOL_FUNCTION closeSubprotocolFunction = \
    1031 ( SES_CLOSESUBPROTOCOL_FUNCTION ) \
    1032 FNPTR_GET( sessionInfoPtr->closeInnerSubprotocolFunction );
    1033 REQUIRES( closeSubprotocolFunction != NULL ); 1034
    CID 479097: Control flow issues (DEADCODE)
    Execution cannot reach this statement: "(void)closeSubprotocolFunct...".
    1035 ( void ) closeSubprotocolFunction( sessionInfoPtr );
    1036 }
    1037
    1038 /* If protocol management is handled by an outer protocol, don't
    1039 perform a session shutdown. This is in theory rather nasty in
    1040 that an attacker who can spoof an unsecured outer protocol packet

    ** CID 479096: Control flow issues (DEADCODE) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/session/session.c: 685 in activateConnection()


    ________________________________________________________________________________________________________
    *** CID 479096: Control flow issues (DEADCODE) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/session/session.c: 685 in activateConnection()
    679
    680 /* If there's sub-protocol selected, activate that as well */ 681 #if defined( USE_WEBSOCKETS ) || defined( USE_EAP )
    682 if( sessionInfoPtr->subProtocol != CRYPT_SUBPROTOCOL_NONE && \ 683 FNPTR_ISSET( sessionInfoPtr->activateOuterSubprotocolFunction ) )
    684 {
    CID 479096: Control flow issues (DEADCODE)
    Execution cannot reach the expression "sessionInfoPtr->activateOuterSubprotocolFunction.fnPtr" inside this statement: "activateSubprotocolFunction...".
    685 const SES_ACTIVATESUBPROTOCOL_FUNCTION activateSubprotocolFunction = \
    686 ( SES_ACTIVATESUBPROTOCOL_FUNCTION ) \
    687 FNPTR_GET( sessionInfoPtr->activateOuterSubprotocolFunction );
    688 REQUIRES( activateSubprotocolFunction != NULL );
    689
    690 status = activateSubprotocolFunction( sessionInfoPtr );

    ** CID 479095: Control flow issues (DEADCODE) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/kernel/selftest.c: 130 in testSafetyMechanisms()


    ________________________________________________________________________________________________________
    *** CID 479095: Control flow issues (DEADCODE) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/kernel/selftest.c: 130 in testSafetyMechanisms()
    124 tmrIntB |= 0x800;
    125 tmrIntC |= 0x01;
    126 if( TMR_VALID( tmrInt ) || TMR_GET( tmrInt ) != 20 )
    127 return( FALSE );
    128 TMR_SCRUB( tmrInt );
    129 if( tmrIntA != 20 || tmrIntB != 20 || tmrIntC != 20 )
    CID 479095: Control flow issues (DEADCODE)
    Execution cannot reach this statement: "return 0;".
    130 return( FALSE );
    131 CFI_CHECK_UPDATE( "TMR" );
    132
    133 /* Test the overflow-checking mechanisms. These checks will probably
    134 fall prey to optimiser inlining but it'll still statically check that
    135 they work as expected.

    ** CID 479094: (DEADCODE)
    /tmp/sbbs-Jan-24-2024/3rdp/src/cl/cert/read.c: 720 in readAttributeCertInfo() /tmp/sbbs-Jan-24-2024/3rdp/src/cl/cert/read.c: 668 in readAttributeCertInfo() /tmp/sbbs-Jan-24-2024/3rdp/src/cl/cert/read.c: 641 in readAttributeCertInfo()


    ________________________________________________________________________________________________________
    *** CID 479094: (DEADCODE)
    /tmp/sbbs-Jan-24-2024/3rdp/src/cl/cert/read.c: 720 in readAttributeCertInfo() 714 {
    715 return( certErrorReturn( certInfoPtr, "issuer unique ID",
    716 status ) );
    717 }
    718 }
    719 if( cryptStatusError( status ) )
    CID 479094: (DEADCODE)
    Execution cannot reach this statement: "return status;".
    720 return( status ); /* Residual error from peekTag() */
    721
    722 /* If there are no extensions present, we're done */
    723 if( stell( stream ) >= endPos )
    724 return( CRYPT_OK );
    725
    /tmp/sbbs-Jan-24-2024/3rdp/src/cl/cert/read.c: 668 in readAttributeCertInfo() 662 if( cryptStatusOK( status ) )
    663 status = readIssuerDN( stream, certInfoPtr ); 664 if( cryptStatusError( status ) )
    665 return( certErrorReturn( certInfoPtr, "issuer name", status ) );
    666 }
    667 if( cryptStatusError( status ) )
    CID 479094: (DEADCODE)
    Execution cannot reach this statement: "return status;".
    668 return( status ); /* Residual error from peekTag() */
    669 if( checkStatusLimitsPeekTag( stream, status, tag, innerEndPos ) && \
    670 tag == MAKE_CTAG( CTAG_AC_ISSUER_BASECERTIFICATEID ) ) 671 {
    672 status = readUniversal( stream );
    673 }
    /tmp/sbbs-Jan-24-2024/3rdp/src/cl/cert/read.c: 641 in readAttributeCertInfo() 635 if( cryptStatusOK( status ) )
    636 status = readSubjectDN( stream, certInfoPtr ); 637 if( cryptStatusError( status ) )
    638 return( certErrorReturn( certInfoPtr, "holder name", status ) );
    639 }
    640 if( cryptStatusError( status ) )
    CID 479094: (DEADCODE)
    Execution cannot reach this statement: "return status;".
    641 return( status ); /* Residual error from peekTag() */
    642 if( checkStatusLimitsPeekTag( stream, status, tag, innerEndPos ) && \
    643 tag == MAKE_CTAG( CTAG_AC_HOLDER_OBJECTDIGESTINFO ) ) 644 {
    645 /* This is a complicated structure that in effect encodes a generic
    646 hole reference to "other", for now we just skip it until we can

    ** CID 479093: (DEADCODE)
    /tmp/sbbs-Jan-24-2024/3rdp/src/cl/cryptkey.c: 1779 in openKeyset() /tmp/sbbs-Jan-24-2024/3rdp/src/cl/cryptkey.c: 1770 in openKeyset() /tmp/sbbs-Jan-24-2024/3rdp/src/cl/cryptkey.c: 1771 in openKeyset()


    ________________________________________________________________________________________________________
    *** CID 479093: (DEADCODE)
    /tmp/sbbs-Jan-24-2024/3rdp/src/cl/cryptkey.c: 1779 in openKeyset()
    1773 break;
    1774
    1775 case CRYPT_KEYSET_HTTP:
    1776 status = setAccessMethodHTTP( keysetInfoPtr ); 1777 break;
    1778
    CID 479093: (DEADCODE)
    Execution cannot reach this statement: "case CRYPT_KEYSET_LDAP:".
    1779 case CRYPT_KEYSET_LDAP:
    1780 status = setAccessMethodLDAP( keysetInfoPtr ); 1781 break;
    1782
    1783 default:
    1784 retIntError(); /tmp/sbbs-Jan-24-2024/3rdp/src/cl/cryptkey.c: 1770 in openKeyset()
    1764 }
    1765
    1766 /* It's a specific type of keyset, set up the access information for it
    1767 and connect to it */
    1768 switch( keysetType )
    1769 {
    CID 479093: (DEADCODE)
    Execution cannot reach this statement: "case CRYPT_KEYSET_DATABASE:". 1770 case CRYPT_KEYSET_DATABASE:
    1771 case CRYPT_KEYSET_DATABASE_STORE:
    1772 status = setAccessMethodDBMS( keysetInfoPtr, keysetType );
    1773 break;
    1774
    1775 case CRYPT_KEYSET_HTTP: /tmp/sbbs-Jan-24-2024/3rdp/src/cl/cryptkey.c: 1771 in openKeyset()
    1765
    1766 /* It's a specific type of keyset, set up the access information for it
    1767 and connect to it */
    1768 switch( keysetType )
    1769 {
    1770 case CRYPT_KEYSET_DATABASE:
    CID 479093: (DEADCODE)
    Execution cannot reach this statement: "case CRYPT_KEYSET_DATABASE_...".
    1771 case CRYPT_KEYSET_DATABASE_STORE:
    1772 status = setAccessMethodDBMS( keysetInfoPtr, keysetType );
    1773 break;
    1774
    1775 case CRYPT_KEYSET_HTTP:
    1776 status = setAccessMethodHTTP( keysetInfoPtr );

    ** CID 479092: Resource leaks (RESOURCE_LEAK) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/cert/ext_copy.c: 285 in copyAttribute()


    ________________________________________________________________________________________________________
    *** CID 479092: Resource leaks (RESOURCE_LEAK) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/cert/ext_copy.c: 285 in copyAttribute()
    279 if( DATAPTR_ISSET_PTR( newAttributeHeadPtr ) ) 280 deleteAttributes( newAttributeHeadPtr );
    281 return( status );
    282 }
    283
    284 /* Append the new field to the new attribute list */ >>> CID 479092: Resource leaks (RESOURCE_LEAK)
    Variable "newAttributeField" going out of scope leaks the storage it points to.
    285 insertDoubleListElement( newAttributeHeadPtr, newAttributeListTail,
    286 newAttributeField, ATTRIBUTE_LIST );
    287 newAttributeListTail = newAttributeField;
    288 }
    289 ENSURES( LOOP_BOUND_OK );
    290 ENSURES( DATAPTR_ISSET_PTR( newAttributeHeadPtr ) );

    ** CID 479091: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/session/ssh2_msgcli.c: 707 in processChannelOpenConfirmation()


    ________________________________________________________________________________________________________
    *** CID 479091: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /tmp/sbbs-Jan-24-2024/3rdp/src/cl/session/ssh2_msgcli.c: 707 in processChannelOpenConfirmation()
    701 done */
    702 if( serviceType == SERVICE_PORTFORWARD ) {
    703 selectChannel( sessionInfoPtr, origWriteChannelNo, CHANNEL_WRITE );
    704 return( CRYPT_OK );
    705 }
    706
    CID 479091: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
    "255612575 || channelNo == 0 || !waitforWindow" is always true regardless of the values of its operands. This occurs as the logical operand of "if".
    707 if ( TRUE || channelNo == 0 || !waitforWindow )
    708 {
    709 /* It's a session open request that requires additional messages to do
    710 anything useful, create and send the extra packets. Unlike the
    711 overall open request, we can't wrap and send the packets in one go
    712 because serviceType == SERVICE_SHELL has to send multiple packets,


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3D_Ob8_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrDXsFtzU0G-2FWPcCSE76ga65FpTOVnlTg2HlohxKy4ePNmfAvcTgQHzRuwjEUPYcoNsjv51yTcWgn-2B5ZoKEZbHKDuJHZyg4oYm-2B85r0HAuyVfWOvaujD7HGzC-2Bi-2BJJr4c31Rz-2B5noR-2FnEcQw4pO0lSZx8Qbg6Ydb9v-2FQISXmWX5vnA-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Thursday, February 01, 2024 13:40:37
    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 480410: Uninitialized variables (UNINIT) /tmp/sbbs-Feb-01-2024/src/conio/ciolib.c: 2152 in ciolib_rgb_to_legacyattr()


    ________________________________________________________________________________________________________
    *** CID 480410: Uninitialized variables (UNINIT) /tmp/sbbs-Feb-01-2024/src/conio/ciolib.c: 2152 in ciolib_rgb_to_legacyattr() 2146 }
    2147 }
    2148 }
    2149 }
    2150
    2151 return (bestb << 4) | bestf;
    CID 480410: Uninitialized variables (UNINIT)
    Using uninitialized value "bestf".


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3D0Whj_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrCGuXH-2F8nbk79WMe2MJx6-2FI9exgVraqIoXRfw5t191-2Fkv7cvlCW07dWiwEkebe6LE7W-2FqT6ZfpHP5InVb8zXpzOgZvf4Ur9-2BJrsFE50Fqk6iSfX0glKX5AlD-2FYPX7BWAafhUDNW6RVuwz3H5dgusXmMWB9WTfpkkhCog7HEgqDjmg-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Sunday, February 04, 2024 15:09:08
    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 483188: Memory - corruptions (OVERRUN)
    /ssl.c: 349 in internal_do_cryptInit()


    ________________________________________________________________________________________________________
    *** CID 483188: Memory - corruptions (OVERRUN)
    /ssl.c: 349 in internal_do_cryptInit()
    343 cryptlib_initialized = false;
    344 cryptEnd();
    345 asprintf(&cryptfail, "Incorrect cryptlib version %d (expected %d)", tmp, CRYPTLIB_VERSION);
    346 return;
    347 }
    348 ret = cryptGetAttributeString(CRYPT_UNUSED, CRYPT_OPTION_INFO_PATCHES, patches, &stp);
    CID 483188: Memory - corruptions (OVERRUN)
    Overrunning array """" of 1 bytes by passing it to a function which accesses it at byte offset 31 using argument "32UL".
    349 if (cryptStatusError(ret) || stp != 32 || memcmp(patches, CRYPTLIB_PATCHES, 32) != 0) {
    350 cryptInit_error = ret;
    351 cryptlib_initialized = false;
    352 cryptEnd();
    353 asprintf(&cryptfail, "Incorrect cryptlib patch set %.32s (expected %s)", patches, CRYPTLIB_PATCHES);
    354 return;


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3DoE8P_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrCgaHhvhfxqmGN-2F2MOiNHiXAXmmE5-2BoMir72-2FKS-2B4CChPr-2B6DUEcHFnW2fJcB9K-2BLqjLkG6SOds2KKoiOogAgt4kivLp-2Bbv0MawXscaXZ6U3zKSU8zPaw8llzmAMgAx1EcIlUZ9-2Faak-2B54E1Z-2BGSHEscOAt6ClVWnKMr9zoYGJFvw-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Monday, February 05, 2024 13:39:54
    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.
    8 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 483249: Error handling issues (CHECKED_RETURN)
    /main.cpp: 3570 in sbbs_t::init()()


    ________________________________________________________________________________________________________
    *** CID 483249: Error handling issues (CHECKED_RETURN)
    /main.cpp: 3570 in sbbs_t::init()()
    3564 thisnode.misc&=(NODE_EVENT|NODE_LOCK|NODE_RRUN);
    3565 criterrs=thisnode.errors;
    3566 putnodedat(cfg.node_num,&thisnode);
    3567
    3568 // remove any pending node messages
    3569 safe_snprintf(str, sizeof(str), "%smsgs/n%3.3u.msg",cfg.data_dir,cfg.node_num);
    CID 483249: Error handling issues (CHECKED_RETURN)
    Calling "remove(str)" without checking return value. This library function may fail and return an error code.
    3570 remove(str);
    3571 // Delete any stale temporary files (with potentially sensitive content)
    3572 delfiles(cfg.temp_dir,ALLFILES);
    3573 safe_snprintf(str, sizeof(str), "%sMSGTMP", cfg.node_dir);
    3574 removecase(str);
    3575 safe_snprintf(str, sizeof(str), "%sQUOTES.TXT", cfg.node_dir);


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3DuxM4_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrDlWnKXqUo4ko-2BswZDnU0KThZlBPhv1kFyIVU6rRp9K48otOTA5WQm5qg8o-2FY8FDqYkPfgDhKOyoUIQMv1mPwAY7yKStOAqjn6xloHvMgh0mRG0DJXpuxyIOkTyi2gGZzdoTshBDw9gCNjiMqTW3IeGxtntX-2B4oBRMrCvut8dx1Kg-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Wednesday, February 07, 2024 13:48:34
    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 486181: (RESOURCE_LEAK)
    /js_bbs.cpp: 1730 in js_expand_atcodes(JSContext *, unsigned int, unsigned long *)()
    /js_bbs.cpp: 1732 in js_expand_atcodes(JSContext *, unsigned int, unsigned long *)()


    ________________________________________________________________________________________________________
    *** CID 486181: (RESOURCE_LEAK)
    /js_bbs.cpp: 1730 in js_expand_atcodes(JSContext *, unsigned int, unsigned long *)()
    1724 if (instr == NULL)
    1725 return JS_FALSE;
    1726
    1727 if(JSVAL_IS_OBJECT(argv[1]) && !JSVAL_IS_NULL(argv[1])) {
    1728 JSObject* hdrobj;
    1729 if((hdrobj = JSVAL_TO_OBJECT(argv[1])) == NULL)
    CID 486181: (RESOURCE_LEAK)
    Variable "instr" going out of scope leaks the storage it points to. 1730 return JS_FALSE;
    1731 if(!js_GetMsgHeaderObjectPrivates(cx, hdrobj, /* smb_t: */NULL, &msg, /* post: */NULL))
    1732 return JS_FALSE;
    1733 }
    1734
    1735 rc = JS_SUSPENDREQUEST(cx);
    /js_bbs.cpp: 1732 in js_expand_atcodes(JSContext *, unsigned int, unsigned long *)()
    1726
    1727 if(JSVAL_IS_OBJECT(argv[1]) && !JSVAL_IS_NULL(argv[1])) {
    1728 JSObject* hdrobj;
    1729 if((hdrobj = JSVAL_TO_OBJECT(argv[1])) == NULL)
    1730 return JS_FALSE;
    1731 if(!js_GetMsgHeaderObjectPrivates(cx, hdrobj, /* smb_t: */NULL, &msg, /* post: */NULL))
    CID 486181: (RESOURCE_LEAK)
    Variable "instr" going out of scope leaks the storage it points to. 1732 return JS_FALSE;
    1733 }
    1734
    1735 rc = JS_SUSPENDREQUEST(cx);
    1736 sbbs->expand_atcodes(instr, result, sizeof result, msg);
    1737 free(instr);


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3DmylI_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrDXJXQdHoPdhvgvF0Vb847O95f-2F78EIoUagepOVq0LGxVFLDoLOCCiMG-2Fo4JxZOKwjHbMnoOXJKKkCjtFcCkE7VRLhxJ-2FNLJW4jwAN0Jl-2F3no6moASPMez-2F6bxuKm8Qy55QwIHngsrpIdU6tJlGz6f2tQot6J2A4fn-2FWICSVomHTA-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Friday, February 09, 2024 13:39:53
    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 486276: (USE_AFTER_FREE)
    /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf() /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf() /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf() /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf() /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf() /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf() /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf() /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf() /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf() /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf() /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf() /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf() /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf() /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf() /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf()


    ________________________________________________________________________________________________________
    *** CID 486276: (USE_AFTER_FREE)
    /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf()
    1372 break;
    1373 case XP_PRINTF_TYPE_SIZET:
    1374 next=xp_asprintf_next(working, type, va_arg(va, size_t));
    1375 break;
    1376 }
    1377 if(next==NULL) {
    CID 486276: (USE_AFTER_FREE)
    Calling "free" frees pointer "working" which has already been freed. 1378 free(working);
    1379 return(NULL);
    1380 }
    1381 working=next;
    1382 }
    1383 next=xp_asprintf_end(working, NULL); /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf()
    1372 break;
    1373 case XP_PRINTF_TYPE_SIZET:
    1374 next=xp_asprintf_next(working, type, va_arg(va, size_t));
    1375 break;
    1376 }
    1377 if(next==NULL) {
    CID 486276: (USE_AFTER_FREE)
    Calling "free" frees pointer "working" which has already been freed. 1378 free(working);
    1379 return(NULL);
    1380 }
    1381 working=next;
    1382 }
    1383 next=xp_asprintf_end(working, NULL); /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf()
    1372 break;
    1373 case XP_PRINTF_TYPE_SIZET:
    1374 next=xp_asprintf_next(working, type, va_arg(va, size_t));
    1375 break;
    1376 }
    1377 if(next==NULL) {
    CID 486276: (USE_AFTER_FREE)
    Calling "free" frees pointer "working" which has already been freed. 1378 free(working);
    1379 return(NULL);
    1380 }
    1381 working=next;
    1382 }
    1383 next=xp_asprintf_end(working, NULL); /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf()
    1372 break;
    1373 case XP_PRINTF_TYPE_SIZET:
    1374 next=xp_asprintf_next(working, type, va_arg(va, size_t));
    1375 break;
    1376 }
    1377 if(next==NULL) {
    CID 486276: (USE_AFTER_FREE)
    Calling "free" frees pointer "working" which has already been freed. 1378 free(working);
    1379 return(NULL);
    1380 }
    1381 working=next;
    1382 }
    1383 next=xp_asprintf_end(working, NULL); /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf()
    1372 break;
    1373 case XP_PRINTF_TYPE_SIZET:
    1374 next=xp_asprintf_next(working, type, va_arg(va, size_t));
    1375 break;
    1376 }
    1377 if(next==NULL) {
    CID 486276: (USE_AFTER_FREE)
    Calling "free" frees pointer "working" which has already been freed. 1378 free(working);
    1379 return(NULL);
    1380 }
    1381 working=next;
    1382 }
    1383 next=xp_asprintf_end(working, NULL); /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf()
    1372 break;
    1373 case XP_PRINTF_TYPE_SIZET:
    1374 next=xp_asprintf_next(working, type, va_arg(va, size_t));
    1375 break;
    1376 }
    1377 if(next==NULL) {
    CID 486276: (USE_AFTER_FREE)
    Calling "free" frees pointer "working" which has already been freed. 1378 free(working);
    1379 return(NULL);
    1380 }
    1381 working=next;
    1382 }
    1383 next=xp_asprintf_end(working, NULL); /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf()
    1372 break;
    1373 case XP_PRINTF_TYPE_SIZET:
    1374 next=xp_asprintf_next(working, type, va_arg(va, size_t));
    1375 break;
    1376 }
    1377 if(next==NULL) {
    CID 486276: (USE_AFTER_FREE)
    Calling "free" frees pointer "working" which has already been freed. 1378 free(working);
    1379 return(NULL);
    1380 }
    1381 working=next;
    1382 }
    1383 next=xp_asprintf_end(working, NULL); /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf()
    1372 break;
    1373 case XP_PRINTF_TYPE_SIZET:
    1374 next=xp_asprintf_next(working, type, va_arg(va, size_t));
    1375 break;
    1376 }
    1377 if(next==NULL) {
    CID 486276: (USE_AFTER_FREE)
    Calling "free" frees pointer "working" which has already been freed. 1378 free(working);
    1379 return(NULL);
    1380 }
    1381 working=next;
    1382 }
    1383 next=xp_asprintf_end(working, NULL); /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf()
    1372 break;
    1373 case XP_PRINTF_TYPE_SIZET:
    1374 next=xp_asprintf_next(working, type, va_arg(va, size_t));
    1375 break;
    1376 }
    1377 if(next==NULL) {
    CID 486276: (USE_AFTER_FREE)
    Calling "free" frees pointer "working" which has already been freed. 1378 free(working);
    1379 return(NULL);
    1380 }
    1381 working=next;
    1382 }
    1383 next=xp_asprintf_end(working, NULL); /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf()
    1372 break;
    1373 case XP_PRINTF_TYPE_SIZET:
    1374 next=xp_asprintf_next(working, type, va_arg(va, size_t));
    1375 break;
    1376 }
    1377 if(next==NULL) {
    CID 486276: (USE_AFTER_FREE)
    Calling "free" frees pointer "working" which has already been freed. 1378 free(working);
    1379 return(NULL);
    1380 }
    1381 working=next;
    1382 }
    1383 next=xp_asprintf_end(working, NULL); /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf()
    1372 break;
    1373 case XP_PRINTF_TYPE_SIZET:
    1374 next=xp_asprintf_next(working, type, va_arg(va, size_t));
    1375 break;
    1376 }
    1377 if(next==NULL) {
    CID 486276: (USE_AFTER_FREE)
    Calling "free" frees pointer "working" which has already been freed. 1378 free(working);
    1379 return(NULL);
    1380 }
    1381 working=next;
    1382 }
    1383 next=xp_asprintf_end(working, NULL); /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf()
    1372 break;
    1373 case XP_PRINTF_TYPE_SIZET:
    1374 next=xp_asprintf_next(working, type, va_arg(va, size_t));
    1375 break;
    1376 }
    1377 if(next==NULL) {
    CID 486276: (USE_AFTER_FREE)
    Calling "free" frees pointer "working" which has already been freed. 1378 free(working);
    1379 return(NULL);
    1380 }
    1381 working=next;
    1382 }
    1383 next=xp_asprintf_end(working, NULL); /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf()
    1372 break;
    1373 case XP_PRINTF_TYPE_SIZET:
    1374 next=xp_asprintf_next(working, type, va_arg(va, size_t));
    1375 break;
    1376 }
    1377 if(next==NULL) {
    CID 486276: (USE_AFTER_FREE)
    Calling "free" frees pointer "working" which has already been freed. 1378 free(working);
    1379 return(NULL);
    1380 }
    1381 working=next;
    1382 }
    1383 next=xp_asprintf_end(working, NULL); /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf()
    1372 break;
    1373 case XP_PRINTF_TYPE_SIZET:
    1374 next=xp_asprintf_next(working, type, va_arg(va, size_t));
    1375 break;
    1376 }
    1377 if(next==NULL) {
    CID 486276: (USE_AFTER_FREE)
    Calling "free" frees pointer "working" which has already been freed. 1378 free(working);
    1379 return(NULL);
    1380 }
    1381 working=next;
    1382 }
    1383 next=xp_asprintf_end(working, NULL); /tmp/sbbs-Feb-09-2024/src/xpdev/xpprintf.c: 1378 in xp_vasprintf()
    1372 break;
    1373 case XP_PRINTF_TYPE_SIZET:
    1374 next=xp_asprintf_next(working, type, va_arg(va, size_t));
    1375 break;
    1376 }
    1377 if(next==NULL) {
    CID 486276: (USE_AFTER_FREE)
    Calling "free" frees pointer "working" which has already been freed. 1378 free(working);
    1379 return(NULL);
    1380 }
    1381 working=next;
    1382 }
    1383 next=xp_asprintf_end(working, NULL);


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3DIHvH_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrCP2NMkGTJz9ej0zbFZSaut2su5O4d-2FdeN5YNfhO3vr5iN7SLkyWMmA-2BkVBoBNMCMtjp4F5UOP3BhPg-2B0yHPx-2BA66plmcHqc3TbhObiquLp-2FeS-2BJifVzCXGlHdvyg4PHEaoR6LUO7c-2FqTSbtEkku9P0EYfxZeeo5KgjMqT4aVuFYw-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Wednesday, February 14, 2024 13:40:33
    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 486477: Error handling issues (CHECKED_RETURN)
    /writemsg.cpp: 416 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()


    ________________________________________________________________________________________________________
    *** CID 486477: Error handling issues (CHECKED_RETURN)
    /writemsg.cpp: 416 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()
    410 free(buf);
    411 return(false);
    412 }
    413 if(!i && linesquoted)
    414 break;
    415 if(!i || quote[0]==all_key()) { /* Quote all */
    CID 486477: Error handling issues (CHECKED_RETURN)
    Calling "fseek(stream, l, 0)" without checking return value. This library function may fail and return an error code.
    416 fseek(stream,l,SEEK_SET);
    417 while(!feof(stream) && !ferror(stream)) {
    418 if(!fgets(str,sizeof(str),stream))
    419 break;
    420 quotestr(str);
    421 SAFEPRINTF2(tmp,quote_fmt,cols-4,str);


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3D2gqt_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrDyBxF-2BuedSB2oLaNTy6psp3Cor4F0rz-2B4SwaIkEVyFE7FwRjEukPY43bM1L1Hi7YMYgyrb0V1krz3N47RLZR8GIqMuk2Z3RqE2OO4o9y0KvmmLDJLp5jbtMBebo-2FmfheUw1RP41SRg-2FK16Oi1OoUubPmh6iPKTPVX1V81t13b6sA-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Friday, February 16, 2024 13:40:21
    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.
    4 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 486496: (CHECKED_RETURN)
    /writemsg.cpp: 382 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()
    /writemsg.cpp: 344 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()


    ________________________________________________________________________________________________________
    *** CID 486496: (CHECKED_RETURN)
    /writemsg.cpp: 382 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()
    376
    377 else if(useron_xedit && cfg.xedit[useron_xedit-1]->misc&QUOTENONE)
    378 ;
    379
    380 else if(yesno(text[QuoteMessageQ])) {
    381 if(!fexist(quotes_fname(useron_xedit, path, sizeof(path))))
    CID 486496: (CHECKED_RETURN)
    Calling "fexistcase" without checking return value (as is done elsewhere 117 out of 130 times).
    382 fexistcase(path);
    383 if((stream=fnopen(&file,path,O_RDONLY))==NULL) {
    384 errormsg(WHERE,ERR_OPEN,path,O_RDONLY); 385 free(buf);
    386 return(false);
    387 }
    /writemsg.cpp: 344 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()
    338 && cfg.sub[subnum]->misc&SUB_QUOTE))) {
    339
    340 /* Quote entire message to MSGTMP or INPUT.MSG */
    341
    342 if(useron_xedit && cfg.xedit[useron_xedit-1]->misc&QUOTEALL) {
    343 if(!fexist(quotes_fname(useron_xedit, path, sizeof(path))))
    CID 486496: (CHECKED_RETURN)
    Calling "fexistcase" without checking return value (as is done elsewhere 117 out of 130 times).
    344 fexistcase(path);
    345 if((stream=fnopen(NULL,path,O_RDONLY))==NULL) { 346 errormsg(WHERE,ERR_OPEN,path,O_RDONLY); 347 free(buf);
    348 return(false);
    349 }


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3Dzn-5_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrDPrVkNTVRB68tnZKkkXRCkPUT71LTHn8QopE1tYVp-2FX-2Br08qA1yywGwU3c4MVrlWG-2BFbxw1q-2Fo2e8fear09VrdxSTaZYVAh-2F7Xjhpabc-2Bcxm1n9Xbtacc4z9BZManLJqZ02pp-2F9yM96t7IgwLb1rxOxJKJoizd1NnBghDuRAiDsQ-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Wednesday, February 21, 2024 13:39:50
    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 486966: Memory - illegal accesses (RETURN_LOCAL) /tmp/sbbs-Feb-21-2024/src/xpdev/ini_file.c: 1073 in iniGetSString()


    ________________________________________________________________________________________________________
    *** CID 486966: Memory - illegal accesses (RETURN_LOCAL) /tmp/sbbs-Feb-21-2024/src/xpdev/ini_file.c: 1073 in iniGetSString()
    1067 size_t pos;
    1068
    1069 ret = iniGetString(list, section, key, deflt, fval);
    1070 if (ret == NULL)
    1071 return ret;
    1072 if (ret == deflt)
    CID 486966: Memory - illegal accesses (RETURN_LOCAL)
    Returning pointer "ret" which points to local variable "fval".
    1073 return ret;
    1074 if (sz < 1 || value == NULL)
    1075 return value;
    1076 for (pos = 0; ret[pos]; pos++) {
    1077 if (pos == sz - 1)
    1078 break;


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3DCYsZ_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrB1fCECxNjHKDEt971XvCYyugWw34HvI84c7ZyY-2BmycHBmh3Jr1qZj7bY0gisTp5UvajQDEP9IZaQTdaMfzHs9DaKL5izWrIdkGSbov-2BkvcK5JM0MeIsMOKIH6vPln5vf0C7XQzN4AL02tzLGZGEYX2inJEOXX8A46m4M4faN8zLQ-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Saturday, February 24, 2024 13:40:32
    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 486983: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Feb-24-2024/src/conio/bitmap_con.c: 503 in get_full_rectangle_locked()


    ________________________________________________________________________________________________________
    *** CID 486983: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Feb-24-2024/src/conio/bitmap_con.c: 503 in get_full_rectangle_locked()
    497 {
    498 struct rectlist *rect;
    499 size_t sz = screen->screenwidth * screen->screenheight;
    500 size_t pos;
    501
    502 // TODO: Some sort of caching here would make things faster...? >>> CID 486983: Concurrent data access violations (MISSING_LOCK)
    Accessing "callbacks.drawrect" without holding lock "bitmap_callbacks.lock". Elsewhere, "bitmap_callbacks.drawrect" is written to with "bitmap_callbacks.lock" held 1 out of 1 times (1 of these accesses strongly imply that it is necessary).
    503 if(callbacks.drawrect) {
    504 rect = alloc_full_rect(screen, true);
    505 if (!rect)
    506 return rect;
    507 for (pos = 0; pos < sz; pos++)
    508 rect->data[pos] = color_value(screen->rect->data[pos]);


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4E6fW2ok94RcmG1J20ETIf4-3D8c0G_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrAVcLrFKXhsSDRaqja0Q4G60ZIIHvAxvJ-2BFLnRXVDcep-2B1SeryMCXp8nrAo0L5iDlIM3xJ7X0g6QrD0mlxK5meH-2BBJ37jGt-2F-2BR0SSgqyC1ybNJHz3XT2-2F11T7UEUt5-2FUqhSnT2Rs5NZnjzJIv-2Bf3-2BxbnrqOl4LZRHeRWkBYW2FZNw-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Tuesday, February 27, 2024 13:40:04
    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.
    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 2 of 2 defect(s)


    ** CID 487089: High impact quality (Y2K38_SAFETY)
    /logout.cpp: 97 in sbbs_t::logout(bool)()


    ________________________________________________________________________________________________________
    *** CID 487089: High impact quality (Y2K38_SAFETY)
    /logout.cpp: 97 in sbbs_t::logout(bool)()
    91 delfiles(cfg.temp_dir,ALLFILES);
    92 if(sys_status&SS_USERON) { // Insures the useron actually went through logon()/getmsgptrs() first
    93 putmsgptrs();
    94 }
    95 if(!REALSYSOP)
    96 logofflist();
    CID 487089: High impact quality (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "this->now" is cast to "time32_t".
    97 useron.laston=(time32_t)now;
    98
    99 ttoday=useron.ttoday-useron.textra; /* billable time used prev calls */
    100 if(ttoday>=cfg.level_timeperday[useron.level])
    101 i=0;
    102 else

    ** CID 487088: Error handling issues (CHECKED_RETURN)
    /logout.cpp: 89 in sbbs_t::logout(bool)()


    ________________________________________________________________________________________________________
    *** CID 487088: Error handling issues (CHECKED_RETURN)
    /logout.cpp: 89 in sbbs_t::logout(bool)()
    83 if(cfg.logout_mod[0]) {
    84 lprintf(LOG_DEBUG, "executing logout module: %s", cfg.logout_mod);
    85 exec_bin(cfg.logout_mod,&main_csi);
    86 }
    87 SAFEPRINTF2(path,"%smsgs/%4.4u.msg",cfg.data_dir,useron.number);
    88 if(fexistcase(path) && !flength(path)) /* remove any 0 byte message files */
    CID 487088: Error handling issues (CHECKED_RETURN)
    Calling "remove(path)" without checking return value. This library function may fail and return an error code.
    89 remove(path);
    90
    91 delfiles(cfg.temp_dir,ALLFILES);
    92 if(sys_status&SS_USERON) { // Insures the useron actually went through logon()/getmsgptrs() first
    93 putmsgptrs();
    94 }


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu4gdQbQRNsarCbK0jIoVQSWT2zCPijRqaed4AhLiEI9Z7MR9SJQ09ot5XPbn9SW-2F14-3D6w7L_7FYjIqE8olEh4k02KWtt1r1LGSyuXVEtCuKuJCXgAQZL2KLON9c0qMM4K5aJ-2BfdThB6-2BKGg4cWLgpEPITZFj21NY7HODKa21xNCYmqB9WQ9jGdCaJ8kxZplYYP3ZpJQciN5y3k5uG3vF-2Bbjho-2FJ80W4KFTLh14Ge0YKg4KwvJQypDruDryLBwEKW1kUPhOIUyQwbpfzm3Xgxi8Wb6VLKOw-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Wednesday, February 28, 2024 13:40:48
    Hi,

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

    23 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 20 of 23 defect(s)


    ** CID 487180: Memory - corruptions (BUFFER_SIZE)
    /sftp.cpp: 1388 in sftp_readdir(sftp_string *, void *)()


    ________________________________________________________________________________________________________
    *** CID 487180: Memory - corruptions (BUFFER_SIZE)
    /sftp.cpp: 1388 in sftp_readdir(sftp_string *, void *)()
    1382 return generic_dot_entry(sbbs, dir, tmppath, &dd->info.rootdir.idx);
    1383 }
    1384 if (dd->info.rootdir.idx == dotdot) {
    1385 if (pm->sftp_patt[1]) {
    1386 char *dir = const_cast<char *>(".."); 1387 snprintf(tmppath, sizeof(tmppath) - 2 /* for dir */, pm->sftp_patt, sbbs->useron.alias);
    CID 487180: Memory - corruptions (BUFFER_SIZE)
    Buffer "tmppath" has a size of 4097 characters, and its string length (null character not included) is 4095 characters, leaving an available space of 2 characters. Appending "dir", whose string length (null character not included) is 2 characters, plus the null character overruns "tmppath".
    1388 strcat(tmppath, dir);
    1389 return generic_dot_realpath_entry(sbbs, dir, tmppath, &dd->info.rootdir.idx);
    1390 }
    1391 else
    1392 dd->info.rootdir.idx++;
    1393 }

    ** CID 487179: (MISSING_LOCK)
    /tmp/sbbs-Feb-28-2024/src/sftp/sftp_static.h: 63 in exit_function() /tmp/sbbs-Feb-28-2024/src/sftp/sftp_static.h: 63 in exit_function()


    ________________________________________________________________________________________________________
    *** CID 487179: (MISSING_LOCK)
    /tmp/sbbs-Feb-28-2024/src/sftp/sftp_static.h: 63 in exit_function()
    57 }
    58
    59 static bool
    60 exit_function(SFTP_STATIC_TYPE state, bool retval)
    61 {
    62 assert(state->running > 0);
    CID 487179: (MISSING_LOCK)
    Accessing "state->running" without holding lock "sftp_client_state.mtx". Elsewhere, "sftp_client_state.running" is written to with "sftp_client_state.mtx" held 1 out of 2 times (1 of these accesses strongly imply that it is necessary).
    63 state->running--;
    64 pthread_mutex_unlock(&state->mtx);
    65 return retval;
    66 }
    67
    68 static bool
    /tmp/sbbs-Feb-28-2024/src/sftp/sftp_static.h: 63 in exit_function()
    57 }
    58
    59 static bool
    60 exit_function(SFTP_STATIC_TYPE state, bool retval)
    61 {
    62 assert(state->running > 0);
    CID 487179: (MISSING_LOCK)
    Accessing "state->running" without holding lock "sftp_server_state.mtx". Elsewhere, "sftp_server_state.running" is written to with "sftp_server_state.mtx" held 1 out of 2 times (1 of these accesses strongly imply that it is necessary).
    63 state->running--;
    64 pthread_mutex_unlock(&state->mtx);
    65 return retval;
    66 }
    67
    68 static bool

    ** CID 487178: (RESOURCE_LEAK)
    /tmp/sbbs-Feb-28-2024/src/sftp/sftp_server.c: 78 in s_open() /tmp/sbbs-Feb-28-2024/src/sftp/sftp_server.c: 72 in s_open() /tmp/sbbs-Feb-28-2024/src/sftp/sftp_server.c: 82 in s_open() /tmp/sbbs-Feb-28-2024/src/sftp/sftp_server.c: 68 in s_open()


    ________________________________________________________________________________________________________
    *** CID 487178: (RESOURCE_LEAK) /tmp/sbbs-Feb-28-2024/src/sftp/sftp_server.c: 78 in s_open()
    72 return true;
    73 }
    74 }
    75 if (!(flags & SSH_FXF_CREAT)) {
    76 if (flags & SSH_FXF_TRUNC) {
    77 sftps_send_error(state, SSH_FX_OP_UNSUPPORTED, "Can't truncate unless creating");
    CID 487178: (RESOURCE_LEAK)
    Variable "fname" going out of scope leaks the storage it points to.
    78 return true;
    79 }
    80 if (flags & SSH_FXF_EXCL) {
    81 sftps_send_error(state, SSH_FX_OP_UNSUPPORTED, "Can't open exclisive unless creating");
    82 return true;
    83 }
    /tmp/sbbs-Feb-28-2024/src/sftp/sftp_server.c: 72 in s_open()
    66 if (flags & SSH_FXF_CREAT) {
    67 sftps_send_error(state, SSH_FX_OP_UNSUPPORTED, "Can't create unless writing");
    68 return true;
    69 }
    70 if (flags & SSH_FXF_APPEND) {
    71 sftps_send_error(state, SSH_FX_OP_UNSUPPORTED, "Can't append unless writing");
    CID 487178: (RESOURCE_LEAK)
    Variable "fname" going out of scope leaks the storage it points to.
    72 return true;
    73 }
    74 }
    75 if (!(flags & SSH_FXF_CREAT)) {
    76 if (flags & SSH_FXF_TRUNC) {
    77 sftps_send_error(state, SSH_FX_OP_UNSUPPORTED, "Can't truncate unless creating");
    /tmp/sbbs-Feb-28-2024/src/sftp/sftp_server.c: 82 in s_open()
    76 if (flags & SSH_FXF_TRUNC) {
    77 sftps_send_error(state, SSH_FX_OP_UNSUPPORTED, "Can't truncate unless creating");
    78 return true;
    79 }
    80 if (flags & SSH_FXF_EXCL) {
    81 sftps_send_error(state, SSH_FX_OP_UNSUPPORTED, "Can't open exclisive unless creating");
    CID 487178: (RESOURCE_LEAK)
    Variable "fname" going out of scope leaks the storage it points to.
    82 return true;
    83 }
    84 }
    85 attrs = sftp_getfattr(state->rxp);
    86 if (attrs == NULL) {
    87 free_sftp_str(fname); /tmp/sbbs-Feb-28-2024/src/sftp/sftp_server.c: 68 in s_open()
    62 if (fname == NULL)
    63 return false;
    64 flags = get32(state);
    65 if (!(flags & SSH_FXF_WRITE)) {
    66 if (flags & SSH_FXF_CREAT) {
    67 sftps_send_error(state, SSH_FX_OP_UNSUPPORTED, "Can't create unless writing");
    CID 487178: (RESOURCE_LEAK)
    Variable "fname" going out of scope leaks the storage it points to.
    68 return true;
    69 }
    70 if (flags & SSH_FXF_APPEND) {
    71 sftps_send_error(state, SSH_FX_OP_UNSUPPORTED, "Can't append unless writing");
    72 return true;
    73 }

    ** CID 487177: (Y2K38_SAFETY)
    /sftp.cpp: 433 in homefile_attrs(sbbs_t *, const char *)()
    /sftp.cpp: 433 in homefile_attrs(sbbs_t *, const char *)()


    ________________________________________________________________________________________________________
    *** CID 487177: (Y2K38_SAFETY)
    /sftp.cpp: 433 in homefile_attrs(sbbs_t *, const char *)()
    427 if (attr == nullptr)
    428 return nullptr;
    429 sftp_fattr_set_permissions(attr, S_IFREG | S_IRWXU | S_IRUSR | S_IWUSR);
    430 sftp_fattr_set_uid_gid(attr, sbbs->useron.number, users_gid); 431 sftp_fattr_set_size(attr, flength(path));
    432 time_t fd = fdate(path);
    CID 487177: (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "fd" is cast to "uint32_t".
    433 sftp_fattr_set_times(attr, fd, fd);
    434 return attr;
    435 }
    436
    437 static sftp_file_attr_t
    438 sshkeys_attrs(sbbs_t *sbbs, const char *path)
    /sftp.cpp: 433 in homefile_attrs(sbbs_t *, const char *)()
    427 if (attr == nullptr)
    428 return nullptr;
    429 sftp_fattr_set_permissions(attr, S_IFREG | S_IRWXU | S_IRUSR | S_IWUSR);
    430 sftp_fattr_set_uid_gid(attr, sbbs->useron.number, users_gid); 431 sftp_fattr_set_size(attr, flength(path));
    432 time_t fd = fdate(path);
    CID 487177: (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "fd" is cast to "uint32_t".
    433 sftp_fattr_set_times(attr, fd, fd);
    434 return attr;
    435 }
    436
    437 static sftp_file_attr_t
    438 sshkeys_attrs(sbbs_t *sbbs, const char *path)

    ** CID 487176: (RESOURCE_LEAK)
    /sftp.cpp: 741 in find_lib(sbbs_t *, const char *)()
    /sftp.cpp: 741 in find_lib(sbbs_t *, const char *)()


    ________________________________________________________________________________________________________
    *** CID 487176: (RESOURCE_LEAK)
    /sftp.cpp: 741 in find_lib(sbbs_t *, const char *)()
    735 *c = 0;
    736 for (l = 0; l < sbbs->cfg.total_libs; l++) {
    737 if (!can_user_access_lib(&sbbs->cfg, l, &sbbs->useron, &sbbs->client))
    738 continue;
    739 exp = expand_slash(sbbs->cfg.lib[l]->lname);
    740 if (exp == nullptr)
    CID 487176: (RESOURCE_LEAK)
    Variable "p" going out of scope leaks the storage it points to.
    741 return -1;
    742 if (strcmp(p, exp)) {
    743 free(exp);
    744 continue;
    745 }
    746 free(exp);
    /sftp.cpp: 741 in find_lib(sbbs_t *, const char *)()
    735 *c = 0;
    736 for (l = 0; l < sbbs->cfg.total_libs; l++) {
    737 if (!can_user_access_lib(&sbbs->cfg, l, &sbbs->useron, &sbbs->client))
    738 continue;
    739 exp = expand_slash(sbbs->cfg.lib[l]->lname);
    740 if (exp == nullptr)
    CID 487176: (RESOURCE_LEAK)
    Variable "p" going out of scope leaks the storage it points to.
    741 return -1;
    742 if (strcmp(p, exp)) {
    743 free(exp);
    744 continue;
    745 }
    746 free(exp);

    ** CID 487175: Resource leaks (RESOURCE_LEAK)
    /sftp.cpp: 1517 in sftp_readdir(sftp_string *, void *)()


    ________________________________________________________________________________________________________
    *** CID 487175: Resource leaks (RESOURCE_LEAK)
    /sftp.cpp: 1517 in sftp_readdir(sftp_string *, void *)()
    1511 }
    1512 attr = get_dir_attrs(sbbs, dd->info.filebase.idx);
    1513 if (attr == nullptr)
    1514 return sftps_send_error(sbbs->sftp_state, SSH_FX_FAILURE, "Attributes allocation failure");
    1515 ename = expand_slash(sbbs->cfg.dir[dd->info.filebase.idx]->lname);
    1516 if (ename == nullptr)
    CID 487175: Resource leaks (RESOURCE_LEAK)
    Variable "attr" going out of scope leaks the storage it points to.
    1517 return sftps_send_error(sbbs->sftp_state, SSH_FX_FAILURE, "EName allocation failure");
    1518 lname = get_longname(sbbs, ename, nullptr, attr);
    1519 if (lname == nullptr) {
    1520 free(ename);
    1521 sftp_fattr_free(attr);
    1522 return sftps_send_error(sbbs->sftp_state, SSH_FX_FAILURE, "Longname allocation failure");

    ** CID 487174: Code maintainability issues (UNUSED_VALUE)
    /main.cpp: 1993 in crypt_pop_channel_data(sbbs_t *, char *, int, int *)()


    ________________________________________________________________________________________________________
    *** CID 487174: Code maintainability issues (UNUSED_VALUE)
    /main.cpp: 1993 in crypt_pop_channel_data(sbbs_t *, char *, int, int *)()
    1987
    1988 if (cid != sbbs->sftp_channel && cid != sbbs->session_channel) {
    1989 lprintf(LOG_WARNING, "Node %d SSH WARNING: attempt to use channel '%s' (%d != %d or %d)"
    1990 , sbbs->cfg.node_num, cname ? cname : "<unknown>", cid, sbbs->session_channel, sbbs->sftp_channel);
    1991 if (cname) {
    1992 free_crypt_attrstr(cname);
    CID 487174: Code maintainability issues (UNUSED_VALUE)
    Assigning value "NULL" to "cname" here, but that stored value is overwritten before it can be used.
    1993 cname = nullptr;
    1994 }
    1995 if (ssname) {
    1996 free_crypt_attrstr(ssname);
    1997 ssname = nullptr;
    1998 }

    ** CID 487173: Program hangs (LOCK)
    /sftp.cpp: 987 in sftp_send(unsigned char *, unsigned long, void *)()


    ________________________________________________________________________________________________________
    *** CID 487173: Program hangs (LOCK)
    /sftp.cpp: 987 in sftp_send(unsigned char *, unsigned long, void *)()
    981 if (sbbs->sftp_channel == -1)
    982 return false;
    983 while (sent < len) {
    984 pthread_mutex_lock(&sbbs->ssh_mutex);
    985 status = cryptSetAttribute(sbbs->ssh_session, CRYPT_SESSINFO_SSH_CHANNEL, sbbs->sftp_channel);
    986 if (cryptStatusError(status))
    CID 487173: Program hangs (LOCK)
    Returning without unlocking "sbbs->ssh_mutex".
    987 return false;
    988 size_t sendbytes = len - sent;
    989 #define SENDBYTES_MAX 0x2000
    990 if (sendbytes > SENDBYTES_MAX)
    991 sendbytes = SENDBYTES_MAX;
    992 status = cryptSetAttribute(sbbs->ssh_session, CRYPT_OPTION_NET_WRITETIMEOUT, 5);

    ** CID 487172: Incorrect expression (CONSTANT_EXPRESSION_RESULT)
    /sftp.cpp: 171 in path_map::path_map(sbbs_t *, const unsigned char *, map_path_mode)()


    ________________________________________________________________________________________________________
    *** CID 487172: Incorrect expression (CONSTANT_EXPRESSION_RESULT)
    /sftp.cpp: 171 in path_map::path_map(sbbs_t *, const unsigned char *, map_path_mode)()
    165 return;
    166 }
    167 this->is_static_ = false;
    168 this->info.filebase.dir = -1;
    169 this->info.filebase.lib = -1;
    170 this->info.filebase.idx = dot;
    CID 487172: Incorrect expression (CONSTANT_EXPRESSION_RESULT)
    The expression "this->sftp_path[6UL /* files_path_len */] == 0 || this->sftp_path[6UL /* files_path_len */] == 0" does not accomplish anything because it evaluates to either of its identical operands, "this->sftp_path[6UL /* files_path_len */] == 0".
    171 if (this->sftp_path[files_path_len] == 0 || this->sftp_path[files_path_len] == 0) {
    172 // Root...
    173 result_ = MAP_TO_DIR;
    174 return;
    175 }
    176 const char *lib = &this->sftp_path[files_path_len + 1];

    ** CID 487171: Insecure data handling (TAINTED_SCALAR) /tmp/sbbs-Feb-28-2024/src/sftp/sftp_attr.c: 324 in sftp_getfattr()


    ________________________________________________________________________________________________________
    *** CID 487171: Insecure data handling (TAINTED_SCALAR) /tmp/sbbs-Feb-28-2024/src/sftp/sftp_attr.c: 324 in sftp_getfattr()
    318 ret->atime = sftp_get32(pkt);
    319 ret->mtime = sftp_get32(pkt);
    320 }
    321 if (ret->flags & SSH_FILEXFER_ATTR_EXTENDED) {
    322 uint32_t extcnt = sftp_get32(pkt);
    323 uint32_t ext;
    CID 487171: Insecure data handling (TAINTED_SCALAR)
    Using tainted variable "extcnt" as a loop boundary.
    324 for (ext = 0; ext < extcnt; ext++) {
    325 sftp_str_t type = sftp_getstring(pkt);
    326 if (type == NULL)
    327 break;
    328 sftp_str_t data = sftp_getstring(pkt);
    329 if (data == NULL) {

    ** CID 487170: Security best practices violations (TOCTOU)
    /sftp.cpp: 1147 in sftp_open(sftp_string *, unsigned int, sftp_file_attributes *, void *)()


    ________________________________________________________________________________________________________
    *** CID 487170: Security best practices violations (TOCTOU)
    /sftp.cpp: 1147 in sftp_open(sftp_string *, unsigned int, sftp_file_attributes *, void *)()
    1141 sbbs->sftp_filedes[fdidx]->dir = -1;
    1142 else {
    1143 sbbs->sftp_filedes[fdidx]->dir = pmap.info.filebase.dir;
    1144 sbbs->sftp_filedes[fdidx]->idx_offset = pmap.info.filebase.offset;
    1145 sbbs->sftp_filedes[fdidx]->idx_number = pmap.info.filebase.idx;
    1146 }
    CID 487170: Security best practices violations (TOCTOU)
    Calling function "access" to perform check on "pmap.local_path".
    1147 if (access(pmap.local_path, F_OK) != 0) {
    1148 // File did not exist, and we're creating
    1149 if (oflags & O_CREAT) {
    1150 sbbs->sftp_filedes[fdidx]->created = true;
    1151 }
    1152 }

    ** CID 487169: Error handling issues (CHECKED_RETURN)
    /sftp.cpp: 1044 in sftp_cleanup_callback(void *)()


    ________________________________________________________________________________________________________
    *** CID 487169: Error handling issues (CHECKED_RETURN)
    /sftp.cpp: 1044 in sftp_cleanup_callback(void *)()
    1038
    1039 for (unsigned i = 0; i < nfdes; i++) {
    1040 if (sbbs->sftp_filedes[i] != nullptr) {
    1041 close(sbbs->sftp_filedes[i]->fd);
    1042 if (sbbs->sftp_filedes[i]->created && sbbs->sftp_filedes[i]->local_path) {
    1043 // If we were uploading, delete the incomplete file
    CID 487169: Error handling issues (CHECKED_RETURN)
    Calling "remove(sbbs->sftp_filedes[i]->local_path)" without checking return value. This library function may fail and return an error code.
    1044 remove(sbbs->sftp_filedes[i]->local_path);
    1045 }
    1046 free(sbbs->sftp_filedes[i]->local_path);
    1047 free(sbbs->sftp_filedes[i]);
    1048 sbbs->sftp_filedes[i] = nullptr;
    1049 }

    ** CID 487168: (UNUSED_VALUE) /tmp/sbbs-Feb-28-2024/3rdp/src/cl/session/ssh2_msgsvr.c: 679 in processChannelRequest()
    /tmp/sbbs-Feb-28-2024/3rdp/src/cl/session/ssh2_msgsvr.c: 691 in processChannelRequest()


    ________________________________________________________________________________________________________
    *** CID 487168: (UNUSED_VALUE) /tmp/sbbs-Feb-28-2024/3rdp/src/cl/session/ssh2_msgsvr.c: 679 in processChannelRequest()
    673 setChannelAttribute(sessionInfoPtr, CRYPT_SESSINFO_SSH_CHANNEL_WIDTH, status);
    674 status = readUint32(stream);
    675 if (status > 0)
    676 setChannelAttribute(sessionInfoPtr, CRYPT_SESSINFO_SSH_CHANNEL_HEIGHT, status);
    677 break;
    678 case REQUEST_SHELL:
    CID 487168: (UNUSED_VALUE)
    Assigning value from "setChannelAttributeS(sessionInfoPtr, CRYPT_SESSINFO_SSH_CHANNEL_TYPE, "shell", 5)" to "status" here, but that stored value is overwritten before it can be used.
    679 status = setChannelAttributeS( sessionInfoPtr, 680 CRYPT_SESSINFO_SSH_CHANNEL_TYPE,
    681 "shell", 5 );
    682 break;
    683 case REQUEST_NOOP:
    684 /* Generic requests containing extra information that we're not
    /tmp/sbbs-Feb-28-2024/3rdp/src/cl/session/ssh2_msgsvr.c: 691 in processChannelRequest()
    685 interested in */
    686 break;
    687
    688 #ifdef USE_SSH_EXTENDED
    689 case REQUEST_EXEC:
    690 /* A further generic request that we're not interested in */
    CID 487168: (UNUSED_VALUE)
    Assigning value from "setChannelAttributeS(sessionInfoPtr, CRYPT_SESSINFO_SSH_CHANNEL_TYPE, "exec", 4)" to "status" here, but that stored value is overwritten before it can be used.
    691 status = setChannelAttributeS( sessionInfoPtr, 692 CRYPT_SESSINFO_SSH_CHANNEL_TYPE,
    693 "exec", 4 );
    694 break;
    695
    696 case REQUEST_SUBSYSTEM:

    ** CID 487167: Program hangs (LOCK)
    /main.cpp: 2048 in crypt_pop_channel_data(sbbs_t *, char *, int, int *)()


    ________________________________________________________________________________________________________
    *** CID 487167: Program hangs (LOCK)
    /main.cpp: 2048 in crypt_pop_channel_data(sbbs_t *, char *, int, int *)()
    2042 if (closed && sbbs->sftp_channel == -1 && sbbs->session_channel == -1)
    2043 return CRYPT_ERROR_COMPLETE; 2044 }
    2045 }
    2046 if (ret == CRYPT_ENVELOPE_RESOURCE)
    2047 return CRYPT_ERROR_TIMEOUT;
    CID 487167: Program hangs (LOCK)
    Returning without unlocking "sbbs->sftp_state->mtx".
    2048 return ret;
    2049 }
    2050 return CRYPT_ERROR_TIMEOUT;
    2051 }
    2052
    2053 void input_thread(void *arg)

    ** CID 487166: (CHECKED_RETURN)
    /main.cpp: 2036 in crypt_pop_channel_data(sbbs_t *, char *, int, int *)() /main.cpp: 2028 in crypt_pop_channel_data(sbbs_t *, char *, int, int *)()


    ________________________________________________________________________________________________________
    *** CID 487166: (CHECKED_RETURN)
    /main.cpp: 2036 in crypt_pop_channel_data(sbbs_t *, char *, int, int *)()
    2030 closed = true;
    2031 }
    2032 }
    2033 if (sbbs->session_channel != -1) {
    2034 if (!channel_open(sbbs, sbbs->session_channel)) {
    2035 if (cryptStatusOK(cryptSetAttribute(sbbs->ssh_session, CRYPT_SESSINFO_SSH_CHANNEL, sbbs->session_channel)))
    CID 487166: (CHECKED_RETURN)
    Calling "cryptSetAttribute" without checking return value (as is done elsewhere 50 out of 61 times).
    2036 cryptSetAttribute(sbbs->ssh_session, CRYPT_SESSINFO_SSH_CHANNEL_ACTIVE, 0);
    2037 sbbs->session_channel = -1;
    2038 closed = true;
    2039 }
    2040 }
    2041 // All channels are now closed. /main.cpp: 2028 in crypt_pop_channel_data(sbbs_t *, char *, int, int *)()
    2022 if (status != CRYPT_ERROR_NOTFOUND) 2023 sbbs->log_crypt_error_status_sock(status, "getting channel id");
    2024 closing_channel = -1;
    2025 if (sbbs->sftp_channel != -1) {
    2026 if (!channel_open(sbbs, sbbs->sftp_channel)) {
    2027 if (cryptStatusOK(cryptSetAttribute(sbbs->ssh_session, CRYPT_SESSINFO_SSH_CHANNEL, sbbs->sftp_channel)))
    CID 487166: (CHECKED_RETURN)
    Calling "cryptSetAttribute" without checking return value (as is done elsewhere 50 out of 61 times).
    2028 cryptSetAttribute(sbbs->ssh_session, CRYPT_SESSINFO_SSH_CHANNEL_ACTIVE, 0);
    2029 sbbs->sftp_channel = -1;
    2030 closed = true;
    2031 }
    2032 }
    2033 if (sbbs->session_channel != -1) {

    ** CID 487165: (REVERSE_INULL)
    /main.cpp: 1984 in crypt_pop_channel_data(sbbs_t *, char *, int, int *)() /main.cpp: 1975 in crypt_pop_channel_data(sbbs_t *, char *, int, int *)()


    ________________________________________________________________________________________________________
    *** CID 487165: (REVERSE_INULL)
    /main.cpp: 1984 in crypt_pop_channel_data(sbbs_t *, char *, int, int *)()
    1978 if (!sftps_recv(sbbs->sftp_state, reinterpret_cast<uint8_t *>(inbuf), tgot))
    1979 sbbs->sftp_end();
    1980 }
    1981 sbbs->sftp_channel = cid;
    1982 }
    1983 }
    CID 487165: (REVERSE_INULL)
    Null-checking "cname" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
    1984 if (cname && sbbs->session_channel == -1 && strcmp(cname, "shell") == 0) {
    1985 sbbs->session_channel = cid;
    1986 }
    1987
    1988 if (cid != sbbs->sftp_channel && cid != sbbs->session_channel) {
    1989 lprintf(LOG_WARNING, "Node %d SSH WARNING: attempt to use channel '%s' (%d != %d or %d)"
    /main.cpp: 1975 in crypt_pop_channel_data(sbbs_t *, char *, int, int *)()
    1969 return status;
    1970 }
    1971 cname = get_crypt_attribute(sbbs->ssh_session, CRYPT_SESSINFO_SSH_CHANNEL_TYPE);
    1972 if (strcmp(cname, "subsystem") == 0) {
    1973 ssname = get_crypt_attribute(sbbs->ssh_session, CRYPT_SESSINFO_SSH_CHANNEL_ARG1);
    1974 }
    CID 487165: (REVERSE_INULL)
    Null-checking "cname" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
    1975 if (((startup->options & (BBS_OPT_ALLOW_SFTP | BBS_OPT_SSH_ANYAUTH)) == BBS_OPT_ALLOW_SFTP) && ssname && cname && sbbs->sftp_channel == -1 && strcmp(ssname, "sftp") == 0) {
    1976 if (sbbs->init_sftp(cid)) {
    1977 if (tgot > 0) { 1978 if (!sftps_recv(sbbs->sftp_state, reinterpret_cast<uint8_t *>(inbuf), tgot))
    1979 sbbs->sftp_end();
    1980 }

    ** CID 487164: Resource leaks (RESOURCE_LEAK)
    /sftp.cpp: 1424 in sftp_readdir(sftp_string *, void *)()


    ________________________________________________________________________________________________________
    *** CID 487164: Resource leaks (RESOURCE_LEAK)
    /sftp.cpp: 1424 in sftp_readdir(sftp_string *, void *)()
    1418 continue;
    1419 }
    1420 sprintf(tmppath, static_files[dd->info.rootdir.idx].sftp_patt, sbbs->useron.alias);
    1421 remove_trailing_slash(tmppath);
    1422 attr = get_attrs(sbbs, tmppath, &link);
    1423 if (attr == nullptr)
    CID 487164: Resource leaks (RESOURCE_LEAK)
    Variable "link" going out of scope leaks the storage it points to.
    1424 return sftps_send_error(sbbs->sftp_state, SSH_FX_FAILURE, "Attributes allocation failure");
    1425 lname = get_longname(sbbs, tmppath, link, attr);
    1426 if (lname == nullptr) {
    1427 sftp_fattr_free(attr);
    1428 return sftps_send_error(sbbs->sftp_state, SSH_FX_FAILURE, "Longname allocation failure");
    1429 }

    ** CID 487163: Program hangs (LOCK) /tmp/sbbs-Feb-28-2024/src/sftp/sftp_server.c: 373 in sftps_recv()


    ________________________________________________________________________________________________________
    *** CID 487163: Program hangs (LOCK) /tmp/sbbs-Feb-28-2024/src/sftp/sftp_server.c: 373 in sftps_recv()
    367 if (!sftp_rx_pkt_append(&state->rxp, buf, sz))
    368 return exit_function(state, false);
    369 if (sftp_have_pkt_sz(state->rxp)) {
    370 uint32_t psz = sftp_pkt_sz(state->rxp);
    371 if (psz > SFTP_MAX_PACKET_SIZE) {
    372 state->lprintf(state->cb_data, "Packet too large (%" PRIu32 " bytes)", psz);
    CID 487163: Program hangs (LOCK)
    Returning without unlocking "state->mtx".
    373 return false;
    374 }
    375 }
    376 while (sftp_have_full_pkt(state->rxp)) {
    377 bool handled = false;
    378

    ** CID 487162: Control flow issues (DEADCODE)
    /sftp.cpp: 871 in get_attrs(sbbs_t *, const char *, char **)()


    ________________________________________________________________________________________________________
    *** CID 487162: Control flow issues (DEADCODE)
    /sftp.cpp: 871 in get_attrs(sbbs_t *, const char *, char **)()
    865 else
    866 ppath[0] = 0;
    867 ret = pm->get_attrs(sbbs, ppath);
    868 if (link && pm->link_patt) {
    869 asprintf(link, pm->link_patt, sbbs->useron.alias);
    870 if (link == nullptr) {
    CID 487162: Control flow issues (DEADCODE)
    Execution cannot reach this statement: "sftp_fattr_free(ret);".
    871 sftp_fattr_free(ret);
    872 ret = nullptr;
    873 }
    874 }
    875 return ret;
    876 }

    ** CID 487161: (Y2K38_SAFETY)
    /sftp.cpp: 448 in sshkeys_attrs(sbbs_t *, const char *)()
    /sftp.cpp: 448 in sshkeys_attrs(sbbs_t *, const char *)()


    ________________________________________________________________________________________________________
    *** CID 487161: (Y2K38_SAFETY)
    /sftp.cpp: 448 in sshkeys_attrs(sbbs_t *, const char *)()
    442 if (attr == nullptr)
    443 return nullptr;
    444 sftp_fattr_set_permissions(attr, S_IFLNK | S_IRWXU | S_IRUSR | S_IWUSR);
    445 sftp_fattr_set_uid_gid(attr, sbbs->useron.number, users_gid); 446 sftp_fattr_set_size(attr, flength(path));
    447 time_t fd = fdate(path);
    CID 487161: (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "fd" is cast to "uint32_t".
    448 sftp_fattr_set_times(attr, fd, fd);
    449 return attr;
    450 }
    451
    452 void
    453 remove_trailing_slash(char *str)
    /sftp.cpp: 448 in sshkeys_attrs(sbbs_t *, const char *)()
    442 if (attr == nullptr)
    443 return nullptr;
    444 sftp_fattr_set_permissions(attr, S_IFLNK | S_IRWXU | S_IRUSR | S_IWUSR);
    445 sftp_fattr_set_uid_gid(attr, sbbs->useron.number, users_gid); 446 sftp_fattr_set_size(attr, flength(path));
    447 time_t fd = fdate(path);
    CID 487161: (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "fd" is cast to "uint32_t".
    448 sftp_fattr_set_times(attr, fd, fd);
    449 return attr;
    450 }
    451
    452 void
    453 remove_trailing_slash(char *str)


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu4gdQbQRNsarCbK0jIoVQSWT2zCPijRqaed4AhLiEI9Z7MR9SJQ09ot5XPbn9SW-2F14-3D4ieG_7FYjIqE8olEh4k02KWtt1r1LGSyuXVEtCuKuJCXgAQZz6Lg2xx1dh6E9z4lSXKW4n9yiZaua5LbXznpVF4MIwbp178psQJ2n-2Fpok7ErzI9IlNJTrPj-2F83NUNTOEjSUjSMYrpz0XVq0IKvzP47fjT8ZUoPS4k4FQsPlqiTS940mDZqL8H0V26aTBOs1jlgpdGUT2g7d1Ei-2FiSNIWvXxdCeA-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Friday, March 01, 2024 13:43: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 487600: Error handling issues (CHECKED_RETURN)
    /sftp.cpp: 1625 in sftp_readdir(sftp_string *, void *)()


    ________________________________________________________________________________________________________
    *** CID 487600: Error handling issues (CHECKED_RETURN)
    /sftp.cpp: 1625 in sftp_readdir(sftp_string *, void *)()
    1619 free(link);
    1620 if (lname == nullptr) {
    1621 sftp_fattr_free(attr);
    1622 return sftps_send_error(sbbs->sftp_state, SSH_FX_FAILURE, "Longname allocation failure");
    1623 }
    1624 vpath = getfname(tmppath);
    CID 487600: Error handling issues (CHECKED_RETURN)
    Calling "add_name" without checking return value (as is done elsewhere 4 out of 5 times).
    1625 fn.add_name(strdup(vpath), lname, attr);
    1626 }
    1627 }
    1628 else {
    1629 if (dd->info.filebase.lib == -1) {
    1630 // /files/ (ie: list of libs)


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu4gdQbQRNsarCbK0jIoVQSWT2zCPijRqaed4AhLiEI9Z7MR9SJQ09ot5XPbn9SW-2F14-3D_Mv9_7FYjIqE8olEh4k02KWtt1r1LGSyuXVEtCuKuJCXgAQZAvea4qFQBhPrjKB4cHy2kAbmKz1-2F0ttbXdmTqhC-2BEq7-2Bvgywi6EN0yh9ZWlpucVXNfv4OAgSDch06A-2FyZfKQuykxNA3ygHnLLNJZ-2FPbpNGcgiztSzdmC0nW0gtMv3miUCmrLhEqR-2FOP8z9BsqWg6i-2B8KyEK4CuE0E7PMo9TUvnw-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Sunday, March 03, 2024 13:41:26
    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 487672: Null pointer dereferences (NULL_RETURNS) /tmp/sbbs-Mar-03-2024/src/xpdev/datewrap.c: 36 in checktime()


    ________________________________________________________________________________________________________
    *** CID 487672: Null pointer dereferences (NULL_RETURNS) /tmp/sbbs-Mar-03-2024/src/xpdev/datewrap.c: 36 in checktime()
    30 struct tm gmt;
    31 struct tm tm;
    32
    33 memset(&tm,0,sizeof(tm));
    34 tm.tm_year=94;
    35 tm.tm_mday=1;
    CID 487672: Null pointer dereferences (NULL_RETURNS)
    Dereferencing a pointer that might be "NULL" "gmtime_r(&t, &gmt)" when calling "mktime".
    36 return mktime(&tm) - mktime(gmtime_r(&t,&gmt));
    37 }
    38
    39 /* Compensates for struct tm "weirdness" */
    40 time_t sane_mktime(struct tm* tm)
    41 {


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu4gdQbQRNsarCbK0jIoVQSWT2zCPijRqaed4AhLiEI9Z7MR9SJQ09ot5XPbn9SW-2F14-3D-9vV_7FYjIqE8olEh4k02KWtt1r1LGSyuXVEtCuKuJCXgAQbdS62iBETJxCjfqof1M6S95WSy-2FViK1FGVTyAQx6ozqlGvN9awUs6gtEF2eXLxZfTJjLLUyT0fwRFvEc99-2BOQhjAl2O2TUGD1ycgVDsPOsObe7L7LzV-2FFPKXyVz9z9YuZdACZlhk3hv8V4jfGont8ig4eUY-2FGqtqgGqZWYwmWkLQ-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Tuesday, March 19, 2024 13:22:45
    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 488122: Concurrent data access violations (MISSING_LOCK)
    /websrvr.c: 6243 in respond()


    ________________________________________________________________________________________________________
    *** CID 488122: Concurrent data access violations (MISSING_LOCK)
    /websrvr.c: 6243 in respond()
    6237 ,session->socket, session->client.protocol, session->client.addr, session->req.physical_path
    6238 ,session->req.range_start,session->req.range_end, content_length);
    6239 else
    6240 lprintf(LOG_INFO,"%04d %s [%s] Sending file: %s (%"PRIdOFF" bytes)"
    6241 ,session->socket, session->client.protocol, session->client.addr, session->req.physical_path, content_length);
    6242 snt=sock_sendfile(session,session->req.physical_path,session->req.range_start,session->req.range_end);
    CID 488122: Concurrent data access violations (MISSING_LOCK)
    Accessing "session->send_failed" without holding lock "http_session_t.outbuf_write". Elsewhere, "http_session_t.send_failed" is written to with "http_session_t.outbuf_write" held 1 out of 1 times.
    6243 if(!session->send_failed) {
    6244 if(session->req.ld!=NULL) {
    6245 if(snt<0)
    6246 snt=0;
    6247 session->req.ld->size=snt;
    6248 }


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu4gdQbQRNsarCbK0jIoVQSWT2zCPijRqaed4AhLiEI9Z7MR9SJQ09ot5XPbn9SW-2F14-3DmHtV_7FYjIqE8olEh4k02KWtt1r1LGSyuXVEtCuKuJCXgAQbYwk4stqvOulAQyfb9Qz7UqXa-2FyYiLNtJQLdPQNB0BbrubVIHVqt8wbwLmHsBUJon6PC9sbncKQ-2BAxsdRHbzS8LHKyt8nQ5XXM7E400tls6CE8QTOmeO-2BbTPMyH95TYfYCuXcmmWIuH-2F2U7WSDFD5czc7Rvy8hX-2BZbhm7O5DgwmQ-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Saturday, March 23, 2024 12:40:16
    Hi,

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

    5 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 5 of 5 defect(s)


    ** CID 488309: Memory - illegal accesses (STRING_NULL)


    ________________________________________________________________________________________________________
    *** CID 488309: Memory - illegal accesses (STRING_NULL)
    /str.cpp: 344 in sbbs_t::sif(char *, char *, int)()
    338 m+=2;
    339 for(l=m;l<length;l++)
    340 if(buf[l]=='"') {
    341 buf[l]=0;
    342 break;
    343 }
    CID 488309: Memory - illegal accesses (STRING_NULL)
    Passing unterminated string "(char *)buf + m" to "getkeys", which expects a null-terminated string.
    344 answers[a++]=(char)getkeys((char *)buf+m,0);
    345 }
    346 else {
    347 answers[a]=getkey(mode);
    348 outchar(answers[a++]);
    349 attr(LIGHTGRAY);

    ** CID 488308: (STRING_NULL)


    ________________________________________________________________________________________________________
    *** CID 488308: (STRING_NULL)
    /sbbsecho.c: 3666 in getzpt()
    3660 faddr=atofaddr(buf+i+6);
    3661 hdr->destzone=faddr.zone;
    3662 hdr->destnet=faddr.net;
    3663 hdr->destnode=faddr.node;
    3664 i+=6;
    3665 while(buf[i] && buf[i]!=' ') i++;
    CID 488308: (STRING_NULL)
    Passing unterminated string "buf + i + 1" to "atofaddr", which expects a null-terminated string.
    3666 faddr=atofaddr(buf+i+1);
    3667 hdr->origzone=faddr.zone;
    3668 hdr->orignet=faddr.net;
    3669 hdr->orignode=faddr.node;
    3670 intl_found = true;
    3671 }
    /sbbsecho.c: 3660 in getzpt()
    3654 if((!i || cr) && buf[i]==CTRL_A) { /* kludge */ 3655 if(!strncmp(buf+i+1,"TOPT ",5))
    3656 hdr->destpoint=atoi(buf+i+6);
    3657 else if(!strncmp(buf+i+1,"FMPT ",5))
    3658 hdr->origpoint=atoi(buf+i+6);
    3659 else if(!strncmp(buf+i+1,"INTL ",5)) {
    CID 488308: (STRING_NULL)
    Passing unterminated string "buf + i + 6" to "atofaddr", which expects a null-terminated string.
    3660 faddr=atofaddr(buf+i+6);
    3661 hdr->destzone=faddr.zone;
    3662 hdr->destnet=faddr.net;
    3663 hdr->destnode=faddr.node;
    3664 i+=6;
    3665 while(buf[i] && buf[i]!=' ') i++;

    ** CID 488307: Memory - illegal accesses (STRING_NULL)


    ________________________________________________________________________________________________________
    *** CID 488307: Memory - illegal accesses (STRING_NULL) /tmp/sbbs-Mar-23-2024/src/smblib/smblib.c: 1085 in smb_getmsghdr()
    1079 !=(size_t)msg->hfield[i].length) {
    1080 safe_snprintf(smb->last_error,sizeof(smb->last_error)
    1081 ,"%s reading header (#%d) field data (%d bytes)", __FUNCTION__, (int)i, (int)msg->hfield[i].length);
    1082 smb_freemsgmem(msg);
    1083 return(SMB_ERR_READ);
    1084 }
    CID 488307: Memory - illegal accesses (STRING_NULL)
    Passing unterminated string "msg->hfield_dat[i]" to "set_convenience_ptr", which expects a null-terminated string.
    1085 set_convenience_ptr(msg,msg->hfield[i].type,msg->hfield[i].length,msg->hfield_dat[i]);
    1086
    1087 l+=msg->hfield[i].length;
    1088 }
    1089
    1090 /* These convenience pointers must point to something */

    ** CID 488306: (STRING_NULL)
    /sauce.c: 60 in sauce_fread_charinfo()
    /sauce.c: 62 in sauce_fread_charinfo()
    /sauce.c: 59 in sauce_fread_charinfo()
    /sauce.c: 61 in sauce_fread_charinfo()


    ________________________________________________________________________________________________________
    *** CID 488306: (STRING_NULL)
    /sauce.c: 60 in sauce_fread_charinfo()
    54
    55 if(type != NULL)
    56 *type = record.filetype;
    57 if(info != NULL) {
    58 memset(info, 0, sizeof(*info));
    59 SAFECOPY(info->title, record.title); truncsp(info->title);
    CID 488306: (STRING_NULL)
    Passing unterminated string "record.author" to "strlcpy", which expects a null-terminated string. [Note: The source code implementation of the function has been overridden by a builtin model.]
    60 SAFECOPY(info->author, record.author); truncsp(info->author); 61 SAFECOPY(info->group, record.group); truncsp(info->group);
    62 SAFECOPY(info->date, record.date); truncsp(info->date);
    63 info->width = record.tinfo1;
    64 info->height = record.tinfo2;
    65 switch(record.filetype) {
    /sauce.c: 62 in sauce_fread_charinfo()
    56 *type = record.filetype;
    57 if(info != NULL) {
    58 memset(info, 0, sizeof(*info));
    59 SAFECOPY(info->title, record.title); truncsp(info->title);
    60 SAFECOPY(info->author, record.author); truncsp(info->author); 61 SAFECOPY(info->group, record.group); truncsp(info->group);
    CID 488306: (STRING_NULL)
    Passing unterminated string "record.date" to "strlcpy", which expects a null-terminated string. [Note: The source code implementation of the function has been overridden by a builtin model.]
    62 SAFECOPY(info->date, record.date); truncsp(info->date);
    63 info->width = record.tinfo1;
    64 info->height = record.tinfo2;
    65 switch(record.filetype) {
    66 case sauce_char_filetype_ascii:
    67 case sauce_char_filetype_ansi:
    /sauce.c: 59 in sauce_fread_charinfo()
    53 return false;
    54
    55 if(type != NULL)
    56 *type = record.filetype;
    57 if(info != NULL) {
    58 memset(info, 0, sizeof(*info));
    CID 488306: (STRING_NULL)
    Passing unterminated string "record.title" to "strlcpy", which expects a null-terminated string. [Note: The source code implementation of the function has been overridden by a builtin model.]
    59 SAFECOPY(info->title, record.title); truncsp(info->title);
    60 SAFECOPY(info->author, record.author); truncsp(info->author); 61 SAFECOPY(info->group, record.group); truncsp(info->group);
    62 SAFECOPY(info->date, record.date); truncsp(info->date);
    63 info->width = record.tinfo1;
    64 info->height = record.tinfo2;
    /sauce.c: 61 in sauce_fread_charinfo()
    55 if(type != NULL)
    56 *type = record.filetype;
    57 if(info != NULL) {
    58 memset(info, 0, sizeof(*info));
    59 SAFECOPY(info->title, record.title); truncsp(info->title);
    60 SAFECOPY(info->author, record.author); truncsp(info->author); >>> CID 488306: (STRING_NULL)
    Passing unterminated string "record.group" to "strlcpy", which expects a null-terminated string. [Note: The source code implementation of the function has been overridden by a builtin model.]
    61 SAFECOPY(info->group, record.group); truncsp(info->group);
    62 SAFECOPY(info->date, record.date); truncsp(info->date);
    63 info->width = record.tinfo1;
    64 info->height = record.tinfo2;
    65 switch(record.filetype) {
    66 case sauce_char_filetype_ascii:

    ** CID 488305: Memory - corruptions (STRING_OVERFLOW)
    /uedit/uedit.c: 1908 in main()


    ________________________________________________________________________________________________________
    *** CID 488305: Memory - corruptions (STRING_OVERFLOW)
    /uedit/uedit.c: 1908 in main()
    1902
    1903 sbbs_get_ini_fname(ini_file, ctrl_dir);
    1904
    1905 /* Initialize BBS startup structure */
    1906 memset(&bbs_startup,0,sizeof(bbs_startup));
    1907 bbs_startup.size=sizeof(bbs_startup);
    CID 488305: Memory - corruptions (STRING_OVERFLOW)
    You might overrun the 1024-character destination string "bbs_startup.ctrl_dir" by writing 4097 characters from "ctrl_dir".
    1908 strcpy(bbs_startup.ctrl_dir,ctrl_dir);
    1909
    1910 /* Read .ini file here */
    1911 if(ini_file[0]!=0 && (fp=fopen(ini_file,"r"))!=NULL) {
    1912 printf("Reading %s\n",ini_file);
    1913 /* We call this function to set defaults, even if there's no .ini file */


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu4gdQbQRNsarCbK0jIoVQSWT2zCPijRqaed4AhLiEI9Z7MR9SJQ09ot5XPbn9SW-2F14-3DTnRX_7FYjIqE8olEh4k02KWtt1r1LGSyuXVEtCuKuJCXgAQaEw-2F35bzGVOVw-2BfAgK10nKBe2EaCuOVThBtA4zmIf-2FH6jtPrg8CF4KIxfGxqbWYZGzK5dEjEeJjcG-2FZFDV9g6z-2BKMwuy3tSgd6XVj6QkX-2FbE7goOVxulE2g8b9eGhrdwq7nNngW7QJqRO3KLACCgsN-2Bn56lb9VdBetusZbl3sfvQ-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Thursday, August 08, 2024 12:40:34
    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.
    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 2 of 2 defect(s)


    ** CID 508260: Null pointer dereferences (FORWARD_NULL)


    ________________________________________________________________________________________________________
    *** CID 508260: Null pointer dereferences (FORWARD_NULL)
    /js_msgbase.c: 950 in parse_header_object()
    944 msg->hdr.priority=i32;
    945 }
    946
    947 if(JS_GetProperty(cx, hdr, "field_list", &val) && JSVAL_IS_OBJECT(val)) {
    948 array=JSVAL_TO_OBJECT(val);
    949 len=0;
    CID 508260: Null pointer dereferences (FORWARD_NULL)
    Passing null pointer "array" to "JS_GetArrayLength", which dereferences it.
    950 if(array == NULL && !JS_GetArrayLength(cx, array, &len)) {
    951 JS_ReportError(cx, "Invalid \"field_list\" array in header object");
    952 goto err;
    953 }
    954
    955 for(i=0;i<len;i++) {

    ** CID 508259: Control flow issues (DEADCODE)
    /js_internal.c: 491 in js_execfile()


    ________________________________________________________________________________________________________
    *** CID 508259: Control flow issues (DEADCODE)
    /js_internal.c: 491 in js_execfile()
    485 else {
    486 JS_ReportError(cx, "Unable to get parent js."JAVASCRIPT_LOAD_PATH_LIST" array.");
    487 return JS_FALSE;
    488 }
    489 }
    490 else {
    CID 508259: Control flow issues (DEADCODE)
    Execution cannot reach this statement: "JS_ReportError(cx, "Unable ...".
    491 JS_ReportError(cx, "Unable to get parent js object"); 492 return JS_FALSE;
    493 }
    494
    495 js_script=JS_CompileFile(cx, js_scope, path);
    496


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu4gdQbQRNsarCbK0jIoVQSWT2zCPijRqaed4AhLiEI9Z7MR9SJQ09ot5XPbn9SW-2F14-3D20ER_7FYjIqE8olEh4k02KWtt1r1LGSyuXVEtCuKuJCXgAQZSUgE3dQnVG6wGylJBHlsQHMU-2FeSvlPG-2BveassRKfh2KZ3KQqZYMDLXz99-2FrWMwJQ1T1J2N-2BE4YP3SycyU5tkbW6rwM2zqlUIvWZrfgy3l7iQ0Im12Z6xa2F5EX6ZCGf29mh7eZnuIJTmQCiel8IOekKUKQgh0LXaZSb3gnPQHBw-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Saturday, August 10, 2024 12:40:35
    Hi,

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

    6 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 6 of 6 defect(s)


    ** CID 508288: (STRING_NULL)
    /telgate.cpp: 387 in sbbs_t::telnet_gate(char *, unsigned int, unsigned int, char **, char *, char *, char *)()
    /telgate.cpp: 387 in sbbs_t::telnet_gate(char *, unsigned int, unsigned int, char **, char *, char *, char *)()


    ________________________________________________________________________________________________________
    *** CID 508288: (STRING_NULL)
    /telgate.cpp: 387 in sbbs_t::telnet_gate(char *, unsigned int, unsigned int, char **, char *, char *, char *)()
    381 l=K_CHAT;
    382 if(!(mode&TG_ECHO))
    383 l|=K_NOECHO;
    384 rd=getstr((char*)buf,sizeof(buf)-1,l);
    385 if(!rd)
    386 continue;
    CID 508288: (STRING_NULL)
    Passing unterminated string "buf" to "strlen", which expects a null-terminated string.
    387 SAFECAT(buf,crlf);
    388 rd+=2;
    389 gotline=true;
    390 }
    391 if((mode&TG_CRLF) && buf[rd-1]=='\r') 392 buf[rd++]='\n';
    /telgate.cpp: 387 in sbbs_t::telnet_gate(char *, unsigned int, unsigned int, char **, char *, char *, char *)()
    381 l=K_CHAT;
    382 if(!(mode&TG_ECHO))
    383 l|=K_NOECHO;
    384 rd=getstr((char*)buf,sizeof(buf)-1,l);
    385 if(!rd)
    386 continue;
    CID 508288: (STRING_NULL)
    Passing unterminated string "buf" to "strlen", which expects a null-terminated string.
    387 SAFECAT(buf,crlf);
    388 rd+=2;
    389 gotline=true;
    390 }
    391 if((mode&TG_CRLF) && buf[rd-1]=='\r') 392 buf[rd++]='\n';

    ** CID 508287: Resource leaks (RESOURCE_LEAK)
    /js_bbs.cpp: 3127 in js_rlogin_gate(JSContext *, unsigned int, unsigned long *)()


    ________________________________________________________________________________________________________
    *** CID 508287: Resource leaks (RESOURCE_LEAK)
    /js_bbs.cpp: 3127 in js_rlogin_gate(JSContext *, unsigned int, unsigned long *)()
    3121 size_t tmplen = 0;
    3122 for(jsuint i = 0; i < count; ++i) { 3123 jsval val;
    3124 if(!JS_GetElement(cx, array, i, &val))
    3125 break;
    3126 JSVALUE_TO_RASTRING(cx, val, tmp, &tmplen, NULL);
    CID 508287: Resource leaks (RESOURCE_LEAK)
    Variable "server_user_name" going out of scope leaks the storage it points to.
    3127 HANDLE_PENDING(cx, tmp);
    3128 strListPush(&send_strings, tmp);
    3129 }
    3130 free(tmp);
    3131 }
    3132 }

    ** CID 508286: Resource leaks (RESOURCE_LEAK)
    /js_bbs.cpp: 3127 in js_rlogin_gate(JSContext *, unsigned int, unsigned long *)()


    ________________________________________________________________________________________________________
    *** CID 508286: Resource leaks (RESOURCE_LEAK)
    /js_bbs.cpp: 3127 in js_rlogin_gate(JSContext *, unsigned int, unsigned long *)()
    3121 size_t tmplen = 0;
    3122 for(jsuint i = 0; i < count; ++i) { 3123 jsval val;
    3124 if(!JS_GetElement(cx, array, i, &val))
    3125 break;
    3126 JSVALUE_TO_RASTRING(cx, val, tmp, &tmplen, NULL);
    CID 508286: Resource leaks (RESOURCE_LEAK)
    Variable "addr" going out of scope leaks the storage it points to.
    3127 HANDLE_PENDING(cx, tmp);
    3128 strListPush(&send_strings, tmp);
    3129 }
    3130 free(tmp);
    3131 }
    3132 }

    ** CID 508285: Resource leaks (RESOURCE_LEAK)
    /js_bbs.cpp: 3127 in js_rlogin_gate(JSContext *, unsigned int, unsigned long *)()


    ________________________________________________________________________________________________________
    *** CID 508285: Resource leaks (RESOURCE_LEAK)
    /js_bbs.cpp: 3127 in js_rlogin_gate(JSContext *, unsigned int, unsigned long *)()
    3121 size_t tmplen = 0;
    3122 for(jsuint i = 0; i < count; ++i) { 3123 jsval val;
    3124 if(!JS_GetElement(cx, array, i, &val))
    3125 break;
    3126 JSVALUE_TO_RASTRING(cx, val, tmp, &tmplen, NULL);
    CID 508285: Resource leaks (RESOURCE_LEAK)
    Variable "term_type" going out of scope leaks the storage it points to. 3127 HANDLE_PENDING(cx, tmp);
    3128 strListPush(&send_strings, tmp);
    3129 }
    3130 free(tmp);
    3131 }
    3132 }

    ** CID 508284: Resource leaks (RESOURCE_LEAK)
    /js_bbs.cpp: 3041 in js_telnet_gate(JSContext *, unsigned int, unsigned long *)()


    ________________________________________________________________________________________________________
    *** CID 508284: Resource leaks (RESOURCE_LEAK)
    /js_bbs.cpp: 3041 in js_telnet_gate(JSContext *, unsigned int, unsigned long *)()
    3035 size_t tmplen = 0;
    3036 for(jsuint i = 0; i < count; ++i) {
    3037 jsval val;
    3038 if(!JS_GetElement(cx, array, i, &val)) 3039 break;
    3040 JSVALUE_TO_RASTRING(cx, val, tmp, &tmplen, NULL);
    CID 508284: Resource leaks (RESOURCE_LEAK)
    Variable "addr" going out of scope leaks the storage it points to.
    3041 HANDLE_PENDING(cx, tmp);
    3042 strListPush(&send_strings, tmp);
    3043 }
    3044 free(tmp);
    3045 ++argn;
    3046 }

    ** CID 508283: Resource leaks (RESOURCE_LEAK)
    /js_bbs.cpp: 3127 in js_rlogin_gate(JSContext *, unsigned int, unsigned long *)()


    ________________________________________________________________________________________________________
    *** CID 508283: Resource leaks (RESOURCE_LEAK)
    /js_bbs.cpp: 3127 in js_rlogin_gate(JSContext *, unsigned int, unsigned long *)()
    3121 size_t tmplen = 0;
    3122 for(jsuint i = 0; i < count; ++i) { 3123 jsval val;
    3124 if(!JS_GetElement(cx, array, i, &val))
    3125 break;
    3126 JSVALUE_TO_RASTRING(cx, val, tmp, &tmplen, NULL);
    CID 508283: Resource leaks (RESOURCE_LEAK)
    Variable "client_user_name" going out of scope leaks the storage it points to.
    3127 HANDLE_PENDING(cx, tmp);
    3128 strListPush(&send_strings, tmp);
    3129 }
    3130 free(tmp);
    3131 }
    3132 }


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu4gdQbQRNsarCbK0jIoVQSWT2zCPijRqaed4AhLiEI9Z7MR9SJQ09ot5XPbn9SW-2F14-3Dbu0M_7FYjIqE8olEh4k02KWtt1r1LGSyuXVEtCuKuJCXgAQZNG0uf3i6p71oTc15oH-2BfpO28bQfsz9QVBH3Gtyw7JI9gEMaDnmdnDolPrFN6u9WaZmPVFWjRjCPjNCgu0p853ViRUnY3jw7qF-2FmF-2FRD-2BDN3Me1aa8H00Bk6GPSZ1Hw1-2FmiCWeADspXOcpcxao-2F3gS8JgnOAEga0TIePnt023yjQ-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Saturday, September 14, 2024 12:40:31
    Hi,

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

    5 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 5 of 5 defect(s)


    ** CID 509555: Null pointer dereferences (FORWARD_NULL)
    /js_filebase.c: 1307 in js_update_file()


    ________________________________________________________________________________________________________
    *** CID 509555: Null pointer dereferences (FORWARD_NULL)
    /js_filebase.c: 1307 in js_update_file()
    1301 char* extdesc = NULL;
    1302 char* auxdata = NULL;
    1303 rc=JS_SUSPENDREQUEST(cx);
    1304 if(filename != NULL && fileobj != NULL
    1305 && (p->smb_result = smb_loadfile(&p->smb, filename, &file, file_detail_extdesc)) == SMB_SUCCESS) {
    1306 p->smb_result = parse_file_properties(cx, fileobj, &file, &extdesc, &auxdata);
    CID 509555: Null pointer dereferences (FORWARD_NULL)
    Passing null pointer "file.name" to "strcmp", which dereferences it. 1307 if(p->smb_result == SMB_SUCCESS
    1308 && strcmp(filename, file.name) != 0 && smb_findfile(&p->smb, file.name, NULL) == SMB_SUCCESS) {
    1309 JS_ReportError(cx, "file (%s) already exists in base", file.name);
    1310 p->smb_result = SMB_DUPE_MSG;
    1311 }
    1312 if(p->smb_result == SMB_SUCCESS

    ** CID 509554: Memory - illegal accesses (STRING_NULL)
    /smbutil.c: 633 in dumpindex()


    ________________________________________________________________________________________________________
    *** CID 509554: Memory - illegal accesses (STRING_NULL)
    /smbutil.c: 633 in dumpindex()
    627 ,xpDate_to_isoDateStr(time_to_xpDate(idx.time), "-", tmp, sizeof(tmp)));
    628 if(smb_msg_type(idx.attr) == SMB_MSG_TYPE_FILE && idxreclen == sizeof(fileidxrec_t)) {
    629 fileidxrec_t fidx;
    630 fseek(smb.sid_fp,((start-1L) + l) * idxreclen,SEEK_SET);
    631 if(!fread(&fidx,sizeof(fidx),1,smb.sid_fp))
    632 break;
    CID 509554: Memory - illegal accesses (STRING_NULL)
    Passing unterminated string "fidx.name" to "printf", which expects a null-terminated string. [Note: The source code implementation of the function has been overridden by a builtin model.]
    633 printf(" %02X %.*s", fidx.hash.flags, (int)sizeof(fidx.name), fidx.name);
    634 }
    635 printf("\n");
    636 l++;
    637 }
    638 }

    ** CID 509553: Control flow issues (NESTING_INDENT_MISMATCH)
    /js_filebase.c: 1335 in js_update_file()


    ________________________________________________________________________________________________________
    *** CID 509553: Control flow issues (NESTING_INDENT_MISMATCH)
    /js_filebase.c: 1335 in js_update_file()
    1329 } else {
    1330 if(file.extdesc != NULL)
    1331 truncsp(file.extdesc);
    1332 if(!readd_always && strcmp(extdesc ? extdesc : "", file.extdesc ? file.extdesc : "") == 0
    1333 && strcmp(auxdata ? auxdata : "", file.auxdata ? file.auxdata : "") == 0)
    1334 p->smb_result = smb_putfile(&p->smb, &file);
    CID 509553: Control flow issues (NESTING_INDENT_MISMATCH)
    This 'if' statement is indented to column 41, as if it were nested within the preceding parent statement, but it is not.
    1335 if(p->smb_result != SMB_SUCCESS)
    1336 JS_ReportError(cx, "%d writing '%s'", p->smb_result, file.name);
    1337 else {
    1338 if((p->smb_result = smb_removefile_by_name(&p->smb, filename)) == SMB_SUCCESS) {
    1339 if(readd_always)
    1340 file.hdr.when_imported.time = 0; // we want the file to appear as "new"

    ** CID 509552: Memory - illegal accesses (STRING_NULL) /tmp/sbbs-Sep-14-2024/src/smblib/smbfile.c: 244 in smb_findfile()


    ________________________________________________________________________________________________________
    *** CID 509552: Memory - illegal accesses (STRING_NULL) /tmp/sbbs-Sep-14-2024/src/smblib/smbfile.c: 244 in smb_findfile()
    238 if(smb_fread(smb, &fidx, sizeof(fidx), smb->sid_fp) != sizeof(fidx))
    239 break;
    240
    241 f->idx_offset = offset++;
    242
    243 if(filename != NULL) {
    CID 509552: Memory - illegal accesses (STRING_NULL)
    Passing unterminated string "fidx.name" to "strcasecmp", which expects a null-terminated string.
    244 if(stricmp(fidx.name, fname) != 0)
    245 continue;
    246 f->file_idx = fidx;
    247 return SMB_SUCCESS;
    248 }
    249

    ** CID 509551: Memory - illegal accesses (STRING_NULL) /tmp/sbbs-Sep-14-2024/src/smblib/smbfile.c: 441 in smb_removefile()


    ________________________________________________________________________________________________________
    *** CID 509551: Memory - illegal accesses (STRING_NULL) /tmp/sbbs-Sep-14-2024/src/smblib/smbfile.c: 441 in smb_removefile()
    435 free(fidx);
    436 smb_unlocksmbhdr(smb);
    437 return SMB_ERR_READ;
    438 }
    439 rewind(smb->sid_fp);
    440 for(uint32_t i = 0; i < smb->status.total_files; i++) { >>> CID 509551: Memory - illegal accesses (STRING_NULL)
    Passing unterminated string "fidx[i].name" to "strcasecmp", which expects a null-terminated string.
    441 if(stricmp(fidx[i].name, fname) == 0) {
    442 removed++;
    443 continue;
    444 }
    445 if(fwrite(fidx + i, sizeof(*fidx), 1, smb->sid_fp) != 1) {
    446 safe_snprintf(smb->last_error, sizeof(smb->last_error), "%s re-writing index"


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu4gdQbQRNsarCbK0jIoVQSWT2zCPijRqaed4AhLiEI9Z7MR9SJQ09ot5XPbn9SW-2F14-3DpoPN_7FYjIqE8olEh4k02KWtt1r1LGSyuXVEtCuKuJCXgAQZXJOgCi8IFr2wp43pRrORx9tzLYjX2Y-2FSYnzacVgdrC5ToyfEd02kRU0czfft4zgHvFTf4l2icBGvZtBDP8972Z-2BLrNSb7QqVDHjYiK23CNzZR9MLbzXh1WOITpsswqNS5z337vFuU-2BJOMvO3veuWFvtJ3Xwk9mN-2FsudyolEK5nw-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Sunday, September 22, 2024 12:43:45
    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.
    17 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 509721: Resource leaks (RESOURCE_LEAK)
    /scfg/scfgmsg.c: 139 in import_msg_areas()


    ________________________________________________________________________________________________________
    *** CID 509721: Resource leaks (RESOURCE_LEAK)
    /scfg/scfgmsg.c: 139 in import_msg_areas()
    133 new_sub_misc = SUB_FIDO;
    134 ini = iniReadFile(stream);
    135 if(ini == NULL)
    136 return 0;
    137 list = iniGetSectionList(ini, /* prefix: */NULL);
    138 if(list == NULL)
    CID 509721: Resource leaks (RESOURCE_LEAK)
    Variable "ini" going out of scope leaks the storage it points to.
    139 return 0;
    140 break;
    141 default: // EchoLists (e.g. BACKBONE.NA, badareas.lst) and AREAS.BBS
    142 new_sub_misc = SUB_FIDO;
    143 break;
    144 }

    ** CID 509720: (RESOURCE_LEAK)
    /logon.cpp: 670 in sbbs_t::logonstats()()
    /logon.cpp: 676 in sbbs_t::logonstats()()
    /logon.cpp: 649 in sbbs_t::logonstats()()
    /logon.cpp: 673 in sbbs_t::logonstats()()
    /logon.cpp: 682 in sbbs_t::logonstats()()


    ________________________________________________________________________________________________________
    *** CID 509720: (RESOURCE_LEAK)
    /logon.cpp: 670 in sbbs_t::logonstats()()
    664 }
    665 fclose_dstats(dsts);
    666 }
    667 }
    668
    669 if(cfg.node_num==0) /* called from event_thread() */
    CID 509720: (RESOURCE_LEAK)
    Variable "csts" going out of scope leaks the storage it points to.
    670 return(0);
    671
    672 if(thisnode.status==NODE_QUIET) /* Quiet users aren't counted */
    673 return(0);
    674
    675 if(REALSYSOP && !(cfg.sys_misc&SM_SYSSTAT))
    /logon.cpp: 676 in sbbs_t::logonstats()()
    670 return(0);
    671
    672 if(thisnode.status==NODE_QUIET) /* Quiet users aren't counted */
    673 return(0);
    674
    675 if(REALSYSOP && !(cfg.sys_misc&SM_SYSSTAT))
    CID 509720: (RESOURCE_LEAK)
    Variable "csts" going out of scope leaks the storage it points to.
    676 return(0);
    677
    678 for(i=0;i<2;i++) {
    679 FILE* fp = fopen_dstats(&cfg, i ? 0 : cfg.node_num, /* for_write: */TRUE);
    680 if(fp == NULL) {
    681 errormsg(WHERE, ERR_OPEN, "dsts.ini", i); /logon.cpp: 649 in sbbs_t::logonstats()()
    643 node.misc|=NODE_EVENT;
    644 putnodedat(i,&node);
    645 }
    646 if((dsts = fopen_dstats(&cfg, i, /* for_write: */TRUE)) == NULL) /* doesn't have stats yet */
    647 continue;
    648
    CID 509720: (RESOURCE_LEAK)
    Overwriting "csts" in "csts = fopen_cstats(&this->cfg, i, true)" leaks the storage that "csts" points to.
    649 if((csts = fopen_cstats(&cfg, i, /* for_write: */TRUE)) == NULL) {
    650 fclose_dstats(dsts);
    651 errormsg(WHERE, ERR_OPEN, "csts.tab", i);
    652 continue;
    653 }
    654
    /logon.cpp: 673 in sbbs_t::logonstats()()
    667 }
    668
    669 if(cfg.node_num==0) /* called from event_thread() */
    670 return(0);
    671
    672 if(thisnode.status==NODE_QUIET) /* Quiet users aren't counted */
    CID 509720: (RESOURCE_LEAK)
    Variable "csts" going out of scope leaks the storage it points to.
    673 return(0);
    674
    675 if(REALSYSOP && !(cfg.sys_misc&SM_SYSSTAT))
    676 return(0);
    677
    678 for(i=0;i<2;i++) {
    /logon.cpp: 682 in sbbs_t::logonstats()()
    676 return(0);
    677
    678 for(i=0;i<2;i++) {
    679 FILE* fp = fopen_dstats(&cfg, i ? 0 : cfg.node_num, /* for_write: */TRUE);
    680 if(fp == NULL) {
    681 errormsg(WHERE, ERR_OPEN, "dsts.ini", i);
    CID 509720: (RESOURCE_LEAK)
    Variable "csts" going out of scope leaks the storage it points to.
    682 return(0L);
    683 }
    684 if(!fread_dstats(fp, &stats)) {
    685 errormsg(WHERE, ERR_READ, "dsts.ini", i);
    686 } else {
    687 stats.today.logons++;


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu4gdQbQRNsarCbK0jIoVQSWT2zCPijRqaed4AhLiEI9Z7MR9SJQ09ot5XPbn9SW-2F14-3D1BBg_7FYjIqE8olEh4k02KWtt1r1LGSyuXVEtCuKuJCXgAQYPIsZP1mUIcYDXV-2BIKqJmrVInqiYU6VTjqKrshCKgIaqKtr35-2BruWgG1P-2Bg0yB-2BuAgsL8JZmDQBzw15bXNroJeqqVZoqg0VkgzqvypQVJBEoWQ3SQD0dE3jrBkw3Qa7Rc5CMTgkEjMauyB8RHdROWl9YGmjuyI0AjbW-2Fmd2yoJLA-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to cov-scan@synchro.net on Saturday, October 12, 2024 12:41: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.
    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 510624: High impact quality (Y2K38_SAFETY)
    /upload.cpp: 361 in sbbs_t::upload(int, const char *)()


    ________________________________________________________________________________________________________
    *** CID 510624: High impact quality (Y2K38_SAFETY)
    /upload.cpp: 361 in sbbs_t::upload(int, const char *)()
    355 SAFEPRINTF(descbeg,text[Rated],toupper(ch));
    356 }
    357 if(cfg.dir[dirnum]->misc&DIR_ULDATE) {
    358 now=time(NULL);
    359 if(descbeg[0])
    360 strcat(descbeg," ");
    CID 510624: High impact quality (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "this->now" is cast to "time32_t".
    361 SAFEPRINTF(str,"%s ",unixtodstr(&cfg,(time32_t)now,tmp));
    362 strcat(descbeg,str);
    363 }
    364 if(cfg.dir[dirnum]->misc&DIR_MULT) {
    365 sync();
    366 if(!noyes(text[MultipleDiskQ])) {


    ________________________________________________________________________________________________________
    To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu4gdQbQRNsarCbK0jIoVQSWT2zCPijRqaed4AhLiEI9Z7MR9SJQ09ot5XPbn9SW-2F14-3DIddI_7FYjIqE8olEh4k02KWtt1r1LGSyuXVEtCuKuJCXgAQYB81ZvyCqI0cAJ-2FU5ubhxKf4JbTpohfwGahN-2FqiJqEJS3JKhfKJrRClFb390j-2Bf3IyHjOgp4TSp0v4WjJhOyS2xAdq9DkOONT15FqaUuN3dwPvrgxJQAm5MhfGSzyQr2ebowkrz6Mx39u7LNSgoa0vxPkqTzBlpznq59pGc5zgjQ-3D-3D



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to All on Monday, March 10, 2025 15:09:45
    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 544155: Error handling issues (CHECKED_RETURN)
    /ssl.c: 540 in get_ssl_cert()


    ________________________________________________________________________________________________________
    *** CID 544155: Error handling issues (CHECKED_RETURN)
    /ssl.c: 540 in get_ssl_cert()
    534 size_t backoff_ms = 1;
    535 unsigned loops = 0;
    536 while (cert_entry->cert == -1) {
    537 assert_pthread_mutex_lock(&get_ssl_cert_mutex);
    538 /* Get the certificate... first try loading it from a file... */
    539 if (cryptStatusOK(cryptKeysetOpen(&ssl_keyset, CRYPT_UNUSED, CRYPT_KEYSET_FILE, cert_path, CRYPT_KEYOPT_READONLY))) {
    CID 544155: Error handling issues (CHECKED_RETURN)
    Calling "log_cryptlib_error" without checking return value (as is done elsewhere 16 out of 17 times).
    540 DO("getting private key", ssl_keyset, cryptGetPrivateKey(ssl_keyset, &cert_entry->cert, CRYPT_KEYID_NAME, "ssl_cert", cfg->sys_pass));
    541 cryptKeysetClose(ssl_keyset);
    542 }
    543 if (cert_entry->cert == -1) {
    544 lprintf(LOG_WARNING, "Failed to open/read TLS certificate: %s", cert_path);
    545 if (cfg->create_self_signed_cert) {


    ________________________________________________________________________________________________________
    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 Sunday, March 30, 2025 13:06:10
    Hi,

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

    5 new defect(s) introduced to Synchronet found with Coverity Scan.
    6 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 5 of 5 defect(s)


    ** CID 548252: Error handling issues (NEGATIVE_RETURNS)
    /writemsg.cpp: 709 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()


    ________________________________________________________________________________________________________
    *** CID 548252: Error handling issues (NEGATIVE_RETURNS)
    /writemsg.cpp: 709 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()
    703 buf[0] = 0;
    704 if (linesquoted || draft_restored) {
    705 if ((file = nopen(msgtmp, O_RDONLY)) != -1) { 706 length = (long)filelength(file);
    707 l = length > (int)(cfg.level_linespermsg[useron_level] * MAX_LINE_LEN) - 1
    708 ? (cfg.level_linespermsg[useron_level] * MAX_LINE_LEN) - 1 : length;
    CID 548252: Error handling issues (NEGATIVE_RETURNS)
    "l" is passed to a parameter that cannot be negative. [Note: The source code implementation of the function has been overridden by a builtin model.]
    709 if (read(file, buf, l) != l)
    710 l = 0;
    711 buf[l] = 0;
    712 close(file);
    713 // remove(msgtmp);
    714 }

    ** CID 548251: Incorrect expression (SIZEOF_MISMATCH)
    /xtrn.cpp: 1621 in sbbs_t::external(const char *, int, const char *)()


    ________________________________________________________________________________________________________
    *** CID 548251: Incorrect expression (SIZEOF_MISMATCH)
    /xtrn.cpp: 1621 in sbbs_t::external(const char *, int, const char *)()
    1615 return -1;
    1616 }
    1617
    1618 if ((mode & EX_STDIO) == EX_STDIO) {
    1619 struct winsize winsize;
    1620 struct termios termio;
    CID 548251: Incorrect expression (SIZEOF_MISMATCH)
    Passing argument "&termio" of type "termios *" and argument "8UL" ("sizeof (this->term)") to function "memset" is suspicious because "sizeof (termios) /*60*/" is expected.
    1621 memset(&termio, 0, sizeof(term));
    1622 cfsetispeed(&termio, B19200);
    1623 cfsetospeed(&termio, B19200);
    1624 if (mode & EX_BIN)
    1625 cfmakeraw(&termio);
    1626 else {

    ** CID 548250: Control flow issues (NO_EFFECT)
    /terminal.cpp: 31 in Terminal::scroll_hotspots(unsigned int)()


    ________________________________________________________________________________________________________
    *** CID 548250: Control flow issues (NO_EFFECT)
    /terminal.cpp: 31 in Terminal::scroll_hotspots(unsigned int)()
    25 unsigned spots = 0;
    26 unsigned remain = 0;
    27 for (list_node_t* node = mouse_hotspots->first; node != NULL; node = node->next) {
    28 struct mouse_hotspot* spot = (struct mouse_hotspot*)node->data; 29 spot->y -= count;
    30 spots++;
    CID 548250: Control flow issues (NO_EFFECT)
    This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "spot->y >= 0U".
    31 if (spot->y >= 0)
    32 remain++;
    33 }
    34 #ifdef _DEBUG
    35 if (spots)
    36 sbbs->lprintf(LOG_DEBUG, "Scrolled %u mouse hot-spots %u rows (%u remain)", spots, count, remain);

    ** CID 548249: (DEADCODE)
    /useredit.cpp: 89 in sbbs_t::useredit(int)()
    /useredit.cpp: 89 in sbbs_t::useredit(int)()


    ________________________________________________________________________________________________________
    *** CID 548249: (DEADCODE)
    /useredit.cpp: 89 in sbbs_t::useredit(int)()
    83 SAFEPRINTF2(user_pass, "%.*s..", (int)(max_len - 2), user.pass);
    84 bprintf(text[UeditAliasPassword]
    85 , user.alias
    86 , datestr(user.pwmod, tmp)
    87 , (user.level > useron.level || !(cfg.sys_misc & SM_ECHO_PW)) ? "<hidden>" : user_pass
    88 );
    CID 548249: (DEADCODE)
    Execution cannot reach the expression ""XXXXXXXX"" inside this statement: "this->bprintf(this->text[Ue...".
    89 bprintf(text[UeditRealNamePhone]
    90 , user.level > useron.level && console & CON_R_ECHO
    91 ? "XXXXXXXX" : user.name
    92 , user.level > useron.level && console & CON_R_ECHO
    93 ? "XXX-XXX-XXXX" : user.phone);
    94 bprintf(text[UeditAddressBirthday]
    /useredit.cpp: 89 in sbbs_t::useredit(int)()
    83 SAFEPRINTF2(user_pass, "%.*s..", (int)(max_len - 2), user.pass);
    84 bprintf(text[UeditAliasPassword]
    85 , user.alias
    86 , datestr(user.pwmod, tmp)
    87 , (user.level > useron.level || !(cfg.sys_misc & SM_ECHO_PW)) ? "<hidden>" : user_pass
    88 );
    CID 548249: (DEADCODE)
    Execution cannot reach the expression ""XXX-XXX-XXXX"" inside this statement: "this->bprintf(this->text[Ue...".
    89 bprintf(text[UeditRealNamePhone]
    90 , user.level > useron.level && console & CON_R_ECHO
    91 ? "XXXXXXXX" : user.name
    92 , user.level > useron.level && console & CON_R_ECHO
    93 ? "XXX-XXX-XXXX" : user.phone);
    94 bprintf(text[UeditAddressBirthday]

    ** CID 548248: Error handling issues (CHECKED_RETURN)
    /writemsg.cpp: 1836 in sbbs_t::movemsg(smbmsg_t *, int)()


    ________________________________________________________________________________________________________
    *** CID 548248: Error handling issues (CHECKED_RETURN)
    /writemsg.cpp: 1836 in sbbs_t::movemsg(smbmsg_t *, int)()
    1830 length = smb_getmsgdatlen(msg);
    1831 if ((buf = (char *)malloc(length)) == NULL) {
    1832 errormsg(WHERE, ERR_ALLOC, smb.file, length);
    1833 return false;
    1834 }
    1835
    CID 548248: Error handling issues (CHECKED_RETURN)
    Calling "fseek(this->smb.sdt_fp, msg->hdr.offset, 0)" without checking return value. This library function may fail and return an error code.
    1836 fseek(smb.sdt_fp, msg->hdr.offset, SEEK_SET);
    1837 if (fread(buf, length, 1, smb.sdt_fp) != 1) {
    1838 free(buf);
    1839 errormsg(WHERE, ERR_READ, smb.file, length);
    1840 return false;
    1841 }


    ________________________________________________________________________________________________________
    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 Saturday, April 05, 2025 12:46:11
    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 548912: Data race undermines locking (LOCK_EVASION)
    /answer.cpp: 437 in sbbs_t::answer(bool *)()


    ________________________________________________________________________________________________________
    *** CID 548912: Data race undermines locking (LOCK_EVASION)
    /answer.cpp: 437 in sbbs_t::answer(bool *)()
    431 activate_ssh = init_sftp(cid);
    432 term->cols = 0;
    433 term->rows = 0;
    434 SAFECOPY(terminal, "sftp");
    435 mouse_mode = MOUSE_MODE_OFF;
    436 autoterm = 0;
    CID 548912: Data race undermines locking (LOCK_EVASION)
    Thread1 sets "sys_status" to a new value. Now the two threads have an inconsistent view of "sys_status" and updates to fields correlated with "sys_status" may be lost.
    437 sys_status |= SS_USERON;
    438 SAFECOPY(client.protocol, "SFTP");
    439 SAFECOPY(client.user, useron.alias);
    440 client.usernum = useron.number;
    441 client_on(client_socket, &client, /* update: */ TRUE);
    442 SAFECOPY(connection, client.protocol);


    ________________________________________________________________________________________________________
    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 Friday, April 11, 2025 15:36:53
    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 549016: Integer handling issues (INTEGER_OVERFLOW)
    /str.cpp: 1194 in sbbs_t::spy(unsigned int)()


    ________________________________________________________________________________________________________
    *** CID 549016: Integer handling issues (INTEGER_OVERFLOW)
    /str.cpp: 1194 in sbbs_t::spy(unsigned int)()
    1188 && !msgabort()) {
    1189 in = incom(1000);
    1190 if (in == NOINP) {
    1191 gettimeleft();
    1192 continue;
    1193 }
    CID 549016: Integer handling issues (INTEGER_OVERFLOW)
    Expression "ch", where "in" is known to be equal to 256, overflows the type of "ch", which is type "char".
    1194 ch = in;
    1195 if (ch == ESC) {
    1196 if (ansi_len)
    1197 ansi_len = 0;
    1198 else {
    1199 if ((in = incom(500)) != NOINP) {

    ** CID 549015: Uninitialized variables (UNINIT)


    ________________________________________________________________________________________________________
    *** CID 549015: Uninitialized variables (UNINIT)
    /js_system.c: 2089 in js_chkpassword()
    2083
    2084 js_system_private_t* sys;
    2085 if ((sys = (js_system_private_t*)js_GetClassPrivate(cx, obj, &js_system_class)) == NULL)
    2086 return JS_FALSE;
    2087
    2088 rc = JS_SUSPENDREQUEST(cx);
    CID 549015: Uninitialized variables (UNINIT)
    Using uninitialized value "*str" when calling "check_pass".
    2089 bool result = check_pass(sys->cfg, str, /* user: */NULL, /* unique: */false, /* reason: */NULL)
    2090 && !trashcan(sys->cfg, str, "password"); 2091 JS_SET_RVAL(cx, arglist, BOOLEAN_TO_JSVAL(result));
    2092 JS_RESUMEREQUEST(cx, rc);
    2093
    2094 return JS_TRUE;


    ________________________________________________________________________________________________________
    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 Tuesday, May 20, 2025 12:44:44
    <!DOCTYPE html>
    <html>
    <head>
    <style>
    body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    }
    .button {
    display: inline-block;
    padding: 10px 20px;
    margin: 20px 0;
    font-size: 16px;
    color: #fff;
    background-color: #007bff;
    text-decoration: none;
    border-radius: 5px;
    }
    .button:hover {
    background-color: #0056b3;
    }
    </style>
    </head>
    <body>
    <p>Hi,</p>

    <p>
    Coverity Scan has identified new defect(s) in the project <strong>Synchronet</strong>.
    </p>

    <h3>Defect Summary:</h3>
    <ul>
    <li><strong>New Defects Found:</strong> 2</li>
    <li><strong>Defects Fixed:</strong> 1</li>
    <li><strong>Defects Displayed:</strong> Showing 2 of 2</li>
    </ul>

    <p>
    To view the full list of defects and take action, click the button below:
    </p>

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

    <p>
    If you have any questions or need assistance, feel free to contact our support team.
    </p>


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


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to All on Saturday, December 27, 2025 13:44:41
    ----==_mimepart_694fe2c8bcbb0_14b1952c2daae15998453b2
    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 640112: (RESOURCE_LEAK)
    /js_bbs.cpp: 1875 in js_logline(JSContext *, unsigned int, unsigned long *)()
    /js_bbs.cpp: 1880 in js_logline(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 640112: (RESOURCE_LEAK)
    /js_bbs.cpp: 1875 in js_logline(JSContext *, unsigned int, unsigned long *)()
    1869
    1870 JSSTRING_TO_MSTRING(cx, js_str, code, NULL);
    1871 if (code == NULL)
    1872 return JS_FALSE;
    1873
    1874 if ((js_str = JS_ValueToString(cx, argv[argn])) == NULL)
    CID 640112: (RESOURCE_LEAK)
    Variable "code" going out of scope leaks the storage it points to.
    1875 return JS_FALSE;
    1876 argn++;
    1877
    1878 JSSTRING_TO_MSTRING(cx, js_str, str, NULL);
    1879 if (str == NULL)
    1880 return JS_FALSE;
    /js_bbs.cpp: 1880 in js_logline(JSContext *, unsigned int, unsigned long *)()
    1874 if ((js_str = JS_ValueToString(cx, argv[argn])) == NULL)
    1875 return JS_FALSE;
    1876 argn++;
    1877
    1878 JSSTRING_TO_MSTRING(cx, js_str, str, NULL);
    1879 if (str == NULL)
    CID 640112: (RESOURCE_LEAK)
    Variable "code" going out of scope leaks the storage it points to.
    1880 return JS_FALSE;
    1881
    1882 rc = JS_SUSPENDREQUEST(cx);
    1883 sbbs->logline(level, code, str);
    1884 free(code);
    1885 free(str);


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


    ----==_mimepart_694fe2c8bcbb0_14b1952c2daae15998453b2
    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 640112: (RESOURCE_LEAK)
    /js_bbs.cpp: 1875 in js_logline(JSContext *, unsigned int, unsigned long *)()
    /js_bbs.cpp: 1880 in js_logline(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 640112: (RESOURCE_LEAK)
    /js_bbs.cpp: 1875 in js_logline(JSContext *, unsigned int, unsigned long *)()
    1869
    1870 JSSTRING_TO_MSTRING(cx, js_str, code, NULL);
    1871 if (code == NULL)
    1872 return JS_FALSE;
    1873
    1874 if ((js_str = JS_ValueToString(cx, argv[argn])) == NULL) &gt;&gt;&gt; CID 640112: (RESOURCE_LEAK)
    &gt;&gt;&gt; Variable &quot;code&quot; going out of scope leaks the storage it points to.
    1875 return JS_FALSE;
    1876 argn++;
    1877
    1878 JSSTRING_TO_MSTRING(cx, js_str, str, NULL);
    1879 if (str == NULL)
    1880 return JS_FALSE;
    /js_bbs.cpp: 1880 in js_logline(JSContext *, unsigned int, unsigned long *)()
    1874 if ((js_str = JS_ValueToString(cx, argv[argn])) == NULL)
    1875 return JS_FALSE;
    1876 argn++;
    1877
    1878 JSSTRING_TO_MSTRING(cx, js_str, str, NULL);
    1879 if (str == NULL)
    &gt;&gt;&gt; CID 640112: (RESOURCE_LEAK)
    &gt;&gt;&gt; Variable &quot;code&quot; going out of scope leaks the storage it points to.
    1880 return JS_FALSE;
    1881
    1882 rc = JS_SUSPENDREQUEST(cx);
    1883 sbbs-&gt;logline(level, code, str);
    1884 free(code);
    1885 free(str);

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


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to All on Wednesday, December 31, 2025 13:45:24
    ----==_mimepart_695528f458f41_188c5a2c2daae1599845314
    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.
    4 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 640333: (NEGATIVE_RETURNS)
    /writemsg.cpp: 463 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()
    /writemsg.cpp: 428 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()
    /writemsg.cpp: 440 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()


    _____________________________________________________________________________________________
    *** CID 640333: (NEGATIVE_RETURNS)
    /writemsg.cpp: 463 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()
    457 while (p) {
    458 if (*p == ',' || *p == ' ')
    459 p++;
    460 i = atoi(p);
    461 if (!i)
    462 break;
    CID 640333: (NEGATIVE_RETURNS)
    "l" is passed to a parameter that cannot be negative.
    463 fseek(stream, l, SEEK_SET);
    464 j = 1;
    465 while (!feof(stream) && !ferror(stream) && j < i) {
    466 if (!fgets(tmp, sizeof(tmp), stream))
    467 break;
    468 j++; /* skip beginning */
    /writemsg.cpp: 428 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()
    422 free(buf);
    423 return false;
    424 }
    425 if (!i && linesquoted)
    426 break;
    427 if (!i || quote[0] == all_key()) { /* Quote all */
    CID 640333: (NEGATIVE_RETURNS)
    "l" is passed to a parameter that cannot be negative.
    428 fseek(stream, l, SEEK_SET);
    429 while (!feof(stream) && !ferror(stream)) {
    430 if (!fgets(str, sizeof(str), stream))
    431 break;
    432 quotestr(str);
    433 SAFEPRINTF2(tmp, quote_fmt, term->cols - 4, str);
    /writemsg.cpp: 440 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()
    434 if (write(file, tmp, strlen(tmp)) > 0)
    435 linesquoted++; 436 }
    437 break;
    438 }
    439 if (quote[0] == list_key()) {
    CID 640333: (NEGATIVE_RETURNS)
    "l" is passed to a parameter that cannot be negative.
    440 fseek(stream, l, SEEK_SET);
    441 i = 1;
    442 term->newline();
    443 attr(LIGHTGRAY);
    444 while (!feof(stream) && !ferror(stream) && !msgabort()) {
    445 if (!fgets(str, sizeof(str), stream))


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


    ----==_mimepart_695528f458f41_188c5a2c2daae1599845314
    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>
    4 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 640333: (NEGATIVE_RETURNS)
    /writemsg.cpp: 463 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()
    /writemsg.cpp: 428 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()
    /writemsg.cpp: 440 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()


    _____________________________________________________________________________________________
    *** CID 640333: (NEGATIVE_RETURNS)
    /writemsg.cpp: 463 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()
    457 while (p) {
    458 if (*p == &#39;,&#39; || *p == &#39; &#39;)
    459 p++;
    460 i = atoi(p);
    461 if (!i)
    462 break;
    &gt;&gt;&gt; CID 640333: (NEGATIVE_RETURNS)
    &gt;&gt;&gt; &quot;l&quot; is passed to a parameter that cannot be negative.
    463 fseek(stream, l, SEEK_SET);
    464 j = 1;
    465 while (!feof(stream) &amp;&amp; !ferror(stream) &amp;&amp; j &lt; i) {
    466 if (!fgets(tmp, sizeof(tmp), stream))
    467 break;
    468 j++; /* skip beginning */
    /writemsg.cpp: 428 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()
    422 free(buf);
    423 return false;
    424 }
    425 if (!i &amp;&amp; linesquoted)
    426 break;
    427 if (!i || quote[0] == all_key()) { /* Quote all */
    &gt;&gt;&gt; CID 640333: (NEGATIVE_RETURNS)
    &gt;&gt;&gt; &quot;l&quot; is passed to a parameter that cannot be negative.
    428 fseek(stream, l, SEEK_SET);
    429 while (!feof(stream) &amp;&amp; !ferror(stream)) {
    430 if (!fgets(str, sizeof(str), stream))
    431 break;
    432 quotestr(str);
    433 SAFEPRINTF2(tmp, quote_fmt, term-&gt;cols - 4, str);
    /writemsg.cpp: 440 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()
    434 if (write(file, tmp, strlen(tmp)) &gt; 0)
    435 linesquoted++; 436 }
    437 break;
    438 }
    439 if (quote[0] == list_key()) { &gt;&gt;&gt; CID 640333: (NEGATIVE_RETURNS)
    &gt;&gt;&gt; &quot;l&quot; is passed to a parameter that cannot be negative.
    440 fseek(stream, l, SEEK_SET);
    441 i = 1;
    442 term-&gt;newline();
    443 attr(LIGHTGRAY);
    444 while (!feof(stream) &amp;&amp; !ferror(stream) &amp;&amp; !msgabort()) {
    445 if (!fgets(str, sizeof(str), 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_695528f458f41_188c5a2c2daae1599845314--


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to All on Sunday, January 04, 2026 13:50:57
    ----==_mimepart_695a7040d64d9_1c5eff2c2daae1599845367
    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 640376: (SLEEP)


    _____________________________________________________________________________________________
    *** CID 640376: (SLEEP)
    /tmp/sbbs-Jan-04-2026/src/conio/ciolib.c: 575 in initciolib()
    569 try_x_init(mode);
    570 #endif
    571 break;
    572 #endif
    573 case CIOLIB_MODE_ANSI:
    574 try_ansi_init(mode);
    CID 640376: (SLEEP)
    Call to "try_ansi_init" might sleep while holding lock "init_mutex". 575 break;
    576
    577 #if defined(WITH_SDL)
    578 case CIOLIB_MODE_SDL:
    579 case CIOLIB_MODE_SDL_FULLSCREEN:
    580 try_sdl_init(mode); /tmp/sbbs-Jan-04-2026/src/conio/ciolib.c: 548 in initciolib()
    542 if(!try_sdl_init(CIOLIB_MODE_SDL))
    543 #endif
    544 #ifndef _WIN32
    545 if(!try_curses_init(mode))
    546 #endif
    547 if (!try_ansi_init(mode))
    CID 640376: (SLEEP)
    Call to "try_ansi_init" might sleep while holding lock "init_mutex". 548 #ifdef _WIN32
    549 if(!try_conio_init(mode));
    550 #else
    551 ;
    552 #endif
    553 break; /tmp/sbbs-Jan-04-2026/src/conio/ciolib.c: 543 in initciolib()
    537 #endif
    538 #if defined(WITH_GDI)
    539 if (!try_gdi_init(mode))
    540 #endif
    541 #if defined(WITH_SDL)
    542 if(!try_sdl_init(CIOLIB_MODE_SDL))
    CID 640376: (SLEEP)
    Call to "try_sdl_init" might sleep while holding lock "init_mutex".
    543 #endif
    544 #ifndef _WIN32
    545 if(!try_curses_init(mode))
    546 #endif
    547 if (!try_ansi_init(mode))
    548 #ifdef _WIN32
    /tmp/sbbs-Jan-04-2026/src/conio/ciolib.c: 581 in initciolib()
    575 break;
    576
    577 #if defined(WITH_SDL)
    578 case CIOLIB_MODE_SDL:
    579 case CIOLIB_MODE_SDL_FULLSCREEN:
    580 try_sdl_init(mode);
    CID 640376: (SLEEP)
    Call to "try_sdl_init" might sleep while holding lock "init_mutex".
    581 break;
    582 #endif
    583
    584 #if defined(WITH_GDI)
    585 case CIOLIB_MODE_GDI:
    586 case CIOLIB_MODE_GDI_FULLSCREEN:


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


    ----==_mimepart_695a7040d64d9_1c5eff2c2daae1599845367
    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 640376: (SLEEP)


    _____________________________________________________________________________________________
    *** CID 640376: (SLEEP)
    /tmp/sbbs-Jan-04-2026/src/conio/ciolib.c: 575 in initciolib()
    569 try_x_init(mode);
    570 #endif
    571 break;
    572 #endif
    573 case CIOLIB_MODE_ANSI:
    574 try_ansi_init(mode);
    &gt;&gt;&gt; CID 640376: (SLEEP)
    &gt;&gt;&gt; Call to &quot;try_ansi_init&quot; might sleep while holding lock &quot;init_mutex&quot;.
    575 break;
    576
    577 #if defined(WITH_SDL)
    578 case CIOLIB_MODE_SDL:
    579 case CIOLIB_MODE_SDL_FULLSCREEN:
    580 try_sdl_init(mode); /tmp/sbbs-Jan-04-2026/src/conio/ciolib.c: 548 in initciolib()
    542 if(!try_sdl_init(CIOLIB_MODE_SDL))
    543 #endif
    544 #ifndef _WIN32
    545 if(!try_curses_init(mode))
    546 #endif
    547 if (!try_ansi_init(mode))
    &gt;&gt;&gt; CID 640376: (SLEEP)
    &gt;&gt;&gt; Call to &quot;try_ansi_init&quot; might sleep while holding lock &quot;init_mutex&quot;.
    548 #ifdef _WIN32
    549 if(!try_conio_init(mode));
    550 #else
    551 ;
    552 #endif
    553 break; /tmp/sbbs-Jan-04-2026/src/conio/ciolib.c: 543 in initciolib()
    537 #endif
    538 #if defined(WITH_GDI)
    539 if (!try_gdi_init(mode))
    540 #endif
    541 #if defined(WITH_SDL)
    542 if(!try_sdl_init(CIOLIB_MODE_SDL))
    &gt;&gt;&gt; CID 640376: (SLEEP)
    &gt;&gt;&gt; Call to &quot;try_sdl_init&quot; might sleep while holding lock &quot;init_mutex&quot;.
    543 #endif
    544 #ifndef _WIN32
    545 if(!try_curses_init(mode))
    546 #endif
    547 if (!try_ansi_init(mode))
    548 #ifdef _WIN32
    /tmp/sbbs-Jan-04-2026/src/conio/ciolib.c: 581 in initciolib()
    575 break;
    576
    577 #if defined(WITH_SDL)
    578 case CIOLIB_MODE_SDL:
    579 case CIOLIB_MODE_SDL_FULLSCREEN:
    580 try_sdl_init(mode);
    &gt;&gt;&gt; CID 640376: (SLEEP)
    &gt;&gt;&gt; Call to &quot;try_sdl_init&quot; might sleep while holding lock &quot;init_mutex&quot;.
    581 break;
    582 #endif
    583
    584 #if defined(WITH_GDI)
    585 case CIOLIB_MODE_GDI:
    586 case CIOLIB_MODE_GDI_FULLSCREEN:

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


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to All on Monday, January 05, 2026 13:46:18
    ----==_mimepart_695bc0a9c87c5_1d5c082c2daae1599845356
    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.

    4 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 4 of 4 defect(s)


    ** CID 640406: High impact quality (Y2K38_SAFETY)
    /getstats.c: 127 in fread_dstats()


    _____________________________________________________________________________________________
    *** CID 640406: High impact quality (Y2K38_SAFETY)
    /getstats.c: 127 in fread_dstats()
    121 if (fp == NULL)
    122 return false;
    123
    124 memset(stats, 0, sizeof(*stats));
    125 if ((ini = iniReadFile(fp)) == NULL)
    126 return false;
    CID 640406: High impact quality (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "iniGetDateTime(ini, NULL, "Date", 0L)" is cast to "time32_t".
    127 stats->date = (time32_t)iniGetDateTime(ini, NULL, strStatsDate, 0);
    128 gettotals(ini, strStatsToday, &stats->today);
    129 gettotals(ini, strStatsTotal, &stats->total);
    130 iniFreeStringList(ini);
    131 stats->last = time32(NULL);
    132

    ** CID 640405: API usage errors (PW.PRINTF_ARG_MISMATCH)
    /atcodes.cpp: 844 in ()


    _____________________________________________________________________________________________
    *** CID 640405: API usage errors (PW.PRINTF_ARG_MISMATCH) /atcodes.cpp: 844 in ()
    838 if (strcmp(sp, "CLOCK") == 0) {
    839 snprintf(str, maxlen, "%" PRIu64, xp_timer64());
    840 return str;
    841 }
    842
    843 if (strcmp(sp, "TIMER") == 0) {
    CID 640405: API usage errors (PW.PRINTF_ARG_MISMATCH)
    argument is incompatible with corresponding format string conversion (expected type "double" but argument has type "long double")
    844 snprintf(str, maxlen, "%f", xp_timer());
    845 return str;
    846 }
    847
    848 if (strcmp(sp, "GENDERS") == 0)
    849 return cfg.new_genders;

    ** CID 640404: API usage errors (PRINTF_ARGS)
    /atcodes.cpp: 844 in sbbs_t::atcode(const char *, char *, unsigned long, int *, bool, JSObject *)()


    _____________________________________________________________________________________________
    *** CID 640404: API usage errors (PRINTF_ARGS)
    /atcodes.cpp: 844 in sbbs_t::atcode(const char *, char *, unsigned long, int *, bool, JSObject *)()
    838 if (strcmp(sp, "CLOCK") == 0) {
    839 snprintf(str, maxlen, "%" PRIu64, xp_timer64());
    840 return str;
    841 }
    842
    843 if (strcmp(sp, "TIMER") == 0) {
    CID 640404: API usage errors (PRINTF_ARGS)
    Argument "xp_timer()" to format specifier "%f" was expected to have type "double" but has type "long double". [Note: The source code implementation of the function has been overridden by a builtin model.]
    844 snprintf(str, maxlen, "%f", xp_timer());
    845 return str;
    846 }
    847
    848 if (strcmp(sp, "GENDERS") == 0)
    849 return cfg.new_genders;

    ** CID 640403: Error handling issues (CHECKED_RETURN)
    /js_system.cpp: 1351 in js_minutestr(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 640403: Error handling issues (CHECKED_RETURN)
    /js_system.cpp: 1351 in js_minutestr(JSContext *, unsigned int, unsigned long *)()
    1345 if (js_argvIsNullOrVoid(cx, argv, 0))
    1346 return JS_FALSE;
    1347
    1348 if (argc > 1 && JSVAL_IS_BOOLEAN(argv[1]))
    1349 estimate = JSVAL_TO_BOOLEAN(argv[1]);
    1350
    CID 640403: Error handling issues (CHECKED_RETURN)
    Calling "JS_ValueToECMAUint32" without checking return value (as is done elsewhere 96 out of 102 times).
    1351 JS_ValueToECMAUint32(cx, argv[0], &t);
    1352 if ((js_str = JS_NewStringCopyZ(cx, minutes_to_str(t, str, sizeof str, estimate))) == NULL)
    1353 return JS_FALSE;
    1354
    1355 JS_SET_RVAL(cx, arglist, STRING_TO_JSVAL(js_str));
    1356 return JS_TRUE;


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


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

    <h3>Defect Details</h3>
    <pre>
    ** CID 640406: High impact quality (Y2K38_SAFETY)
    /getstats.c: 127 in fread_dstats()


    _____________________________________________________________________________________________
    *** CID 640406: High impact quality (Y2K38_SAFETY)
    /getstats.c: 127 in fread_dstats()
    121 if (fp == NULL)
    122 return false;
    123
    124 memset(stats, 0, sizeof(*stats));
    125 if ((ini = iniReadFile(fp)) == NULL)
    126 return false;
    &gt;&gt;&gt; CID 640406: High impact quality (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;iniGetDateTime(ini, NULL, &quot;Date&quot;, 0L)&quot; is cast to &quot;time32_t&quot;.
    127 stats-&gt;date = (time32_t)iniGetDateTime(ini, NULL, strStatsDate, 0);
    128 gettotals(ini, strStatsToday, &amp;stats-&gt;today);
    129 gettotals(ini, strStatsTotal, &amp;stats-&gt;total);
    130 iniFreeStringList(ini);
    131 stats-&gt;last = time32(NULL);
    132

    ** CID 640405: API usage errors (PW.PRINTF_ARG_MISMATCH)
    /atcodes.cpp: 844 in ()


    _____________________________________________________________________________________________
    *** CID 640405: API usage errors (PW.PRINTF_ARG_MISMATCH) /atcodes.cpp: 844 in ()
    838 if (strcmp(sp, &quot;CLOCK&quot;) == 0) {
    839 snprintf(str, maxlen, &quot;%&quot; PRIu64, xp_timer64());
    840 return str;
    841 }
    842
    843 if (strcmp(sp, &quot;TIMER&quot;) == 0) {
    &gt;&gt;&gt; CID 640405: API usage errors (PW.PRINTF_ARG_MISMATCH) &gt;&gt;&gt; argument is incompatible with corresponding format string conversion (expected type &quot;double&quot; but argument has type &quot;long double&quot;)
    844 snprintf(str, maxlen, &quot;%f&quot;, xp_timer());
    845 return str;
    846 }
    847
    848 if (strcmp(sp, &quot;GENDERS&quot;) == 0)
    849 return cfg.new_genders;

    ** CID 640404: API usage errors (PRINTF_ARGS)
    /atcodes.cpp: 844 in sbbs_t::atcode(const char *, char *, unsigned long, int *, bool, JSObject *)()


    _____________________________________________________________________________________________
    *** CID 640404: API usage errors (PRINTF_ARGS)
    /atcodes.cpp: 844 in sbbs_t::atcode(const char *, char *, unsigned long, int *, bool, JSObject *)()
    838 if (strcmp(sp, &quot;CLOCK&quot;) == 0) {
    839 snprintf(str, maxlen, &quot;%&quot; PRIu64, xp_timer64());
    840 return str;
    841 }
    842
    843 if (strcmp(sp, &quot;TIMER&quot;) == 0) {
    &gt;&gt;&gt; CID 640404: API usage errors (PRINTF_ARGS) &gt;&gt;&gt; Argument &quot;xp_timer()&quot; to format specifier &quot;%f&quot; was expected to have type &quot;double&quot; but has type &quot;long double&quot;. [Note: The source code implementation of the function has been overridden by a builtin model.]
    844 snprintf(str, maxlen, &quot;%f&quot;, xp_timer());
    845 return str;
    846 }
    847
    848 if (strcmp(sp, &quot;GENDERS&quot;) == 0)
    849 return cfg.new_genders;

    ** CID 640403: Error handling issues (CHECKED_RETURN)
    /js_system.cpp: 1351 in js_minutestr(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 640403: Error handling issues (CHECKED_RETURN)
    /js_system.cpp: 1351 in js_minutestr(JSContext *, unsigned int, unsigned long *)()
    1345 if (js_argvIsNullOrVoid(cx, argv, 0))
    1346 return JS_FALSE;
    1347
    1348 if (argc &gt; 1 &amp;&amp; JSVAL_IS_BOOLEAN(argv[1]))
    1349 estimate = JSVAL_TO_BOOLEAN(argv[1]);
    1350
    &gt;&gt;&gt; CID 640403: Error handling issues (CHECKED_RETURN) &gt;&gt;&gt; Calling &quot;JS_ValueToECMAUint32&quot; without checking return value (as is done elsewhere 96 out of 102 times).
    1351 JS_ValueToECMAUint32(cx, argv[0], &amp;t);
    1352 if ((js_str = JS_NewStringCopyZ(cx, minutes_to_str(t, str, sizeof str, estimate))) == NULL)
    1353 return JS_FALSE;
    1354
    1355 JS_SET_RVAL(cx, arglist, STRING_TO_JSVAL(js_str));
    1356 return JS_TRUE;

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


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to All on Wednesday, January 07, 2026 13:48:08
    ----==_mimepart_695e6417e6a62_1f55b62c2daae1599845373
    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 640928: Performance inefficiencies (PASS_BY_VALUE)
    /js_user.cpp: 60 in user_private_t::user_private_t(scfg_t *, user_t)()


    _____________________________________________________________________________________________
    *** CID 640928: Performance inefficiencies (PASS_BY_VALUE) /js_user.cpp: 60 in user_private_t::user_private_t(scfg_t *, user_t)()
    54 cached_mail_count mail_pending{cfg, user, true, 0};
    55 cached_mail_count spam_waiting{cfg, user, false, MSG_SPAM};
    56
    57 user_private_t(scfg_t* cfg)
    58 : cfg(cfg)
    59 {}
    CID 640928: Performance inefficiencies (PASS_BY_VALUE)
    Passing parameter user of type "user_t" (size 784 bytes) by value, which exceeds the high threshold of 512 bytes.
    60 user_private_t(scfg_t* cfg, user_t user)
    61 : storage(user)
    62 , cached(user.number == 0 ? false : true)
    63 , cfg(cfg)
    64 {}
    65 };

    ** CID 640927: API usage errors (PRINTF_ARGS)


    _____________________________________________________________________________________________
    *** CID 640927: API usage errors (PRINTF_ARGS)
    /date_str.c: 301 in tm_as_hhmmss()
    295 /* Returns 8 character string (e.g. hh:mm:ss or hh:mm am/pm) */
    296 /****************************************************************************/
    297 char* tm_as_hhmmss(scfg_t* cfg, struct tm* tm, char* str, size_t size) 298 {
    299 if (cfg != NULL && (cfg->sys_misc & SM_MILITARY))
    300 snprintf(str, size, "%02d:%02d:02d"
    CID 640927: API usage errors (PRINTF_ARGS)
    This argument was not used by the format string: "tm->tm_sec".
    301 , tm->tm_hour, tm->tm_min, tm->tm_sec);
    302 else
    303 snprintf(str, size, "%02d:%02d %cm"
    304 , tm->tm_hour > 12 ? tm->tm_hour - 12 : tm->tm_hour == 0 ? 12 : tm->tm_hour
    305 , tm->tm_min, tm->tm_hour >= 12 ? 'p' : 'a'); 306 return str;

    ** CID 640926: API usage errors (PW.TOO_MANY_PRINTF_ARGS)
    /date_str.c: 301 in ()


    _____________________________________________________________________________________________
    *** CID 640926: API usage errors (PW.TOO_MANY_PRINTF_ARGS) /date_str.c: 301 in ()
    295 /* Returns 8 character string (e.g. hh:mm:ss or hh:mm am/pm) */
    296 /****************************************************************************/
    297 char* tm_as_hhmmss(scfg_t* cfg, struct tm* tm, char* str, size_t size) 298 {
    299 if (cfg != NULL && (cfg->sys_misc & SM_MILITARY))
    300 snprintf(str, size, "%02d:%02d:02d"
    CID 640926: API usage errors (PW.TOO_MANY_PRINTF_ARGS)
    the format string ends before this argument
    301 , tm->tm_hour, tm->tm_min, tm->tm_sec);
    302 else
    303 snprintf(str, size, "%02d:%02d %cm"
    304 , tm->tm_hour > 12 ? tm->tm_hour - 12 : tm->tm_hour == 0 ? 12 : tm->tm_hour
    305 , tm->tm_min, tm->tm_hour >= 12 ? 'p' : 'a'); 306 return str;


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


    ----==_mimepart_695e6417e6a62_1f55b62c2daae1599845373
    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 640928: Performance inefficiencies (PASS_BY_VALUE)
    /js_user.cpp: 60 in user_private_t::user_private_t(scfg_t *, user_t)()


    _____________________________________________________________________________________________
    *** CID 640928: Performance inefficiencies (PASS_BY_VALUE) /js_user.cpp: 60 in user_private_t::user_private_t(scfg_t *, user_t)()
    54 cached_mail_count mail_pending{cfg, user, true, 0};
    55 cached_mail_count spam_waiting{cfg, user, false, MSG_SPAM};
    56
    57 user_private_t(scfg_t* cfg)
    58 : cfg(cfg)
    59 {}
    &gt;&gt;&gt; CID 640928: Performance inefficiencies (PASS_BY_VALUE)
    &gt;&gt;&gt; Passing parameter user of type &quot;user_t&quot; (size 784 bytes) by value, which exceeds the high threshold of 512 bytes.
    60 user_private_t(scfg_t* cfg, user_t user)
    61 : storage(user)
    62 , cached(user.number == 0 ? false : true)
    63 , cfg(cfg)
    64 {}
    65 };

    ** CID 640927: API usage errors (PRINTF_ARGS)


    _____________________________________________________________________________________________
    *** CID 640927: API usage errors (PRINTF_ARGS)
    /date_str.c: 301 in tm_as_hhmmss()
    295 /* Returns 8 character string (e.g. hh:mm:ss or hh:mm am/pm) */
    296 /****************************************************************************/
    297 char* tm_as_hhmmss(scfg_t* cfg, struct tm* tm, char* str, size_t size) 298 {
    299 if (cfg != NULL &amp;&amp; (cfg-&gt;sys_misc &amp; SM_MILITARY))
    300 snprintf(str, size, &quot;%02d:%02d:02d&quot; &gt;&gt;&gt; CID 640927: API usage errors (PRINTF_ARGS) &gt;&gt;&gt; This argument was not used by the format string: &quot;tm-&gt;tm_sec&quot;.
    301 , tm-&gt;tm_hour, tm-&gt;tm_min, tm-&gt;tm_sec);
    302 else
    303 snprintf(str, size, &quot;%02d:%02d %cm&quot;
    304 , tm-&gt;tm_hour &gt; 12 ? tm-&gt;tm_hour - 12 : tm-&gt;tm_hour == 0 ? 12 : tm-&gt;tm_hour
    305 , tm-&gt;tm_min, tm-&gt;tm_hour &gt;= 12 ? &#39;p&#39; : &#39;a&#39;);
    306 return str;

    ** CID 640926: API usage errors (PW.TOO_MANY_PRINTF_ARGS)
    /date_str.c: 301 in ()


    _____________________________________________________________________________________________
    *** CID 640926: API usage errors (PW.TOO_MANY_PRINTF_ARGS) /date_str.c: 301 in ()
    295 /* Returns 8 character string (e.g. hh:mm:ss or hh:mm am/pm) */
    296 /****************************************************************************/
    297 char* tm_as_hhmmss(scfg_t* cfg, struct tm* tm, char* str, size_t size) 298 {
    299 if (cfg != NULL &amp;&amp; (cfg-&gt;sys_misc &amp; SM_MILITARY))
    300 snprintf(str, size, &quot;%02d:%02d:02d&quot; &gt;&gt;&gt; CID 640926: API usage errors (PW.TOO_MANY_PRINTF_ARGS)
    &gt;&gt;&gt; the format string ends before this argument
    301 , tm-&gt;tm_hour, tm-&gt;tm_min, tm-&gt;tm_sec);
    302 else
    303 snprintf(str, size, &quot;%02d:%02d %cm&quot;
    304 , tm-&gt;tm_hour &gt; 12 ? tm-&gt;tm_hour - 12 : tm-&gt;tm_hour == 0 ? 12 : tm-&gt;tm_hour
    305 , tm-&gt;tm_min, tm-&gt;tm_hour &gt;= 12 ? &#39;p&#39; : &#39;a&#39;);
    306 return str;

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


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to All on Thursday, January 08, 2026 13:44:45
    ----==_mimepart_695fb4cd3c9f7_2053bf2c2daae15998453fd
    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.
    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 640932: Insecure data handling (INTEGER_OVERFLOW)
    /atcodes.cpp: 1664 in sbbs_t::atcode(const char *, char *, unsigned long, int *, bool, JSObject *)()


    _____________________________________________________________________________________________
    *** CID 640932: Insecure data handling (INTEGER_OVERFLOW) /atcodes.cpp: 1664 in sbbs_t::atcode(const char *, char *, unsigned long, int *, bool, JSObject *)()
    1658 if (!strcmp(sp, "BYTESLEFT")) {
    1659 safe_snprintf(str, maxlen, "%" PRIu64, user_available_credits(&useron));
    1660 return str;
    1661 }
    1662
    1663 if (code_match(sp, "CDTLEFT", &param))
    CID 640932: Insecure data handling (INTEGER_OVERFLOW)
    The cast of "user_available_credits(&this->useron)" to a signed type could result in a negative number.
    1664 return byte_count(user_available_credits(&useron), str, maxlen, param, BYTE_COUNT_VERBAL);
    1665
    1666 if (code_match(sp, "CREDITS", &param))
    1667 return byte_count(useron.cdt, str, maxlen, param, BYTE_COUNT_BYTES);
    1668
    1669 if (code_match(sp, "FREECDT", &param))


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


    ----==_mimepart_695fb4cd3c9f7_2053bf2c2daae15998453fd
    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>
    2 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 640932: Insecure data handling (INTEGER_OVERFLOW)
    /atcodes.cpp: 1664 in sbbs_t::atcode(const char *, char *, unsigned long, int *, bool, JSObject *)()


    _____________________________________________________________________________________________
    *** CID 640932: Insecure data handling (INTEGER_OVERFLOW) /atcodes.cpp: 1664 in sbbs_t::atcode(const char *, char *, unsigned long, int *, bool, JSObject *)()
    1658 if (!strcmp(sp, &quot;BYTESLEFT&quot;)) {
    1659 safe_snprintf(str, maxlen, &quot;%&quot; PRIu64, user_available_credits(&amp;useron));
    1660 return str;
    1661 }
    1662
    1663 if (code_match(sp, &quot;CDTLEFT&quot;, &amp;param)) &gt;&gt;&gt; CID 640932: Insecure data handling (INTEGER_OVERFLOW) &gt;&gt;&gt; The cast of &quot;user_available_credits(&amp;this-&gt;useron)&quot; to a signed type could result in a negative number.
    1664 return byte_count(user_available_credits(&amp;useron), str, maxlen, param, BYTE_COUNT_VERBAL);
    1665
    1666 if (code_match(sp, &quot;CREDITS&quot;, &amp;param))
    1667 return byte_count(useron.cdt, str, maxlen, param, BYTE_COUNT_BYTES);
    1668
    1669 if (code_match(sp, &quot;FREECDT&quot;, &amp;param))

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


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to All on Saturday, January 10, 2026 13:44:53
    ----==_mimepart_696257d4e4005_22599f2afbc97ad9ac59824
    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 640959: (CHECKED_RETURN) /tmp/sbbs-Jan-10-2026/src/xpdev/genwrap.c: 479 in add_suffix() /tmp/sbbs-Jan-10-2026/src/xpdev/genwrap.c: 481 in add_suffix() /tmp/sbbs-Jan-10-2026/src/xpdev/genwrap.c: 483 in add_suffix() /tmp/sbbs-Jan-10-2026/src/xpdev/genwrap.c: 480 in add_suffix()


    _____________________________________________________________________________________________
    *** CID 640959: (CHECKED_RETURN) /tmp/sbbs-Jan-10-2026/src/xpdev/genwrap.c: 479 in add_suffix()
    473 char* p = strstr(str, ".0");
    474 if (p != NULL && *(p + 2) == '\0') // remove trailing ".0"
    475 *p = '\0';
    476 if (strcmp(str, "1") == 0)
    477 plural = "";
    478 if (is_word) {
    CID 640959: (CHECKED_RETURN)
    Calling "strlcat" without checking return value (as is done elsewhere 29 out of 33 times).
    479 strlcat(str, " ", size);
    480 strlcat(str, suffix, size);
    481 strlcat(str, plural, size);
    482 } else
    483 strlcat(str, suffix, size);
    484 }
    /tmp/sbbs-Jan-10-2026/src/xpdev/genwrap.c: 481 in add_suffix()
    475 *p = '\0';
    476 if (strcmp(str, "1") == 0)
    477 plural = "";
    478 if (is_word) {
    479 strlcat(str, " ", size);
    480 strlcat(str, suffix, size);
    CID 640959: (CHECKED_RETURN)
    Calling "strlcat" without checking return value (as is done elsewhere 29 out of 33 times).
    481 strlcat(str, plural, size);
    482 } else
    483 strlcat(str, suffix, size);
    484 }
    485
    486 /* Convert a duration estimate (in seconds) to a string /tmp/sbbs-Jan-10-2026/src/xpdev/genwrap.c: 483 in add_suffix()
    477 plural = "";
    478 if (is_word) {
    479 strlcat(str, " ", size);
    480 strlcat(str, suffix, size);
    481 strlcat(str, plural, size);
    482 } else
    CID 640959: (CHECKED_RETURN)
    Calling "strlcat" without checking return value (as is done elsewhere 29 out of 33 times).
    483 strlcat(str, suffix, size);
    484 }
    485
    486 /* Convert a duration estimate (in seconds) to a string
    487 * with a single letter multiplier/suffix:
    488 * (y)ears, (w)eeks, (d)ays, (h)ours, (m)inutes, or (s)econds /tmp/sbbs-Jan-10-2026/src/xpdev/genwrap.c: 480 in add_suffix()
    474 if (p != NULL && *(p + 2) == '\0') // remove trailing ".0"
    475 *p = '\0';
    476 if (strcmp(str, "1") == 0)
    477 plural = "";
    478 if (is_word) {
    479 strlcat(str, " ", size);
    CID 640959: (CHECKED_RETURN)
    Calling "strlcat" without checking return value (as is done elsewhere 29 out of 33 times).
    480 strlcat(str, suffix, size);
    481 strlcat(str, plural, size);
    482 } else
    483 strlcat(str, suffix, size);
    484 }
    485


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


    ----==_mimepart_696257d4e4005_22599f2afbc97ad9ac59824
    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 640959: (CHECKED_RETURN) /tmp/sbbs-Jan-10-2026/src/xpdev/genwrap.c: 479 in add_suffix() /tmp/sbbs-Jan-10-2026/src/xpdev/genwrap.c: 481 in add_suffix() /tmp/sbbs-Jan-10-2026/src/xpdev/genwrap.c: 483 in add_suffix() /tmp/sbbs-Jan-10-2026/src/xpdev/genwrap.c: 480 in add_suffix()


    _____________________________________________________________________________________________
    *** CID 640959: (CHECKED_RETURN) /tmp/sbbs-Jan-10-2026/src/xpdev/genwrap.c: 479 in add_suffix()
    473 char* p = strstr(str, &quot;.0&quot;);
    474 if (p != NULL &amp;&amp; *(p + 2) == &#39;\0&#39;) // remove trailing &quot;.0&quot;
    475 *p = &#39;\0&#39;;
    476 if (strcmp(str, &quot;1&quot;) == 0)
    477 plural = &quot;&quot;;
    478 if (is_word) {
    &gt;&gt;&gt; CID 640959: (CHECKED_RETURN)
    &gt;&gt;&gt; Calling &quot;strlcat&quot; without checking return value (as is done elsewhere 29 out of 33 times).
    479 strlcat(str, &quot; &quot;, size);
    480 strlcat(str, suffix, size);
    481 strlcat(str, plural, size);
    482 } else
    483 strlcat(str, suffix, size);
    484 }
    /tmp/sbbs-Jan-10-2026/src/xpdev/genwrap.c: 481 in add_suffix()
    475 *p = &#39;\0&#39;;
    476 if (strcmp(str, &quot;1&quot;) == 0)
    477 plural = &quot;&quot;;
    478 if (is_word) {
    479 strlcat(str, &quot; &quot;, size);
    480 strlcat(str, suffix, size);
    &gt;&gt;&gt; CID 640959: (CHECKED_RETURN)
    &gt;&gt;&gt; Calling &quot;strlcat&quot; without checking return value (as is done elsewhere 29 out of 33 times).
    481 strlcat(str, plural, size);
    482 } else
    483 strlcat(str, suffix, size);
    484 }
    485
    486 /* Convert a duration estimate (in seconds) to a string /tmp/sbbs-Jan-10-2026/src/xpdev/genwrap.c: 483 in add_suffix()
    477 plural = &quot;&quot;;
    478 if (is_word) {
    479 strlcat(str, &quot; &quot;, size);
    480 strlcat(str, suffix, size);
    481 strlcat(str, plural, size);
    482 } else
    &gt;&gt;&gt; CID 640959: (CHECKED_RETURN)
    &gt;&gt;&gt; Calling &quot;strlcat&quot; without checking return value (as is done elsewhere 29 out of 33 times).
    483 strlcat(str, suffix, size);
    484 }
    485
    486 /* Convert a duration estimate (in seconds) to a string
    487 * with a single letter multiplier/suffix:
    488 * (y)ears, (w)eeks, (d)ays, (h)ours, (m)inutes, or (s)econds /tmp/sbbs-Jan-10-2026/src/xpdev/genwrap.c: 480 in add_suffix()
    474 if (p != NULL &amp;&amp; *(p + 2) == &#39;\0&#39;) // remove trailing &quot;.0&quot;
    475 *p = &#39;\0&#39;;
    476 if (strcmp(str, &quot;1&quot;) == 0)
    477 plural = &quot;&quot;;
    478 if (is_word) {
    479 strlcat(str, &quot; &quot;, size);
    &gt;&gt;&gt; CID 640959: (CHECKED_RETURN)
    &gt;&gt;&gt; Calling &quot;strlcat&quot; without checking return value (as is done elsewhere 29 out of 33 times).
    480 strlcat(str, suffix, size);
    481 strlcat(str, plural, size);
    482 } else
    483 strlcat(str, suffix, size);
    484 }
    485

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


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to All on Sunday, January 11, 2026 13:48:17
    ----==_mimepart_6963aa20b22c3_235b0c2afbc97ad9ac59882
    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.
    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 2 of 2 defect(s)


    ** CID 640963: Resource leaks (RESOURCE_LEAK)
    /sbbs_ini.c: 401 in sbbs_read_ini()


    _____________________________________________________________________________________________
    *** CID 640963: Resource leaks (RESOURCE_LEAK)
    /sbbs_ini.c: 401 in sbbs_read_ini()
    395 , services
    396 );
    397
    398 list = iniReadFile(fp);
    399
    400 if (!get_ini_globals(list, global))
    CID 640963: Resource leaks (RESOURCE_LEAK)
    Variable "list" going out of scope leaks the storage it points to.
    401 return false;
    402
    403 if (global->ctrl_dir[0]) {
    404 if (bbs != NULL)
    405 SAFECOPY(bbs->ctrl_dir, global->ctrl_dir);
    406 if (ftp != NULL)

    ** CID 640962: Resource leaks (RESOURCE_LEAK)
    /sbbs_ini.c: 442 in sbbs_read_ini()


    _____________________________________________________________________________________________
    *** CID 640962: Resource leaks (RESOURCE_LEAK)
    /sbbs_ini.c: 442 in sbbs_read_ini()
    436 if (run_bbs != NULL)
    437 *run_bbs = iniGetBool(list, section, strAutoStart, true);
    438
    439 if (bbs != NULL) {
    440
    441 if (bbs->size != sizeof *bbs)
    CID 640962: Resource leaks (RESOURCE_LEAK)
    Variable "global_interfaces" going out of scope leaks the storage it points to.
    442 return false;
    443
    444 bbs->outgoing4.s_addr
    445 = iniGetIpAddress(list, section, strOutgoing4, global->outgoing4.s_addr);
    446 bbs->outgoing6
    447 = iniGetIp6Address(list, section, strOutgoing6, global->outgoing6);


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


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

    <h3>Defect Details</h3>
    <pre>
    ** CID 640963: Resource leaks (RESOURCE_LEAK)
    /sbbs_ini.c: 401 in sbbs_read_ini()


    _____________________________________________________________________________________________
    *** CID 640963: Resource leaks (RESOURCE_LEAK)
    /sbbs_ini.c: 401 in sbbs_read_ini()
    395 , services
    396 );
    397
    398 list = iniReadFile(fp);
    399
    400 if (!get_ini_globals(list, global))
    &gt;&gt;&gt; CID 640963: Resource leaks (RESOURCE_LEAK) &gt;&gt;&gt; Variable &quot;list&quot; going out of scope leaks the storage it points to.
    401 return false;
    402
    403 if (global-&gt;ctrl_dir[0]) {
    404 if (bbs != NULL)
    405 SAFECOPY(bbs-&gt;ctrl_dir, global-&gt;ctrl_dir);
    406 if (ftp != NULL)

    ** CID 640962: Resource leaks (RESOURCE_LEAK)
    /sbbs_ini.c: 442 in sbbs_read_ini()


    _____________________________________________________________________________________________
    *** CID 640962: Resource leaks (RESOURCE_LEAK)
    /sbbs_ini.c: 442 in sbbs_read_ini()
    436 if (run_bbs != NULL)
    437 *run_bbs = iniGetBool(list, section, strAutoStart, true);
    438
    439 if (bbs != NULL) {
    440
    441 if (bbs-&gt;size != sizeof *bbs)
    &gt;&gt;&gt; CID 640962: Resource leaks (RESOURCE_LEAK) &gt;&gt;&gt; Variable &quot;global_interfaces&quot; going out of scope leaks the storage it points to.
    442 return false;
    443
    444 bbs-&gt;outgoing4.s_addr
    445 = iniGetIpAddress(list, section, strOutgoing4, global-&gt;outgoing4.s_addr);
    446 bbs-&gt;outgoing6
    447 = iniGetIp6Address(list, section, strOutgoing6, global-&gt;outgoing6);

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


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to All on Monday, January 12, 2026 13:47:57
    ----==_mimepart_6964fb8d1cdba_2460bc2afbc97ad9ac59882
    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.
    6 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 640971: High impact quality (Y2K38_SAFETY)
    /atcodes.cpp: 620 in sbbs_t::atcode(const char *, char *, unsigned long, int *, bool, unsigned int, JSObject *)()


    _____________________________________________________________________________________________
    *** CID 640971: High impact quality (Y2K38_SAFETY)
    /atcodes.cpp: 620 in sbbs_t::atcode(const char *, char *, unsigned long, int *, bool, unsigned int, JSObject *)()
    614
    615 if (code_match(sp, "UPTIME", &param)) {
    616 extern volatile time_t uptime;
    617 time_t up = 0;
    618 if (uptime != 0 && time(&now) >= uptime)
    619 up = now - uptime;
    CID 640971: High impact quality (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "up" is cast to "uint".
    620 return duration((uint)up, str, maxlen, param, DURATION_MINIMAL_VERBAL);
    621 }
    622
    623 if (!strcmp(sp, "SERVED")) {
    624 extern volatile uint served;
    625 safe_snprintf(str, maxlen, "%u", served);

    ** CID 640970: Insecure data handling (INTEGER_OVERFLOW)
    /atcodes.cpp: 1695 in sbbs_t::atcode(const char *, char *, unsigned long, int *, bool, unsigned int, JSObject *)()


    _____________________________________________________________________________________________
    *** CID 640970: Insecure data handling (INTEGER_OVERFLOW) /atcodes.cpp: 1695 in sbbs_t::atcode(const char *, char *, unsigned long, int *, bool, unsigned int, JSObject *)()
    1689 if (!strcmp(sp, "BYTESLEFT")) {
    1690 safe_snprintf(str, maxlen, "%" PRIu64, user_available_credits(&useron));
    1691 return str;
    1692 }
    1693
    1694 if (code_match(sp, "CDTLEFT", &param))
    CID 640970: Insecure data handling (INTEGER_OVERFLOW)
    The cast of "user_available_credits(&this->useron)" to a signed type could result in a negative number.
    1695 return byte_count(static_cast<int64_t>(user_available_credits(&useron)), str, maxlen, param, BYTE_COUNT_VERBAL);
    1696
    1697 if (code_match(sp, "CREDITS", &param))
    1698 return byte_count(useron.cdt, str, maxlen, param, BYTE_COUNT_BYTES);
    1699
    1700 if (code_match(sp, "FREECDT", &param))


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


    ----==_mimepart_6964fb8d1cdba_2460bc2afbc97ad9ac59882
    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>
    6 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 640971: High impact quality (Y2K38_SAFETY)
    /atcodes.cpp: 620 in sbbs_t::atcode(const char *, char *, unsigned long, int *, bool, unsigned int, JSObject *)()


    _____________________________________________________________________________________________
    *** CID 640971: High impact quality (Y2K38_SAFETY)
    /atcodes.cpp: 620 in sbbs_t::atcode(const char *, char *, unsigned long, int *, bool, unsigned int, JSObject *)()
    614
    615 if (code_match(sp, &quot;UPTIME&quot;, &amp;param)) {
    616 extern volatile time_t uptime;
    617 time_t up = 0;
    618 if (uptime != 0 &amp;&amp; time(&amp;now) &gt;= uptime) 619 up = now - uptime;
    &gt;&gt;&gt; CID 640971: High impact quality (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;up&quot; is cast to &quot;uint&quot;.
    620 return duration((uint)up, str, maxlen, param, DURATION_MINIMAL_VERBAL);
    621 }
    622
    623 if (!strcmp(sp, &quot;SERVED&quot;)) {
    624 extern volatile uint served;
    625 safe_snprintf(str, maxlen, &quot;%u&quot;, served);

    ** CID 640970: Insecure data handling (INTEGER_OVERFLOW)
    /atcodes.cpp: 1695 in sbbs_t::atcode(const char *, char *, unsigned long, int *, bool, unsigned int, JSObject *)()


    _____________________________________________________________________________________________
    *** CID 640970: Insecure data handling (INTEGER_OVERFLOW) /atcodes.cpp: 1695 in sbbs_t::atcode(const char *, char *, unsigned long, int *, bool, unsigned int, JSObject *)()
    1689 if (!strcmp(sp, &quot;BYTESLEFT&quot;)) {
    1690 safe_snprintf(str, maxlen, &quot;%&quot; PRIu64, user_available_credits(&amp;useron));
    1691 return str;
    1692 }
    1693
    1694 if (code_match(sp, &quot;CDTLEFT&quot;, &amp;param)) &gt;&gt;&gt; CID 640970: Insecure data handling (INTEGER_OVERFLOW) &gt;&gt;&gt; The cast of &quot;user_available_credits(&amp;this-&gt;useron)&quot; to a signed type could result in a negative number.
    1695 return byte_count(static_cast&lt;int64_t&gt;(user_available_credits(&amp;useron)), str, maxlen, param, BYTE_COUNT_VERBAL);
    1696
    1697 if (code_match(sp, &quot;CREDITS&quot;, &amp;param))
    1698 return byte_count(useron.cdt, str, maxlen, param, BYTE_COUNT_BYTES);
    1699
    1700 if (code_match(sp, &quot;FREECDT&quot;, &amp;param))

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


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to All on Tuesday, January 13, 2026 13:45:40
    ----==_mimepart_69664c8455017_2561de2afbc97ad9ac598df
    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 640989: (CONSTANT_EXPRESSION_RESULT)
    /chk_ar.cpp: 752 in sbbs_t::ar_exp(const unsigned char **, user_t *, client_t *)()
    /chk_ar.cpp: 763 in sbbs_t::ar_exp(const unsigned char **, user_t *, client_t *)()


    _____________________________________________________________________________________________
    *** CID 640989: (CONSTANT_EXPRESSION_RESULT)
    /chk_ar.cpp: 752 in sbbs_t::ar_exp(const unsigned char **, user_t *, client_t *)()
    746 while (**ptrptr != '\0' && **ptrptr != ']' && i < sizeof(tmp) - 1)
    747 tmp[i++] = *(*ptrptr)++;
    748 tmp[i] = '\0';
    749 if (**ptrptr == ']') {
    750 (*ptrptr)++;
    751 section = tmp;
    CID 640989: (CONSTANT_EXPRESSION_RESULT)
    "**ptrptr == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    752 SKIP_WHITESPACE(*ptrptr);
    753 }
    754 }
    755 else if (strchr((char *)(*ptrptr), ':') != nullptr) { // [section:]key
    756 i = 0;
    757 while (**ptrptr != '\0' && **ptrptr != ':' && i < sizeof(tmp) - 1)
    /chk_ar.cpp: 763 in sbbs_t::ar_exp(const unsigned char **, user_t *, client_t *)()
    757 while (**ptrptr != '\0' && **ptrptr != ':' && i < sizeof(tmp) - 1)
    758 tmp[i++] = *(*ptrptr)++;
    759 tmp[i] = '\0';
    760 if (**ptrptr != '\0') {
    761 (*ptrptr)++;
    762 section = tmp;
    CID 640989: (CONSTANT_EXPRESSION_RESULT)
    "**ptrptr == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    763 SKIP_WHITESPACE(*ptrptr);
    764 }
    765 }
    766 SKIP_CHAR((*ptrptr), ':');
    767 if (!user_get_bool_property(&cfg, user->number, section, (char*)*ptrptr, false))
    768 result = _not;

    ** CID 640988: Null pointer dereferences (FORWARD_NULL)


    _____________________________________________________________________________________________
    *** CID 640988: Null pointer dereferences (FORWARD_NULL)
    /userdat.c: 4877 in user_get_bool_property()
    4871 c_unescape_printable((char*)section);
    4872 }
    4873 if (key != NULL) {
    4874 key = strdup(key);
    4875 c_unescape_printable((char*)key);
    4876 }
    CID 640988: Null pointer dereferences (FORWARD_NULL)
    Passing null pointer "key" to "iniReadBool", which dereferences it. 4877 bool result = iniReadBool(fp, section, key, deflt);
    4878 iniCloseFile(fp);
    4879 free((char*)section);
    4880 free((char*)key);
    4881 return result;
    4882 }

    ** CID 640987: (CONSTANT_EXPRESSION_RESULT)
    /userdat.c: 2740 in ar_exp()
    /userdat.c: 2729 in ar_exp()


    _____________________________________________________________________________________________
    *** CID 640987: (CONSTANT_EXPRESSION_RESULT)
    /userdat.c: 2740 in ar_exp()
    2734 while (**ptrptr != '\0' && **ptrptr != ':' && i < sizeof(tmp) - 1)
    2735 tmp[i++] = *(*ptrptr)++;
    2736 tmp[i] = '\0';
    2737 if (**ptrptr != '\0') {
    2738 (*ptrptr)++;
    2739 section = tmp;
    CID 640987: (CONSTANT_EXPRESSION_RESULT)
    "**ptrptr == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    2740 SKIP_WHITESPACE(*ptrptr);
    2741 }
    2742 }
    2743 SKIP_CHAR((*ptrptr), ':');
    2744 if (!user_get_bool_property(cfg, user->number, section, (char*)*ptrptr, false))
    2745 result = not;
    /userdat.c: 2729 in ar_exp()
    2723 while (**ptrptr != '\0' && **ptrptr != ']' && i < sizeof(tmp) - 1)
    2724 tmp[i++] = *(*ptrptr)++;
    2725 tmp[i] = '\0';
    2726 if (**ptrptr == ']') {
    2727 (*ptrptr)++;
    2728 section = tmp;
    CID 640987: (CONSTANT_EXPRESSION_RESULT)
    "**ptrptr == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    2729 SKIP_WHITESPACE(*ptrptr);
    2730 }
    2731 }
    2732 else if (strchr((char *)(*ptrptr), ':') != NULL) { // [section:]key
    2733 i = 0;
    2734 while (**ptrptr != '\0' && **ptrptr != ':' && i < sizeof(tmp) - 1)


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


    ----==_mimepart_69664c8455017_2561de2afbc97ad9ac598df
    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 640989: (CONSTANT_EXPRESSION_RESULT)
    /chk_ar.cpp: 752 in sbbs_t::ar_exp(const unsigned char **, user_t *, client_t *)()
    /chk_ar.cpp: 763 in sbbs_t::ar_exp(const unsigned char **, user_t *, client_t *)()


    _____________________________________________________________________________________________
    *** CID 640989: (CONSTANT_EXPRESSION_RESULT)
    /chk_ar.cpp: 752 in sbbs_t::ar_exp(const unsigned char **, user_t *, client_t *)()
    746 while (**ptrptr != &#39;\0&#39; &amp;&amp; **ptrptr != &#39;]&#39; &amp;&amp; i &lt; sizeof(tmp) - 1)
    747 tmp[i++] = *(*ptrptr)++;
    748 tmp[i] = &#39;\0&#39;;
    749 if (**ptrptr == &#39;]&#39;) { 750 (*ptrptr)++;
    751 section = tmp; &gt;&gt;&gt; CID 640989: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;**ptrptr == 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;.
    752 SKIP_WHITESPACE(*ptrptr);
    753 }
    754 }
    755 else if (strchr((char *)(*ptrptr), &#39;:&#39;) != nullptr) { // [section:]key
    756 i = 0;
    757 while (**ptrptr != &#39;\0&#39; &amp;&amp; **ptrptr != &#39;:&#39; &amp;&amp; i &lt; sizeof(tmp) - 1)
    /chk_ar.cpp: 763 in sbbs_t::ar_exp(const unsigned char **, user_t *, client_t *)()
    757 while (**ptrptr != &#39;\0&#39; &amp;&amp; **ptrptr != &#39;:&#39; &amp;&amp; i &lt; sizeof(tmp) - 1)
    758 tmp[i++] = *(*ptrptr)++;
    759 tmp[i] = &#39;\0&#39;;
    760 if (**ptrptr != &#39;\0&#39;) { 761 (*ptrptr)++;
    762 section = tmp; &gt;&gt;&gt; CID 640989: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;**ptrptr == 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;.
    763 SKIP_WHITESPACE(*ptrptr);
    764 }
    765 }
    766 SKIP_CHAR((*ptrptr), &#39;:&#39;);
    767 if (!user_get_bool_property(&amp;cfg, user-&gt;number, section, (char*)*ptrptr, false))
    768 result = _not;

    ** CID 640988: Null pointer dereferences (FORWARD_NULL)


    _____________________________________________________________________________________________
    *** CID 640988: Null pointer dereferences (FORWARD_NULL)
    /userdat.c: 4877 in user_get_bool_property()
    4871 c_unescape_printable((char*)section);
    4872 }
    4873 if (key != NULL) {
    4874 key = strdup(key);
    4875 c_unescape_printable((char*)key);
    4876 }
    &gt;&gt;&gt; CID 640988: Null pointer dereferences (FORWARD_NULL) &gt;&gt;&gt; Passing null pointer &quot;key&quot; to &quot;iniReadBool&quot;, which dereferences it.
    4877 bool result = iniReadBool(fp, section, key, deflt);
    4878 iniCloseFile(fp);
    4879 free((char*)section);
    4880 free((char*)key);
    4881 return result;
    4882 }

    ** CID 640987: (CONSTANT_EXPRESSION_RESULT)
    /userdat.c: 2740 in ar_exp()
    /userdat.c: 2729 in ar_exp()


    _____________________________________________________________________________________________
    *** CID 640987: (CONSTANT_EXPRESSION_RESULT)
    /userdat.c: 2740 in ar_exp()
    2734 while (**ptrptr != &#39;\0&#39; &amp;&amp; **ptrptr != &#39;:&#39; &amp;&amp; i &lt; sizeof(tmp) - 1)
    2735 tmp[i++] = *(*ptrptr)++;
    2736 tmp[i] = &#39;\0&#39;;
    2737 if (**ptrptr != &#39;\0&#39;) { 2738 (*ptrptr)++;
    2739 section = tmp; &gt;&gt;&gt; CID 640987: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;**ptrptr == 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;.
    2740 SKIP_WHITESPACE(*ptrptr);
    2741 }
    2742 }
    2743 SKIP_CHAR((*ptrptr), &#39;:&#39;);
    2744 if (!user_get_bool_property(cfg, user-&gt;number, section, (char*)*ptrptr, false))
    2745 result = not;
    /userdat.c: 2729 in ar_exp()
    2723 while (**ptrptr != &#39;\0&#39; &amp;&amp; **ptrptr != &#39;]&#39; &amp;&amp; i &lt; sizeof(tmp) - 1)
    2724 tmp[i++] = *(*ptrptr)++;
    2725 tmp[i] = &#39;\0&#39;;
    2726 if (**ptrptr == &#39;]&#39;) { 2727 (*ptrptr)++;
    2728 section = tmp; &gt;&gt;&gt; CID 640987: (CONSTANT_EXPRESSION_RESULT) &gt;&gt;&gt; &quot;**ptrptr == 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;.
    2729 SKIP_WHITESPACE(*ptrptr);
    2730 }
    2731 }
    2732 else if (strchr((char *)(*ptrptr), &#39;:&#39;) != NULL) { // [section:]key
    2733 i = 0;
    2734 while (**ptrptr != &#39;\0&#39; &amp;&amp; **ptrptr != &#39;:&#39; &amp;&amp; i &lt; sizeof(tmp) - 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_69664c8455017_2561de2afbc97ad9ac598df--


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to All on Wednesday, January 14, 2026 13:46:35
    ----==_mimepart_69679e3a9f33a_26617a2afbc97ad9ac59811
    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.

    113 new defect(s) introduced to Synchronet found with Coverity Scan.
    7 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 20 of 113 defect(s)


    ** CID 641219: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /userdat.c: 3499 in alias()


    _____________________________________________________________________________________________
    *** CID 641219: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /userdat.c: 3499 in alias()
    3493
    3494 if (*tp == 0) /* no alias value */
    3495 continue;
    3496 *tp = 0;
    3497
    3498 vp = tp + 1;
    CID 641219: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*vp == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    3499 SKIP_WHITESPACE(vp);
    3500 truncsp(vp);
    3501 if (*vp == 0) /* no value */
    3502 continue;
    3503
    3504 if (*np == '*') {

    ** CID 641218: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.c: 3761 in ctrl_thread()
    /ftpsrvr.c: 4084 in ctrl_thread()


    _____________________________________________________________________________________________
    *** CID 641218: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.c: 3761 in ctrl_thread()
    3755 tp = np; /* terminator pointer */
    3756 FIND_WHITESPACE(tp);
    3757 if (*tp)
    3758 *tp = 0;
    3759
    3760 dp = tp + 1; /* description pointer */
    CID 641218: (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 "||".
    3761 SKIP_WHITESPACE(dp);
    3762 truncsp(dp);
    3763
    3764 if (stricmp(dp, BBS_HIDDEN_ALIAS) == 0)
    3765 continue;
    3766
    /ftpsrvr.c: 4084 in ctrl_thread()
    4078 tp = np; /* terminator pointer */
    4079 FIND_WHITESPACE(tp); 4080 if (*tp)
    4081 *tp = 0;
    4082
    4083 dp = tp + 1; /* description pointer */
    CID 641218: (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 "||".
    4084 SKIP_WHITESPACE(dp); 4085 truncsp(dp);
    4086
    4087 if (stricmp(dp, BBS_HIDDEN_ALIAS) == 0)
    4088 continue;
    4089

    ** CID 641217: (CONSTANT_EXPRESSION_RESULT) /tmp/sbbs-Jan-14-2026/src/smblib/smbstr.c: 353 in smb_netaddr_type() /tmp/sbbs-Jan-14-2026/src/smblib/smbstr.c: 343 in smb_netaddr_type()


    _____________________________________________________________________________________________
    *** CID 641217: (CONSTANT_EXPRESSION_RESULT) /tmp/sbbs-Jan-14-2026/src/smblib/smbstr.c: 353 in smb_netaddr_type()
    347 return NET_FIDO;
    348 return NET_NONE;
    349 }
    350 if (p == str)
    351 return NET_UNKNOWN;
    352 p++;
    CID 641217: (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 "||".
    353 SKIP_WHITESPACE(p);
    354 if (*p == 0)
    355 return NET_UNKNOWN;
    356
    357 type = smb_get_net_type_by_addr(p);
    358 if (type == NET_INTERNET && strchr(str, ' ') != NULL) /tmp/sbbs-Jan-14-2026/src/smblib/smbstr.c: 343 in smb_netaddr_type()
    337 const char* p;
    338
    339 if (str == NULL || IS_WHITESPACE(*str))
    340 return NET_NONE;
    341 if ((p = strchr(str, '@')) == NULL) {
    342 p = str;
    CID 641217: (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 "||".
    343 SKIP_WHITESPACE(p);
    344 if (*p == 0)
    345 return NET_NONE;
    346 if (smb_get_net_type_by_addr(p) == NET_FIDO)
    347 return NET_FIDO;
    348 return NET_NONE;

    ** CID 641216: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /sbbsecho.c: 6561 in read_areafile_bbs()


    _____________________________________________________________________________________________
    *** CID 641216: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /sbbsecho.c: 6561 in read_areafile_bbs()
    6555 lprintf(LOG_ERR, "ERROR allocating memory for area #%u.", cfg.areas + 1);
    6556 bail(1);
    6557 return;
    6558 }
    6559 sprintf(tmp_code, "%-.*s", LEN_EXTCODE, p);
    6560 tp = tmp_code;
    CID 641216: Integer handling issues (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 "||".
    6561 FIND_WHITESPACE(tp);
    6562 *tp = '\0';
    6563 for (i = 0; i < scfg.total_subs; i++)
    6564 if (!stricmp(tmp_code, scfg.sub[i]->code))
    6565 break;
    6566 if (i < scfg.total_subs)

    ** CID 641215: (CONSTANT_EXPRESSION_RESULT)
    /un_rep.cpp: 567 in sbbs_t::unpack_rep(char *)()
    /un_rep.cpp: 554 in sbbs_t::unpack_rep(char *)()
    /un_rep.cpp: 570 in sbbs_t::unpack_rep(char *)()
    /un_rep.cpp: 569 in sbbs_t::unpack_rep(char *)()
    /un_rep.cpp: 552 in sbbs_t::unpack_rep(char *)()
    /un_rep.cpp: 555 in sbbs_t::unpack_rep(char *)()


    _____________________________________________________________________________________________
    *** CID 641215: (CONSTANT_EXPRESSION_RESULT)
    /un_rep.cpp: 567 in sbbs_t::unpack_rep(char *)()
    561 subscan[n].cfg |= SUB_CFG_NSCAN | SUB_CFG_YSCAN;
    562 }
    563 continue;
    564 }
    565 if (strnicmp(str, "RESET ", 6) == 0) { 566 p = str + 6;
    CID 641215: (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 "||".
    567 SKIP_WHITESPACE(p);
    568 if ((n = resolve_qwkconf(atoi(p))) != INVALID_SUB) {
    569 FIND_WHITESPACE(p);
    570 SKIP_WHITESPACE(p);
    571 /* If the [#ofmessages] is blank then the pointer should be set back to the start of the message base */
    572 if (*p == 0) /un_rep.cpp: 554 in sbbs_t::unpack_rep(char *)()
    548 if (!fgets(str, sizeof(str) - 1, fp)) 549 break;
    550 if (strnicmp(str, "AREA ", 5) == 0) { 551 p = str + 5;
    552 SKIP_WHITESPACE(p);
    553 if ((n = resolve_qwkconf(atoi(p))) != INVALID_SUB) {
    CID 641215: (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 "||".
    554 FIND_WHITESPACE(p);
    555 SKIP_WHITESPACE(p);
    556 if (strchr(p, 'D'))
    557 subscan[n].cfg &= ~SUB_CFG_NSCAN;
    558 else if (strchr(p, 'a') || strchr(p, 'g'))
    559 subscan[n].cfg |= SUB_CFG_NSCAN;
    /un_rep.cpp: 570 in sbbs_t::unpack_rep(char *)()
    564 }
    565 if (strnicmp(str, "RESET ", 6) == 0) { 566 p = str + 6;
    567 SKIP_WHITESPACE(p);
    568 if ((n = resolve_qwkconf(atoi(p))) != INVALID_SUB) {
    569 FIND_WHITESPACE(p);
    CID 641215: (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 "||".
    570 SKIP_WHITESPACE(p);
    571 /* If the [#ofmessages] is blank then the pointer should be set back to the start of the message base */
    572 if (*p == 0)
    573 subscan[n].ptr = 0;
    574 else {
    575 /* otherwise it should be set back [#ofmessages] back from the end of the message base. */
    /un_rep.cpp: 569 in sbbs_t::unpack_rep(char *)()
    563 continue;
    564 }
    565 if (strnicmp(str, "RESET ", 6) == 0) { 566 p = str + 6;
    567 SKIP_WHITESPACE(p);
    568 if ((n = resolve_qwkconf(atoi(p))) != INVALID_SUB) {
    CID 641215: (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 "||".
    569 FIND_WHITESPACE(p);
    570 SKIP_WHITESPACE(p);
    571 /* If the [#ofmessages] is blank then the pointer should be set back to the start of the message base */
    572 if (*p == 0)
    573 subscan[n].ptr = 0;
    574 else {
    /un_rep.cpp: 552 in sbbs_t::unpack_rep(char *)()
    546 if (fp != NULL) {
    547 while (!feof(fp)) {
    548 if (!fgets(str, sizeof(str) - 1, fp)) 549 break;
    550 if (strnicmp(str, "AREA ", 5) == 0) { 551 p = str + 5;
    CID 641215: (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 "||".
    552 SKIP_WHITESPACE(p);
    553 if ((n = resolve_qwkconf(atoi(p))) != INVALID_SUB) {
    554 FIND_WHITESPACE(p);
    555 SKIP_WHITESPACE(p);
    556 if (strchr(p, 'D'))
    557 subscan[n].cfg &= ~SUB_CFG_NSCAN;
    /un_rep.cpp: 555 in sbbs_t::unpack_rep(char *)()
    549 break;
    550 if (strnicmp(str, "AREA ", 5) == 0) { 551 p = str + 5;
    552 SKIP_WHITESPACE(p);
    553 if ((n = resolve_qwkconf(atoi(p))) != INVALID_SUB) {
    554 FIND_WHITESPACE(p);
    CID 641215: (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 "||".
    555 SKIP_WHITESPACE(p);
    556 if (strchr(p, 'D'))
    557 subscan[n].cfg &= ~SUB_CFG_NSCAN;
    558 else if (strchr(p, 'a') || strchr(p, 'g'))
    559 subscan[n].cfg |= SUB_CFG_NSCAN;
    560 else if (strchr(p, 'p'))

    ** CID 641214: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /sbbsecho.c: 1603 in check_elists()


    _____________________________________________________________________________________________
    *** CID 641214: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /sbbsecho.c: 1603 in check_elists()
    1597 break;
    1598 p = str;
    1599 SKIP_WHITESPACE(p); 1600 if (*p == ';') /* Ignore Comment Lines */
    1601 continue;
    1602 tp = p;
    CID 641214: Integer handling issues (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 "||".
    1603 FIND_WHITESPACE(tp); 1604 *tp = '\0';
    1605 if (!stricmp(areatag, p)) {
    1606 match = true; 1607 break;
    1608 }

    ** CID 641213: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /userdat.c: 3492 in alias()


    _____________________________________________________________________________________________
    *** CID 641213: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /userdat.c: 3492 in alias()
    3486 break;
    3487 np = line;
    3488 SKIP_WHITESPACE(np);
    3489 if (*np == ';' || *np == 0) /* no name value, or comment */
    3490 continue;
    3491 tp = np;
    CID 641213: Integer handling issues (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 "||".
    3492 FIND_WHITESPACE(tp);
    3493
    3494 if (*tp == 0) /* no alias value */
    3495 continue;
    3496 *tp = 0;
    3497

    ** CID 641212: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /sbbsecho.c: 1531 in netmail_arealist()


    _____________________________________________________________________________________________
    *** CID 641212: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /sbbsecho.c: 1531 in netmail_arealist()
    1525 truncsp(str);
    1526 p = str;
    1527 SKIP_WHITESPACE(p);
    1528 if (*p == 0 || *p == ';') /* Ignore Blank and Comment Lines */
    1529 continue;
    1530 tp = p; >>> CID 641212: Integer handling issues (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 "||".
    1531 FIND_WHITESPACE(tp);
    1532 *tp = '\0';
    1533 if (find_linked_area(p, addr) == SUB_NOT_FOUND) {
    1534 if (strListFind(area_list, p, /* case_sensitive */ false) < 0)
    1535 strListPush(&area_list, p);
    1536 }

    ** CID 641211: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /tmp/sbbs-Jan-14-2026/src/xpdev/ini_file.c: 232 in key_name()


    _____________________________________________________________________________________________
    *** CID 641211: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /tmp/sbbs-Jan-14-2026/src/xpdev/ini_file.c: 232 in key_name()
    226 *vp = NULL;
    227
    228 if (p == NULL)
    229 return NULL;
    230
    231 /* Parse value name */
    CID 641211: Integer handling issues (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 "||".
    232 SKIP_WHITESPACE(p);
    233 if (*p == INI_COMMENT_CHAR)
    234 return NULL;
    235 if (*p == INI_OPEN_SECTION_CHAR)
    236 return INI_NEW_SECTION;
    237 equal = strchr(p, '=');

    ** CID 641210: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /wordwrap.c: 211 in get_ws_len()


    _____________________________________________________________________________________________
    *** CID 641210: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /wordwrap.c: 211 in get_ws_len()
    205 {
    206 struct section_len ret = {0, 0};
    207
    208 for (ret.bytes = 0; ; ret.bytes++) {
    209 if (!buf[ret.bytes])
    210 break;
    CID 641210: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)buf[ret.bytes] == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    211 if (!IS_WHITESPACE(buf[ret.bytes]))
    212 break;
    213 if (buf[ret.bytes] == '\t') {
    214 ret.len++;
    215 while ((ret.len + col) % 8)
    216 ret.len++;

    ** CID 641209: (CONSTANT_EXPRESSION_RESULT) /tmp/sbbs-Jan-14-2026/src/xpdev/ini_file.c: 83 in section_name() /tmp/sbbs-Jan-14-2026/src/xpdev/ini_file.c: 87 in section_name()


    _____________________________________________________________________________________________
    *** CID 641209: (CONSTANT_EXPRESSION_RESULT) /tmp/sbbs-Jan-14-2026/src/xpdev/ini_file.c: 83 in section_name()
    77 }
    78
    79 static char* section_name(char* p)
    80 {
    81 char* tp;
    82
    CID 641209: (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 "||".
    83 SKIP_WHITESPACE(p);
    84 if (*p != INI_OPEN_SECTION_CHAR)
    85 return NULL;
    86 p++;
    87 SKIP_WHITESPACE(p);
    88 tp = strrchr(p, INI_CLOSE_SECTION_CHAR); /tmp/sbbs-Jan-14-2026/src/xpdev/ini_file.c: 87 in section_name()
    81 char* tp;
    82
    83 SKIP_WHITESPACE(p);
    84 if (*p != INI_OPEN_SECTION_CHAR)
    85 return NULL;
    86 p++;
    CID 641209: (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 "||".
    87 SKIP_WHITESPACE(p);
    88 tp = strrchr(p, INI_CLOSE_SECTION_CHAR);
    89 if (tp == NULL)
    90 return NULL;
    91 *tp = 0;
    92 truncsp(p);

    ** CID 641208: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /mailsrvr.cpp: 1989 in parse_mail_address(const char *, char *, unsigned long, char *, unsigned long)()


    _____________________________________________________________________________________________
    *** CID 641208: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /mailsrvr.cpp: 1989 in parse_mail_address(const char *, char *, unsigned long, char *, unsigned long)()
    1983
    1984 /* Get the address */
    1985 if ((tp = (char*)strchr(p, '<')) != NULL)
    1986 tp++;
    1987 else
    1988 tp = (char*)p;
    CID 641208: Integer handling issues (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 "||".
    1989 SKIP_WHITESPACE(tp);
    1990 sprintf(addr, "%.*s", (int)addr_len, tp);
    1991 truncstr(addr, ">( ");
    1992
    1993 if (name != NULL) {
    1994 SAFECOPY(tmp, p);

    ** CID 641207: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /sbbsecho.c: 2496 in process_areamgr()


    _____________________________________________________________________________________________
    *** CID 641207: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /sbbsecho.c: 2496 in process_areamgr()
    2490 }
    2491
    2492 m = strlen(p);
    2493 add_area = strListInit();
    2494 del_area = strListInit();
    2495 for (l = 0; l < m; l++) {
    CID 641207: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)p[l] == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    2496 while (*(p + l) && IS_WHITESPACE(*(p + l))) l++;
    2497 while (*(p + l) == CTRL_A) { /* Ignore kludge lines June-13-2004 */
    2498 while (*(p + l) && *(p + l) != '\r') l++;
    2499 continue;
    2500 }
    2501 if (!(*(p + l)))

    ** CID 641206: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /tmp/sbbs-Jan-14-2026/src/xpdev/ini_file.c: 118 in section_match()


    _____________________________________________________________________________________________
    *** CID 641206: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /tmp/sbbs-Jan-14-2026/src/xpdev/ini_file.c: 118 in section_match() 112 /* Search for matches */
    113 for (i = 0; names[i] != NULL && !found; i++)
    114 for (j = 0; comps[j] != NULL && !found; j++) {
    115 n = names[i];
    116 SKIP_WHITESPACE(n);
    117 c = comps[j];
    CID 641206: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*c == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    118 SKIP_WHITESPACE(c);
    119 if (case_sensitive)
    120 found = strcmp(n, c) == 0;
    121 else
    122 found = stricmp(n, c) == 0;
    123 }

    ** CID 641205: (CONSTANT_EXPRESSION_RESULT)
    /sbbsecho.c: 2225 in areamgr_command()
    /sbbsecho.c: 2191 in areamgr_command()
    /sbbsecho.c: 2224 in areamgr_command()
    /sbbsecho.c: 2335 in areamgr_command()
    /sbbsecho.c: 2156 in areamgr_command()
    /sbbsecho.c: 2273 in areamgr_command()
    /sbbsecho.c: 2192 in areamgr_command()
    /sbbsecho.c: 2336 in areamgr_command()
    /sbbsecho.c: 2250 in areamgr_command()
    /sbbsecho.c: 2155 in areamgr_command()
    /sbbsecho.c: 2274 in areamgr_command()
    /sbbsecho.c: 2306 in areamgr_command()
    /sbbsecho.c: 2249 in areamgr_command()


    _____________________________________________________________________________________________
    *** CID 641205: (CONSTANT_EXPRESSION_RESULT)
    /sbbsecho.c: 2225 in areamgr_command()
    2219 }
    2220
    2221 if (strnicmp(instr, "PKTPWD ", 7) == 0) {
    2222 char pktpwd[FIDO_PASS_LEN + 1]; /* Packet password for this node */
    2223 char* p = instr;
    2224 FIND_WHITESPACE(p);
    CID 641205: (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 "||".
    2225 SKIP_WHITESPACE(p);
    2226 SAFECOPY(pktpwd, p);
    2227 if (!stricmp(pktpwd, nodecfg->pktpwd)) {
    2228 snprintf(str, sizeof str, "Your packet password was already set to '%s'."
    2229 , nodecfg->pktpwd);
    2230 lprintf(LOG_INFO, "AreaMgr (for %s) %s", faddrtoa(&addr), str);
    /sbbsecho.c: 2191 in areamgr_command()
    2185 return true;
    2186 }
    2187
    2188 if (strnicmp(instr, "PASSWORD ", 9) == 0 || strnicmp(instr, "PWD ", 4) == 0) {
    2189 char password[FIDO_SUBJ_LEN]; /* AreaMgr password for this node */
    2190 char* p = instr;
    CID 641205: (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 "||".
    2191 FIND_WHITESPACE(p);
    2192 SKIP_WHITESPACE(p);
    2193 SAFECOPY(password, p);
    2194 if (strchr(password, ' ') != NULL) {
    2195 snprintf(str, sizeof str, "Your AreaMgr password cannot contain spaces.");
    2196 lprintf(LOG_INFO, "AreaMgr (for %s) %s", faddrtoa(&addr), str);
    /sbbsecho.c: 2224 in areamgr_command()
    2218 return true;
    2219 }
    2220
    2221 if (strnicmp(instr, "PKTPWD ", 7) == 0) {
    2222 char pktpwd[FIDO_PASS_LEN + 1]; /* Packet password for this node */
    2223 char* p = instr;
    CID 641205: (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 "||".
    2224 FIND_WHITESPACE(p);
    2225 SKIP_WHITESPACE(p);
    2226 SAFECOPY(pktpwd, p);
    2227 if (!stricmp(pktpwd, nodecfg->pktpwd)) {
    2228 snprintf(str, sizeof str, "Your packet password was already set to '%s'."
    2229 , nodecfg->pktpwd);
    /sbbsecho.c: 2335 in areamgr_command()
    2329 , str, /* dest: */ addr, /* src: */ NULL);
    2330 return true;
    2331 }
    2332
    2333 if (strnicmp(instr, "ECHOSTATS ", 10) == 0) {
    2334 char* p = instr;
    CID 641205: (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 "||".
    2335 FIND_WHITESPACE(p);
    2336 SKIP_WHITESPACE(p);
    2337 echostat_t* stat = get_echostat(p, /* create: */ false);
    2338 if (stat == NULL) {
    2339 lprintf(LOG_INFO, "AreaMgr (for %s) EchoStats request for unknown echo: %s", faddrtoa(&addr), p);
    2340 } else {
    /sbbsecho.c: 2156 in areamgr_command()
    2150 alter_config(nodecfg, "Name", to);
    2151 }
    2152
    2153 if (strnicmp(instr, "COMPRESSION ", 12) == 0 || strnicmp(instr, "COMPRESS ", 9) == 0) {
    2154 char* p = instr;
    2155 FIND_WHITESPACE(p);
    CID 641205: (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 "||".
    2156 SKIP_WHITESPACE(p);
    2157 if (!stricmp(p, "NONE"))
    2158 nodecfg->archive = SBBSECHO_ARCHIVE_NONE;
    2159 else {
    2160 for (u = 0; u < cfg.arcdefs; u++)
    2161 if (stricmp(p, cfg.arcdef[u].name) == 0)
    /sbbsecho.c: 2273 in areamgr_command()
    2267 create_netmail(to, /* msg: */ NULL, "TIC File Password Change Request", str, /* dest: */ addr, /* src: */ NULL);
    2268 return true;
    2269 }
    2270
    2271 if (strnicmp(instr, "NOTIFY ", 7) == 0) {
    2272 char* p = instr;
    CID 641205: (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 "||".
    2273 FIND_WHITESPACE(p);
    2274 SKIP_WHITESPACE(p);
    2275 if (alter_config(nodecfg, "Notify", p)) {
    2276 SAFEPRINTF2(str, "Your Notification Messages have been changed from '%s' to '%s'."
    2277 , nodecfg->send_notify ? "ON" : "OFF", p);
    2278 } else {
    /sbbsecho.c: 2192 in areamgr_command()
    2186 }
    2187
    2188 if (strnicmp(instr, "PASSWORD ", 9) == 0 || strnicmp(instr, "PWD ", 4) == 0) {
    2189 char password[FIDO_SUBJ_LEN]; /* AreaMgr password for this node */
    2190 char* p = instr;
    2191 FIND_WHITESPACE(p);
    CID 641205: (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 "||".
    2192 SKIP_WHITESPACE(p);
    2193 SAFECOPY(password, p);
    2194 if (strchr(password, ' ') != NULL) {
    2195 snprintf(str, sizeof str, "Your AreaMgr password cannot contain spaces.");
    2196 lprintf(LOG_INFO, "AreaMgr (for %s) %s", faddrtoa(&addr), str);
    2197 create_netmail(to, /* msg: */ NULL, "AreaMgr Password Change Request", str
    /sbbsecho.c: 2336 in areamgr_command()
    2330 return true;
    2331 }
    2332
    2333 if (strnicmp(instr, "ECHOSTATS ", 10) == 0) {
    2334 char* p = instr;
    2335 FIND_WHITESPACE(p);
    CID 641205: (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 "||".
    2336 SKIP_WHITESPACE(p);
    2337 echostat_t* stat = get_echostat(p, /* create: */ false);
    2338 if (stat == NULL) {
    2339 lprintf(LOG_INFO, "AreaMgr (for %s) EchoStats request for unknown echo: %s", faddrtoa(&addr), p);
    2340 } else {
    2341 FILE* fp;
    /sbbsecho.c: 2250 in areamgr_command()
    2244 }
    2245
    2246 if (strnicmp(instr, "TICPWD ", 7) == 0) {
    2247 char ticpwd[SBBSECHO_MAX_TICPWD_LEN + 1]; /* TIC File password for this node */
    2248 char* p = instr;
    2249 FIND_WHITESPACE(p);
    CID 641205: (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 "||".
    2250 SKIP_WHITESPACE(p);
    2251 SAFECOPY(ticpwd, p);
    2252 if (!stricmp(ticpwd, nodecfg->ticpwd)) {
    2253 snprintf(str, sizeof str, "Your TIC File password was already set to '%s'."
    2254 , nodecfg->ticpwd);
    2255 lprintf(LOG_INFO, "AreaMgr (for %s) %s", faddrtoa(&addr), str);
    /sbbsecho.c: 2155 in areamgr_command()
    2149 lprintf(LOG_INFO, "AreaMgr (for %s) Changing name to: %s", faddrtoa(&addr), to);
    2150 alter_config(nodecfg, "Name", to);
    2151 }
    2152
    2153 if (strnicmp(instr, "COMPRESSION ", 12) == 0 || strnicmp(instr, "COMPRESS ", 9) == 0) {
    2154 char* p = instr;
    CID 641205: (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 "||".
    2155 FIND_WHITESPACE(p);
    2156 SKIP_WHITESPACE(p);
    2157 if (!stricmp(p, "NONE"))
    2158 nodecfg->archive = SBBSECHO_ARCHIVE_NONE;
    2159 else {
    2160 for (u = 0; u < cfg.arcdefs; u++)
    /sbbsecho.c: 2274 in areamgr_command()
    2268 return true;
    2269 }
    2270
    2271 if (strnicmp(instr, "NOTIFY ", 7) == 0) {
    2272 char* p = instr;
    2273 FIND_WHITESPACE(p);
    CID 641205: (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 "||".
    2274 SKIP_WHITESPACE(p);
    2275 if (alter_config(nodecfg, "Notify", p)) {
    2276 SAFEPRINTF2(str, "Your Notification Messages have been changed from '%s' to '%s'."
    2277 , nodecfg->send_notify ? "ON" : "OFF", p);
    2278 } else {
    2279 SAFECOPY(str, "Error changing Notify Setting"); /sbbsecho.c: 2306 in areamgr_command()
    2300 return true;
    2301 }
    2302
    2303 // %RESCAN <area-tag> [R=<count> || D=<days>]
    2304 if (strnicmp(instr, "RESCAN ", 7) == 0) {
    2305 char* p = instr + 7;
    CID 641205: (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 "||".
    2306 SKIP_WHITESPACE(p);
    2307 char* tp = p;
    2308 FIND_WHITESPACE(tp);
    2309 if (*tp != '\0') {
    2310 *tp = '\0';
    2311 ++tp;
    /sbbsecho.c: 2249 in areamgr_command()
    2243 return true;
    2244 }
    2245
    2246 if (strnicmp(instr, "TICPWD ", 7) == 0) {
    2247 char ticpwd[SBBSECHO_MAX_TICPWD_LEN + 1]; /* TIC File password for this node */
    2248 char* p = instr;
    CID 641205: (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 "||".
    2249 FIND_WHITESPACE(p);
    2250 SKIP_WHITESPACE(p);
    2251 SAFECOPY(ticpwd, p);
    2252 if (!stricmp(ticpwd, nodecfg->ticpwd)) {
    2253 snprintf(str, sizeof str, "Your TIC File password was already set to '%s'."
    2254 , nodecfg->ticpwd);

    ** CID 641204: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /main.cpp: 5749 in bbs_thread()


    _____________________________________________________________________________________________
    *** CID 641204: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /main.cpp: 5749 in bbs_thread()
    5743 /* ToDo: Make ident timeout configurable */
    5744 if (identify(&client_addr, inet_addrport(&client_addr), str, sizeof(str) - 1, /* timeout: */ 1)) {
    5745 lprintf(LOG_DEBUG, "%04d %s [%s] Ident Response: %s", client_socket, client.protocol, host_ip, str);
    5746 identity = strrchr(str, ':'); 5747 if (identity != NULL) {
    5748 identity++; /* skip colon */
    CID 641204: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
    "(unsigned char)*identity == CP437_NO_BREAK_SPACE" is always false regardless of the values of its operands. This occurs as the logical second operand of "||".
    5749 SKIP_WHITESPACE(identity);
    5750 if (*identity)
    5751 lprintf(LOG_INFO, "%04d %s [%s] Identity: %s", client_socket, client.protocol, host_ip, identity);
    5752 }
    5753 }
    5754 sbbs->cp437_out(crlf);

    ** CID 641203: (CONSTANT_EXPRESSION_RESULT)
    /netmail.cpp: 432 in sbbs_t::qwktonetmail(_IO_FILE *, char *, char *, unsigned char)()
    /netmail.cpp: 422 in sbbs_t::qwktonetmail(_IO_FILE *, char *, char *, unsigned char)()


    _____________________________________________________________________________________________
    *** CID 641203: (CONSTANT_EXPRESSION_RESULT)
    /netmail.cpp: 432 in sbbs_t::qwktonetmail(_IO_FILE *, char *, char *, unsigned char)()
    426 SAFECOPY(to, p);
    427 p += strlen(p) + 1;
    428 continue;
    429 }
    430 if (strncmp(p, "Subject:", 8) == 0) {
    431 p += 8;
    CID 641203: (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 "||".
    432 SKIP_WHITESPACE(p);
    433 char* tp = strchr(p, QWK_NEWLINE); /* chop off at first CR */
    434 if (tp != NULL)
    435 *tp = 0;
    436 subject = p;
    437 p += strlen(p) + 1;
    /netmail.cpp: 422 in sbbs_t::qwktonetmail(_IO_FILE *, char *, char *, unsigned char)()
    416 SAFECOPY(to, into);
    417
    418 // Parse QWKE Kludge Lines here:
    419 while (p < end && *p != QWK_NEWLINE) {
    420 if (strncmp(p, "To:", 3) == 0) {
    421 p += 3;
    CID 641203: (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 "||".
    422 SKIP_WHITESPACE(p);
    423 char* tp = strchr(p, QWK_NEWLINE); /* chop off at first CR */
    424 if (tp != NULL)
    425 *tp = 0;
    426 SAFECOPY(to, p);
    427 p += strlen(p) + 1;

    ** CID 641202: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /mailsrvr.cpp: 1960 in dns_blacklisted(int, const char *, xp_sockaddr *, char *, char *, char *)()


    _____________________________________________________________________________________________
    *** CID 641202: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /mailsrvr.cpp: 1960 in dns_blacklisted(int, const char *, xp_sockaddr *, char *, char *, char *)()
    1954 continue;
    1955
    1956 sprintf(list, "%.100s", p);
    1957
    1958 /* terminate */
    1959 tp = p;
    CID 641202: Integer handling issues (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 "||".
    1960 FIND_WHITESPACE(tp);
    1961 *tp = 0;
    1962
    1963 found = rblchk(sock, prot, addr, p);
    1964 }
    1965 fclose(fp);

    ** CID 641201: (CONSTANT_EXPRESSION_RESULT)
    /netmail.cpp: 1185 in sbbs_t::inetmail(const char *, const char *, int, smb_t *, smbmsg_t *, char **)()
    /netmail.cpp: 1195 in sbbs_t::inetmail(const char *, const char *, int, smb_t *, smbmsg_t *, char **)()
    /netmail.cpp: 975 in sbbs_t::inetmail(const char *, const char *, int, smb_t *, smbmsg_t *, char **)()
    /netmail.cpp: 1202 in sbbs_t::inetmail(const char *, const char *, int, smb_t *, smbmsg_t *, char **)()


    _____________________________________________________________________________________________
    *** CID 641201: (CONSTANT_EXPRESSION_RESULT)
    /netmail.cpp: 1185 in sbbs_t::inetmail(const char *, const char *, int, smb_t *, smbmsg_t *, char **)()
    1179 break;
    1180 }
    1181
    1182 /* Get destination user address */
    1183 if ((p = strrchr(rcpt_list[rcpt_count], '<')) != NULL) {
    1184 p++;
    CID 641201: (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 "||".
    1185 SKIP_WHITESPACE(p);
    1186 SAFECOPY(addr, p);
    1187 p = strrchr(addr, '>');
    1188 if (p == NULL) {
    1189 bprintf(text[InvalidNetMailAddr], rcpt_list[rcpt_count]);
    1190 break;
    /netmail.cpp: 1195 in sbbs_t::inetmail(const char *, const char *, int, smb_t *, smbmsg_t *, char **)()
    1189 bprintf(text[InvalidNetMailAddr], rcpt_list[rcpt_count]);
    1190 break;
    1191 }
    1192 *p = 0;
    1193 } else {
    1194 p = rcpt_list[rcpt_count];
    CID 641201: (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 "||".
    1195 SKIP_WHITESPACE(p);
    1196 SAFECOPY(addr, p);
    1197 }
    1198 truncsp(addr);
    1199
    1200 /* Get destination user name */
    /netmail.cpp: 975 in sbbs_t::inetmail(const char *, const char *, int, smb_t *, smbmsg_t *, char **)()
    969 bprintf(text[InvalidNetMailAddr], p);
    970 continue;
    971 }
    972 while (at > p && *at > ' ')
    973 at--;
    974 p = at;
    CID 641201: (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 "||".
    975 SKIP_WHITESPACE(p);
    976 uint16_t net_type = smb_netaddr_type(p);
    977 if (net_type != NET_INTERNET) {
    978 bprintf(text[InvalidNetMailAddr], p);
    979 break;
    980 }
    /netmail.cpp: 1202 in sbbs_t::inetmail(const char *, const char *, int, smb_t *, smbmsg_t *, char **)()
    1196 SAFECOPY(addr, p);
    1197 }
    1198 truncsp(addr);
    1199
    1200 /* Get destination user name */
    1201 p = rcpt_list[rcpt_count];
    CID 641201: (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 "||".
    1202 SKIP_WHITESPACE(p);
    1203 SAFECOPY(name, p);
    1204 p = strrchr(name, '<');
    1205 if (!p)
    1206 p = strrchr(name, '@');
    1207 if (!p)

    ** CID 641200: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.c: 1534 in ftpalias()
    /ftpsrvr.c: 1547 in ftpalias()


    _____________________________________________________________________________________________
    *** CID 641200: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.c: 1534 in ftpalias()
    1528
    1529 while (!feof(fp)) {
    1530 if (!fgets(line, sizeof(line), fp))
    1531 break;
    1532
    1533 p = line; /* alias */
    CID 641200: (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 "||".
    1534 SKIP_WHITESPACE(p);
    1535 if (*p == ';') /* comment */
    1536 continue;
    1537
    1538 tp = p; /* terminator */
    1539 FIND_WHITESPACE(tp);
    /ftpsrvr.c: 1547 in ftpalias()
    1541 *tp = 0;
    1542
    1543 if (stricmp(p, alias)) /* Not a match */
    1544 continue;
    1545
    1546 p = tp + 1; /* filename */
    CID 641200: (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 "||".
    1547 SKIP_WHITESPACE(p);
    1548
    1549 tp = p; /* terminator */
    1550 FIND_WHITESPACE(tp);
    1551 if (*tp)
    1552 *tp = 0;


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


    ----==_mimepart_69679e3a9f33a_26617a2afbc97ad9ac59811
    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> 113</li>
    <li>
    7 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 20 of 113 defect(s)</li>
    </ul>

    <h3>Defect Details</h3>
    <pre>
    ** CID 641219: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /userdat.c: 3499 in alias()


    _____________________________________________________________________________________________
    *** CID 641219: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /userdat.c: 3499 in alias()
    3493
    3494 if (*tp == 0) /* no alias value */
    3495 continue;
    3496 *tp = 0;
    3497
    3498 vp = tp + 1;
    &gt;&gt;&gt; CID 641219: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
    &gt;&gt;&gt; &quot;(unsigned char)*vp == 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;.
    3499 SKIP_WHITESPACE(vp);
    3500 truncsp(vp);
    3501 if (*vp == 0) /* no value */
    3502 continue;
    3503
    3504 if (*np == &#39;*&#39;) {

    ** CID 641218: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.c: 3761 in ctrl_thread()
    /ftpsrvr.c: 4084 in ctrl_thread()


    _____________________________________________________________________________________________
    *** CID 641218: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.c: 3761 in ctrl_thread()
    3755 tp = np; /* terminator pointer */
    3756 FIND_WHITESPACE(tp);
    3757 if (*tp)
    3758 *tp = 0;
    3759
    3760 dp = tp + 1; /* description pointer */
    &gt;&gt;&gt; CID 641218: (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;.
    3761 SKIP_WHITESPACE(dp);
    3762 truncsp(dp);
    3763
    3764 if (stricmp(dp, BBS_HIDDEN_ALIAS) == 0)
    3765 continue;
    3766
    /ftpsrvr.c: 4084 in ctrl_thread()
    4078 tp = np; /* terminator pointer */
    4079 FIND_WHITESPACE(tp); 4080 if (*tp)
    4081 *tp = 0;
    4082
    4083 dp = tp + 1; /* description pointer */
    &gt;&gt;&gt; CID 641218: (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;.
    4084 SKIP_WHITESPACE(dp); 4085 truncsp(dp);
    4086
    4087 if (stricmp(dp, BBS_HIDDEN_ALIAS) == 0)
    4088 continue;
    4089

    ** CID 641217: (CONSTANT_EXPRESSION_RESULT) /tmp/sbbs-Jan-14-2026/src/smblib/smbstr.c: 353 in smb_netaddr_type() /tmp/sbbs-Jan-14-2026/src/smblib/smbstr.c: 343 in smb_netaddr_type()


    _____________________________________________________________________________________________
    *** CID 641217: (CONSTANT_EXPRESSION_RESULT) /tmp/sbbs-Jan-14-2026/src/smblib/smbstr.c: 353 in smb_netaddr_type()
    347 return NET_FIDO;
    348 return NET_NONE;
    349 }
    350 if (p == str)
    351 return NET_UNKNOWN;
    352 p++;
    &gt;&gt;&gt; CID 641217: (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;.
    353 SKIP_WHITESPACE(p);
    354 if (*p == 0)
    355 return NET_UNKNOWN;
    356
    357 type = smb_get_net_type_by_addr(p);
    358 if (type == NET_INTERNET &amp;&amp; strchr(str, &#39; &#39;) != NULL)
    /tmp/sbbs-Jan-14-2026/src/smblib/smbstr.c: 343 in smb_netaddr_type()
    337 const char* p;
    338
    339 if (str == NULL || IS_WHITESPACE(*str))
    340 return NET_NONE;
    341 if ((p = strchr(str, &#39;@&#39;)) == NULL) {
    342 p = str;
    &gt;&gt;&gt; CID 641217: (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;.
    343 SKIP_WHITESPACE(p);
    344 if (*p == 0)
    345 return NET_NONE;
    346 if (smb_get_net_type_by_addr(p) == NET_FIDO)
    347 return NET_FIDO;
    348 return NET_NONE;

    ** CID 641216: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /sbbsecho.c: 6561 in read_areafile_bbs()


    _____________________________________________________________________________________________
    *** CID 641216: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /sbbsecho.c: 6561 in read_areafile_bbs()
    6555 lprintf(LOG_ERR, &quot;ERROR allocating memory for area #%u.&quot;, cfg.areas + 1);
    6556 bail(1);
    6557 return;
    6558 }
    6559 sprintf(tmp_code, &quot;%-.*s&quot;, LEN_EXTCODE, p); 6560 tp = tmp_code;
    &gt;&gt;&gt; CID 641216: Integer handling issues (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;.
    6561 FIND_WHITESPACE(tp);
    6562 *tp = &#39;\0&#39;;
    6563 for (i = 0; i &lt; scfg.total_subs; i++)
    6564 if (!stricmp(tmp_code, scfg.sub[i]-&gt;code)) 6565 break;
    6566 if (i &lt; scfg.total_subs)

    ** CID 641215: (CONSTANT_EXPRESSION_RESULT)
    /un_rep.cpp: 567 in sbbs_t::unpack_rep(char *)()
    /un_rep.cpp: 554 in sbbs_t::unpack_rep(char *)()
    /un_rep.cpp: 570 in sbbs_t::unpack_rep(char *)()
    /un_rep.cpp: 569 in sbbs_t::unpack_rep(char *)()
    /un_rep.cpp: 552 in sbbs_t::unpack_rep(char *)()
    /un_rep.cpp: 555 in sbbs_t::unpack_rep(char *)()


    _____________________________________________________________________________________________
    *** CID 641215: (CONSTANT_EXPRESSION_RESULT)
    /un_rep.cpp: 567 in sbbs_t::unpack_rep(char *)()
    561 subscan[n].cfg |= SUB_CFG_NSCAN | SUB_CFG_YSCAN;
    562 }
    563 continue;
    564 }
    565 if (strnicmp(str, &quot;RESET &quot;, 6) == 0) {
    566 p = str + 6;
    &gt;&gt;&gt; CID 641215: (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;.
    567 SKIP_WHITESPACE(p);
    568 if ((n = resolve_qwkconf(atoi(p))) != INVALID_SUB) {
    569 FIND_WHITESPACE(p);
    570 SKIP_WHITESPACE(p);
    571 /* If the [#ofmessages] is blank then the pointer should be set back to the start of the message base */
    572 if (*p == 0) /un_rep.cpp: 554 in sbbs_t::unpack_rep(char *)()
    548 if (!fgets(str, sizeof(str) - 1, fp)) 549 break;
    550 if (strnicmp(str, &quot;AREA &quot;, 5) == 0) {
    551 p = str + 5;
    552 SKIP_WHITESPACE(p);
    553 if ((n = resolve_qwkconf(atoi(p))) != INVALID_SUB) {
    &gt;&gt;&gt; CID 641215: (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;.
    554 FIND_WHITESPACE(p);
    555 SKIP_WHITESPACE(p);
    556 if (strchr(p, &#39;D&#39;))
    557 subscan[n].cfg &amp;= ~SUB_CFG_NSCAN;
    558 else if (strchr(p, &#39;a&#39;) || strchr(p, &#39;g&#39;))
    559 subscan[n].cfg |= SUB_CFG_NSCAN;
    /un_rep.cpp: 570 in sbbs_t::unpack_rep(char *)()
    564 }
    565 if (strnicmp(str, &quot;RESET &quot;, 6) == 0) {
    566 p = str + 6;
    567 SKIP_WHITESPACE(p);
    568 if ((n = resolve_qwkconf(atoi(p))) != INVALID_SUB) {
    569 FIND_WHITESPACE(p); &gt;&gt;&gt; CID 641215: (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;.
    570 SKIP_WHITESPACE(p);
    571 /* If the [#ofmessages] is blank then the pointer should be set back to the start of the message base */
    572 if (*p == 0)
    573 subscan[n].ptr = 0;
    574 else {
    575 /* otherwise it should be set back [#ofmessages] back from the end of the message base. */
    /un_rep.cpp: 569 in sbbs_t::unpack_rep(char *)()
    563 continue;
    564 }
    565 if (strnicmp(str, &quot;RESET &quot;, 6) == 0) {
    566 p = str + 6;
    567 SKIP_WHITESPACE(p);
    568 if ((n = resolve_qwkconf(atoi(p))) != INVALID_SUB) {
    &gt;&gt;&gt; CID 641215: (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;.
    569 FIND_WHITESPACE(p);
    570 SKIP_WHITESPACE(p);
    571 /* If the [#ofmessages] is blank then the pointer should be set back to the start of the message base */
    572 if (*p == 0)
    573 subscan[n].ptr = 0;
    574 else {
    /un_rep.cpp: 552 in sbbs_t::unpack_rep(char *)()
    546 if (fp != NULL) {
    547 while (!feof(fp)) {
    548 if (!fgets(str, sizeof(str) - 1, fp)) 549 break;
    550 if (strnicmp(str, &quot;AREA &quot;, 5) == 0) {
    551 p = str + 5;
    &gt;&gt;&gt; CID 641215: (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;.
    552 SKIP_WHITESPACE(p);
    553 if ((n = resolve_qwkconf(atoi(p))) != INVALID_SUB) {
    554 FIND_WHITESPACE(p);
    555 SKIP_WHITESPACE(p);
    556 if (strchr(p, &#39;D&#39;))
    557 subscan[n].cfg &amp;= ~SUB_CFG_NSCAN;
    /un_rep.cpp: 555 in sbbs_t::unpack_rep(char *)()
    549 break;
    550 if (strnicmp(str, &quot;AREA &quot;, 5) == 0) {
    551 p = str + 5;
    552 SKIP_WHITESPACE(p);
    553 if ((n = resolve_qwkconf(atoi(p))) != INVALID_SUB) {
    554 FIND_WHITESPACE(p); &gt;&gt;&gt; CID 641215: (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;.
    555 SKIP_WHITESPACE(p);
    556 if (strchr(p, &#39;D&#39;))
    557 subscan[n].cfg &amp;= ~SUB_CFG_NSCAN;
    558 else if (strchr(p, &#39;a&#39;) || strchr(p, &#39;g&#39;))
    559 subscan[n].cfg |= SUB_CFG_NSCAN;
    560 else if (strchr(p, &#39;p&#39;))

    ** CID 641214: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /sbbsecho.c: 1603 in check_elists()


    _____________________________________________________________________________________________
    *** CID 641214: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /sbbsecho.c: 1603 in check_elists()
    1597 break;
    1598 p = str;
    1599 SKIP_WHITESPACE(p); 1600 if (*p == &#39;;&#39;) /* Ignore Comment Lines */
    1601 continue;
    1602 tp = p;
    &gt;&gt;&gt; CID 641214: Integer handling issues (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;.
    1603 FIND_WHITESPACE(tp); 1604 *tp = &#39;\0&#39;; 1605 if (!stricmp(areatag, p)) {
    1606 match = true; 1607 break;
    1608 }

    ** CID 641213: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /userdat.c: 3492 in alias()


    _____________________________________________________________________________________________
    *** CID 641213: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /userdat.c: 3492 in alias()
    3486 break;
    3487 np = line;
    3488 SKIP_WHITESPACE(np);
    3489 if (*np == &#39;;&#39; || *np == 0) /* no name value, or comment */
    3490 continue;
    3491 tp = np;
    &gt;&gt;&gt; CID 641213: Integer handling issues (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;.
    3492 FIND_WHITESPACE(tp);
    3493
    3494 if (*tp == 0) /* no alias value */
    3495 continue;
    3496 *tp = 0;
    3497

    ** CID 641212: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /sbbsecho.c: 1531 in netmail_arealist()


    _____________________________________________________________________________________________
    *** CID 641212: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /sbbsecho.c: 1531 in netmail_arealist()
    1525 truncsp(str);
    1526 p = str;
    1527 SKIP_WHITESPACE(p);
    1528 if (*p == 0 || *p == &#39;;&#39;) /* Ignore Blank and Comment Lines */
    1529 continue;
    1530 tp = p; &gt;&gt;&gt; CID 641212: Integer handling issues (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;.
    1531 FIND_WHITESPACE(tp);
    1532 *tp = &#39;\0&#39;;
    1533 if (find_linked_area(p, addr) == SUB_NOT_FOUND) {
    1534 if (strListFind(area_list, p, /* case_sensitive */ false) &lt; 0)
    1535 strListPush(&amp;area_list, p);
    1536 }

    ** CID 641211: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /tmp/sbbs-Jan-14-2026/src/xpdev/ini_file.c: 232 in key_name()


    _____________________________________________________________________________________________
    *** CID 641211: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /tmp/sbbs-Jan-14-2026/src/xpdev/ini_file.c: 232 in key_name()
    226 *vp = NULL;
    227
    228 if (p == NULL)
    229 return NULL;
    230
    231 /* Parse value name */
    &gt;&gt;&gt; CID 641211: Integer handling issues (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;.
    232 SKIP_WHITESPACE(p);
    233 if (*p == INI_COMMENT_CHAR)
    234 return NULL;
    235 if (*p == INI_OPEN_SECTION_CHAR)
    236 return INI_NEW_SECTION;
    237 equal = strchr(p, &#39;=&#39;);

    ** CID 641210: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /wordwrap.c: 211 in get_ws_len()


    _____________________________________________________________________________________________
    *** CID 641210: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /wordwrap.c: 211 in get_ws_len()
    205 {
    206 struct section_len ret = {0, 0};
    207
    208 for (ret.bytes = 0; ; ret.bytes++) {
    209 if (!buf[ret.bytes])
    210 break;
    &gt;&gt;&gt; CID 641210: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
    &gt;&gt;&gt; &quot;(unsigned char)buf[ret.bytes] == 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;.
    211 if (!IS_WHITESPACE(buf[ret.bytes]))
    212 break;
    213 if (buf[ret.bytes] == &#39;\t&#39;) {
    214 ret.len++;
    215 while ((ret.len + col) % 8)
    216 ret.len++;

    ** CID 641209: (CONSTANT_EXPRESSION_RESULT) /tmp/sbbs-Jan-14-2026/src/xpdev/ini_file.c: 83 in section_name() /tmp/sbbs-Jan-14-2026/src/xpdev/ini_file.c: 87 in section_name()


    _____________________________________________________________________________________________
    *** CID 641209: (CONSTANT_EXPRESSION_RESULT) /tmp/sbbs-Jan-14-2026/src/xpdev/ini_file.c: 83 in section_name()
    77 }
    78
    79 static char* section_name(char* p)
    80 {
    81 char* tp;
    82
    &gt;&gt;&gt; CID 641209: (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;.
    83 SKIP_WHITESPACE(p);
    84 if (*p != INI_OPEN_SECTION_CHAR)
    85 return NULL;
    86 p++;
    87 SKIP_WHITESPACE(p);
    88 tp = strrchr(p, INI_CLOSE_SECTION_CHAR); /tmp/sbbs-Jan-14-2026/src/xpdev/ini_file.c: 87 in section_name()
    81 char* tp;
    82
    83 SKIP_WHITESPACE(p);
    84 if (*p != INI_OPEN_SECTION_CHAR)
    85 return NULL;
    86 p++;
    &gt;&gt;&gt; CID 641209: (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;.
    87 SKIP_WHITESPACE(p);
    88 tp = strrchr(p, INI_CLOSE_SECTION_CHAR);
    89 if (tp == NULL)
    90 return NULL;
    91 *tp = 0;
    92 truncsp(p);

    ** CID 641208: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /mailsrvr.cpp: 1989 in parse_mail_address(const char *, char *, unsigned long, char *, unsigned long)()


    _____________________________________________________________________________________________
    *** CID 641208: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /mailsrvr.cpp: 1989 in parse_mail_address(const char *, char *, unsigned long, char *, unsigned long)()
    1983
    1984 /* Get the address */
    1985 if ((tp = (char*)strchr(p, &#39;&lt;&#39;)) != NULL)
    1986 tp++;
    1987 else
    1988 tp = (char*)p;
    &gt;&gt;&gt; CID 641208: Integer handling issues (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;.
    1989 SKIP_WHITESPACE(tp);
    1990 sprintf(addr, &quot;%.*s&quot;, (int)addr_len, tp);
    1991 truncstr(addr, &quot;&gt;( &quot;);
    1992
    1993 if (name != NULL) {
    1994 SAFECOPY(tmp, p);

    ** CID 641207: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /sbbsecho.c: 2496 in process_areamgr()


    _____________________________________________________________________________________________
    *** CID 641207: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /sbbsecho.c: 2496 in process_areamgr()
    2490 }
    2491
    2492 m = strlen(p);
    2493 add_area = strListInit();
    2494 del_area = strListInit();
    2495 for (l = 0; l &lt; m; l++) {
    &gt;&gt;&gt; CID 641207: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
    &gt;&gt;&gt; &quot;(unsigned char)p[l] == 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;.
    2496 while (*(p + l) &amp;&amp; IS_WHITESPACE(*(p + l))) l++;
    2497 while (*(p + l) == CTRL_A) { /* Ignore kludge lines June-13-2004 */
    2498 while (*(p + l) &amp;&amp; *(p + l) != &#39;\r&#39;) l++;
    2499 continue;
    2500 }
    2501 if (!(*(p + l)))

    ** CID 641206: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /tmp/sbbs-Jan-14-2026/src/xpdev/ini_file.c: 118 in section_match()


    _____________________________________________________________________________________________
    *** CID 641206: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /tmp/sbbs-Jan-14-2026/src/xpdev/ini_file.c: 118 in section_match() 112 /* Search for matches */
    113 for (i = 0; names[i] != NULL &amp;&amp; !found; i++)
    114 for (j = 0; comps[j] != NULL &amp;&amp; !found; j++) { 115 n = names[i];
    116 SKIP_WHITESPACE(n);
    117 c = comps[j];
    &gt;&gt;&gt; CID 641206: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
    &gt;&gt;&gt; &quot;(unsigned char)*c == 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;.
    118 SKIP_WHITESPACE(c);
    119 if (case_sensitive)
    120 found = strcmp(n, c) == 0;
    121 else
    122 found = stricmp(n, c) == 0;
    123 }

    ** CID 641205: (CONSTANT_EXPRESSION_RESULT)
    /sbbsecho.c: 2225 in areamgr_command()
    /sbbsecho.c: 2191 in areamgr_command()
    /sbbsecho.c: 2224 in areamgr_command()
    /sbbsecho.c: 2335 in areamgr_command()
    /sbbsecho.c: 2156 in areamgr_command()
    /sbbsecho.c: 2273 in areamgr_command()
    /sbbsecho.c: 2192 in areamgr_command()
    /sbbsecho.c: 2336 in areamgr_command()
    /sbbsecho.c: 2250 in areamgr_command()
    /sbbsecho.c: 2155 in areamgr_command()
    /sbbsecho.c: 2274 in areamgr_command()
    /sbbsecho.c: 2306 in areamgr_command()
    /sbbsecho.c: 2249 in areamgr_command()


    _____________________________________________________________________________________________
    *** CID 641205: (CONSTANT_EXPRESSION_RESULT)
    /sbbsecho.c: 2225 in areamgr_command()
    2219 }
    2220
    2221 if (strnicmp(instr, &quot;PKTPWD &quot;, 7) == 0) {
    2222 char pktpwd[FIDO_PASS_LEN + 1]; /* Packet password for this node */
    2223 char* p = instr;
    2224 FIND_WHITESPACE(p);
    &gt;&gt;&gt; CID 641205: (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;.
    2225 SKIP_WHITESPACE(p);
    2226 SAFECOPY(pktpwd, p);
    2227 if (!stricmp(pktpwd, nodecfg-&gt;pktpwd)) {
    2228 snprintf(str, sizeof str, &quot;Your packet password was already set to &#39;%s&#39;.&quot;
    2229 , nodecfg-&gt;pktpwd);
    2230 lprintf(LOG_INFO, &quot;AreaMgr (for %s) %s&quot;, faddrtoa(&amp;addr), str);
    /sbbsecho.c: 2191 in areamgr_command()
    2185 return true;
    2186 }
    2187
    2188 if (strnicmp(instr, &quot;PASSWORD &quot;, 9) == 0 || strnicmp(instr, &quot;PWD &quot;, 4) == 0) {
    2189 char password[FIDO_SUBJ_LEN]; /* AreaMgr password for this node */
    2190 char* p = instr;
    &gt;&gt;&gt; CID 641205: (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;.
    2191 FIND_WHITESPACE(p);
    2192 SKIP_WHITESPACE(p);
    2193 SAFECOPY(password, p);
    2194 if (strchr(password, &#39; &#39;) != NULL) {
    2195 snprintf(str, sizeof str, &quot;Your AreaMgr password cannot contain spaces.&quot;);
    2196 lprintf(LOG_INFO, &quot;AreaMgr (for %s) %s&quot;, faddrtoa(&amp;addr), str);
    /sbbsecho.c: 2224 in areamgr_command()
    2218 return true;
    2219 }
    2220
    2221 if (strnicmp(instr, &quot;PKTPWD &quot;, 7) == 0) {
    2222 char pktpwd[FIDO_PASS_LEN + 1]; /* Packet password for this node */
    2223 char* p = instr;
    &gt;&gt;&gt; CID 641205: (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;.
    2224 FIND_WHITESPACE(p);
    2225 SKIP_WHITESPACE(p);
    2226 SAFECOPY(pktpwd, p);
    2227 if (!stricmp(pktpwd, nodecfg-&gt;pktpwd)) {
    2228 snprintf(str, sizeof str, &quot;Your packet password was already set to &#39;%s&#39;.&quot;
    2229 , nodecfg-&gt;pktpwd);
    /sbbsecho.c: 2335 in areamgr_command()
    2329 , str, /* dest: */ addr, /* src: */ NULL);
    2330 return true;
    2331 }
    2332
    2333 if (strnicmp(instr, &quot;ECHOSTATS &quot;, 10) == 0) {
    2334 char* p = instr;
    &gt;&gt;&gt; CID 641205: (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;.
    2335 FIND_WHITESPACE(p);
    2336 SKIP_WHITESPACE(p);
    2337 echostat_t* stat = get_echostat(p, /* create: */ false);
    2338 if (stat == NULL) {
    2339 lprintf(LOG_INFO, &quot;AreaMgr (for %s) EchoStats request for unknown echo: %s&quot;, faddrtoa(&amp;addr), p);
    2340 } else {
    /sbbsecho.c: 2156 in areamgr_command()
    2150 alter_config(nodecfg, &quot;Name&quot;, to);
    2151 }
    2152
    2153 if (strnicmp(instr, &quot;COMPRESSION &quot;, 12) == 0 || strnicmp(instr, &quot;COMPRESS &quot;, 9) == 0) {
    2154 char* p = instr;
    2155 FIND_WHITESPACE(p);
    &gt;&gt;&gt; CID 641205: (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;.
    2156 SKIP_WHITESPACE(p);
    2157 if (!stricmp(p, &quot;NONE&quot;))
    2158 nodecfg-&gt;archive = SBBSECHO_ARCHIVE_NONE; 2159 else {
    2160 for (u = 0; u &lt; cfg.arcdefs; u++)
    2161 if (stricmp(p, cfg.arcdef[u].name) == 0)
    /sbbsecho.c: 2273 in areamgr_command()
    2267 create_netmail(to, /* msg: */ NULL, &quot;TIC File Password Change Request&quot;, str, /* dest: */ addr, /* src: */ NULL);
    2268 return true;
    2269 }
    2270
    2271 if (strnicmp(instr, &quot;NOTIFY &quot;, 7) == 0) {
    2272 char* p = instr;
    &gt;&gt;&gt; CID 641205: (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;.
    2273 FIND_WHITESPACE(p);
    2274 SKIP_WHITESPACE(p);
    2275 if (alter_config(nodecfg, &quot;Notify&quot;, p)) { 2276 SAFEPRINTF2(str, &quot;Your Notification Messages have been changed from &#39;%s&#39; to &#39;%s&#39;.&quot;
    2277 , nodecfg-&gt;send_notify ? &quot;ON&quot; : &quot;OFF&quot;, p);
    2278 } else {
    /sbbsecho.c: 2192 in areamgr_command()
    2186 }
    2187
    2188 if (strnicmp(instr, &quot;PASSWORD &quot;, 9) == 0 || strnicmp(instr, &quot;PWD &quot;, 4) == 0) {
    2189 char password[FIDO_SUBJ_LEN]; /* AreaMgr password for this node */
    2190 char* p = instr;
    2191 FIND_WHITESPACE(p);
    &gt;&gt;&gt; CID 641205: (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;.
    2192 SKIP_WHITESPACE(p);
    2193 SAFECOPY(password, p);
    2194 if (strchr(password, &#39; &#39;) != NULL) {
    2195 snprintf(str, sizeof str, &quot;Your AreaMgr password cannot contain spaces.&quot;);
    2196 lprintf(LOG_INFO, &quot;AreaMgr (for %s) %s&quot;, faddrtoa(&amp;addr), str);
    2197 create_netmail(to, /* msg: */ NULL, &quot;AreaMgr Password Change Request&quot;, str
    /sbbsecho.c: 2336 in areamgr_command()
    2330 return true;
    2331 }
    2332
    2333 if (strnicmp(instr, &quot;ECHOSTATS &quot;, 10) == 0) {
    2334 char* p = instr;
    2335 FIND_WHITESPACE(p);
    &gt;&gt;&gt; CID 641205: (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;.
    2336 SKIP_WHITESPACE(p);
    2337 echostat_t* stat = get_echostat(p, /* create: */ false);
    2338 if (stat == NULL) {
    2339 lprintf(LOG_INFO, &quot;AreaMgr (for %s) EchoStats request for unknown echo: %s&quot;, faddrtoa(&amp;addr), p);
    2340 } else {
    2341 FILE* fp;
    /sbbsecho.c: 2250 in areamgr_command()
    2244 }
    2245
    2246 if (strnicmp(instr, &quot;TICPWD &quot;, 7) == 0) {
    2247 char ticpwd[SBBSECHO_MAX_TICPWD_LEN + 1]; /* TIC File password for this node */
    2248 char* p = instr;
    2249 FIND_WHITESPACE(p);
    &gt;&gt;&gt; CID 641205: (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;.
    2250 SKIP_WHITESPACE(p);
    2251 SAFECOPY(ticpwd, p);
    2252 if (!stricmp(ticpwd, nodecfg-&gt;ticpwd)) {
    2253 snprintf(str, sizeof str, &quot;Your TIC File password was already set to &#39;%s&#39;.&quot;
    2254 , nodecfg-&gt;ticpwd);
    2255 lprintf(LOG_INFO, &quot;AreaMgr (for %s) %s&quot;, faddrtoa(&amp;addr), str);
    /sbbsecho.c: 2155 in areamgr_command()
    2149 lprintf(LOG_INFO, &quot;AreaMgr (for %s) Changing name to: %s&quot;, faddrtoa(&amp;addr), to);
    2150 alter_config(nodecfg, &quot;Name&quot;, to);
    2151 }
    2152
    2153 if (strnicmp(instr, &quot;COMPRESSION &quot;, 12) == 0 || strnicmp(instr, &quot;COMPRESS &quot;, 9) == 0) {
    2154 char* p = instr;
    &gt;&gt;&gt; CID 641205: (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;.
    2155 FIND_WHITESPACE(p);
    2156 SKIP_WHITESPACE(p);
    2157 if (!stricmp(p, &quot;NONE&quot;))
    2158 nodecfg-&gt;archive = SBBSECHO_ARCHIVE_NONE; 2159 else {
    2160 for (u = 0; u &lt; cfg.arcdefs; u++) /sbbsecho.c: 2274 in areamgr_command()
    2268 return true;
    2269 }
    2270
    2271 if (strnicmp(instr, &quot;NOTIFY &quot;, 7) == 0) {
    2272 char* p = instr;
    2273 FIND_WHITESPACE(p);
    &gt;&gt;&gt; CID 641205: (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;.
    2274 SKIP_WHITESPACE(p);
    2275 if (alter_config(nodecfg, &quot;Notify&quot;, p)) { 2276 SAFEPRINTF2(str, &quot;Your Notification Messages have been changed from &#39;%s&#39; to &#39;%s&#39;.&quot;
    2277 , nodecfg-&gt;send_notify ? &quot;ON&quot; : &quot;OFF&quot;, p);
    2278 } else {
    2279 SAFECOPY(str, &quot;Error changing Notify Setting&quot;);
    /sbbsecho.c: 2306 in areamgr_command()
    2300 return true;
    2301 }
    2302
    2303 // %RESCAN &lt;area-tag&gt; [R=&lt;count&gt; || D=&lt;days&gt;] 2304 if (strnicmp(instr, &quot;RESCAN &quot;, 7) == 0) {
    2305 char* p = instr + 7;
    &gt;&gt;&gt; CID 641205: (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;.
    2306 SKIP_WHITESPACE(p);
    2307 char* tp = p;
    2308 FIND_WHITESPACE(tp);
    2309 if (*tp != &#39;\0&#39;) {
    2310 *tp = &#39;\0&#39;;
    2311 ++tp;
    /sbbsecho.c: 2249 in areamgr_command()
    2243 return true;
    2244 }
    2245
    2246 if (strnicmp(instr, &quot;TICPWD &quot;, 7) == 0) {
    2247 char ticpwd[SBBSECHO_MAX_TICPWD_LEN + 1]; /* TIC File password for this node */
    2248 char* p = instr;
    &gt;&gt;&gt; CID 641205: (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;.
    2249 FIND_WHITESPACE(p);
    2250 SKIP_WHITESPACE(p);
    2251 SAFECOPY(ticpwd, p);
    2252 if (!stricmp(ticpwd, nodecfg-&gt;ticpwd)) {
    2253 snprintf(str, sizeof str, &quot;Your TIC File password was already set to &#39;%s&#39;.&quot;
    2254 , nodecfg-&gt;ticpwd);

    ** CID 641204: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /main.cpp: 5749 in bbs_thread()


    _____________________________________________________________________________________________
    *** CID 641204: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /main.cpp: 5749 in bbs_thread()
    5743 /* ToDo: Make ident timeout configurable */
    5744 if (identify(&amp;client_addr, inet_addrport(&amp;client_addr), str, sizeof(str) - 1, /* timeout: */ 1)) {
    5745 lprintf(LOG_DEBUG, &quot;%04d %s [%s] Ident Response: %s&quot;, client_socket, client.protocol, host_ip, str);
    5746 identity = strrchr(str, &#39;:&#39;);
    5747 if (identity != NULL) {
    5748 identity++; /* skip colon */
    &gt;&gt;&gt; CID 641204: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
    &gt;&gt;&gt; &quot;(unsigned char)*identity == 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;.
    5749 SKIP_WHITESPACE(identity);
    5750 if (*identity)
    5751 lprintf(LOG_INFO, &quot;%04d %s [%s] Identity: %s&quot;, client_socket, client.protocol, host_ip, identity);
    5752 }
    5753 }
    5754 sbbs-&gt;cp437_out(crlf);

    ** CID 641203: (CONSTANT_EXPRESSION_RESULT)
    /netmail.cpp: 432 in sbbs_t::qwktonetmail(_IO_FILE *, char *, char *, unsigned char)()
    /netmail.cpp: 422 in sbbs_t::qwktonetmail(_IO_FILE *, char *, char *, unsigned char)()


    _____________________________________________________________________________________________
    *** CID 641203: (CONSTANT_EXPRESSION_RESULT)
    /netmail.cpp: 432 in sbbs_t::qwktonetmail(_IO_FILE *, char *, char *, unsigned char)()
    426 SAFECOPY(to, p);
    427 p += strlen(p) + 1;
    428 continue;
    429 }
    430 if (strncmp(p, &quot;Subject:&quot;, 8) == 0) {
    431 p += 8;
    &gt;&gt;&gt; CID 641203: (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;.
    432 SKIP_WHITESPACE(p);
    433 char* tp = strchr(p, QWK_NEWLINE); /* chop off at first CR */
    434 if (tp != NULL)
    435 *tp = 0;
    436 subject = p;
    437 p += strlen(p) + 1;
    /netmail.cpp: 422 in sbbs_t::qwktonetmail(_IO_FILE *, char *, char *, unsigned char)()
    416 SAFECOPY(to, into);
    417
    418 // Parse QWKE Kludge Lines here:
    419 while (p &lt; end &amp;&amp; *p != QWK_NEWLINE) {
    420 if (strncmp(p, &quot;To:&quot;, 3) == 0) {
    421 p += 3;
    &gt;&gt;&gt; CID 641203: (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;.
    422 SKIP_WHITESPACE(p);
    423 char* tp = strchr(p, QWK_NEWLINE); /* chop off at first CR */
    424 if (tp != NULL)
    425 *tp = 0;
    426 SAFECOPY(to, p);
    427 p += strlen(p) + 1;

    ** CID 641202: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /mailsrvr.cpp: 1960 in dns_blacklisted(int, const char *, xp_sockaddr *, char *, char *, char *)()


    _____________________________________________________________________________________________
    *** CID 641202: Integer handling issues (CONSTANT_EXPRESSION_RESULT) /mailsrvr.cpp: 1960 in dns_blacklisted(int, const char *, xp_sockaddr *, char *, char *, char *)()
    1954 continue;
    1955
    1956 sprintf(list, &quot;%.100s&quot;, p);
    1957
    1958 /* terminate */
    1959 tp = p;
    &gt;&gt;&gt; CID 641202: Integer handling issues (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;.
    1960 FIND_WHITESPACE(tp);
    1961 *tp = 0;
    1962
    1963 found = rblchk(sock, prot, addr, p);
    1964 }
    1965 fclose(fp);

    ** CID 641201: (CONSTANT_EXPRESSION_RESULT)
    /netmail.cpp: 1185 in sbbs_t::inetmail(const char *, const char *, int, smb_t *, smbmsg_t *, char **)()
    /netmail.cpp: 1195 in sbbs_t::inetmail(const char *, const char *, int, smb_t *, smbmsg_t *, char **)()
    /netmail.cpp: 975 in sbbs_t::inetmail(const char *, const char *, int, smb_t *, smbmsg_t *, char **)()
    /netmail.cpp: 1202 in sbbs_t::inetmail(const char *, const char *, int, smb_t *, smbmsg_t *, char **)()


    _____________________________________________________________________________________________
    *** CID 641201: (CONSTANT_EXPRESSION_RESULT)
    /netmail.cpp: 1185 in sbbs_t::inetmail(const char *, const char *, int, smb_t *, smbmsg_t *, char **)()
    1179 break;
    1180 }
    1181
    1182 /* Get destination user address */
    1183 if ((p = strrchr(rcpt_list[rcpt_count], &#39;&lt;&#39;)) != NULL) {
    1184 p++;
    &gt;&gt;&gt; CID 641201: (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;.
    1185 SKIP_WHITESPACE(p);
    1186 SAFECOPY(addr, p);
    1187 p = strrchr(addr, &#39;&gt;&#39;);
    1188 if (p == NULL) {
    1189 bprintf(text[InvalidNetMailAddr], rcpt_list[rcpt_count]);
    1190 break;
    /netmail.cpp: 1195 in sbbs_t::inetmail(const char *, const char *, int, smb_t *, smbmsg_t *, char **)()
    1189 bprintf(text[InvalidNetMailAddr], rcpt_list[rcpt_count]);
    1190 break;
    1191 }
    1192 *p = 0;
    1193 } else {
    1194 p = rcpt_list[rcpt_count];
    &gt;&gt;&gt; CID 641201: (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;.
    1195 SKIP_WHITESPACE(p);
    1196 SAFECOPY(addr, p);
    1197 }
    1198 truncsp(addr);
    1199
    1200 /* Get destination user name */
    /netmail.cpp: 975 in sbbs_t::inetmail(const char *, const char *, int, smb_t *, smbmsg_t *, char **)()
    969 bprintf(text[InvalidNetMailAddr], p);
    970 continue;
    971 }
    972 while (at &gt; p &amp;&amp; *at &gt; &#39; &#39;)
    973 at--;
    974 p = at;
    &gt;&gt;&gt; CID 641201: (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;.
    975 SKIP_WHITESPACE(p);
    976 uint16_t net_type = smb_netaddr_type(p);
    977 if (net_type != NET_INTERNET) {
    978 bprintf(text[InvalidNetMailAddr], p);
    979 break;
    980 }
    /netmail.cpp: 1202 in sbbs_t::inetmail(const char *, const char *, int, smb_t *, smbmsg_t *, char **)()
    1196 SAFECOPY(addr, p);
    1197 }
    1198 truncsp(addr);
    1199
    1200 /* Get destination user name */
    1201 p = rcpt_list[rcpt_count];
    &gt;&gt;&gt; CID 641201: (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;.
    1202 SKIP_WHITESPACE(p);
    1203 SAFECOPY(name, p);
    1204 p = strrchr(name, &#39;&lt;&#39;);
    1205 if (!p)
    1206 p = strrchr(name, &#39;@&#39;);
    1207 if (!p)

    ** CID 641200: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.c: 1534 in ftpalias()
    /ftpsrvr.c: 1547 in ftpalias()


    _____________________________________________________________________________________________
    *** CID 641200: (CONSTANT_EXPRESSION_RESULT)
    /ftpsrvr.c: 1534 in ftpalias()
    1528
    1529 while (!feof(fp)) {
    1530 if (!fgets(line, sizeof(line), fp))
    1531 break;
    1532
    1533 p = line; /* alias */
    &gt;&gt;&gt; CID 641200: (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;.
    1534 SKIP_WHITESPACE(p);
    1535 if (*p == &#39;;&#39;) /* comment */
    1536 continue;
    1537
    1538 tp = p; /* terminator */
    1539 FIND_WHITESPACE(tp);
    /ftpsrvr.c: 1547 in ftpalias()
    1541 *tp = 0;
    1542
    1543 if (stricmp(p, alias)) /* Not a match */
    1544 continue;
    1545
    1546 p = tp + 1; /* filename */
    &gt;&gt;&gt; CID 641200: (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;.
    1547 SKIP_WHITESPACE(p);
    1548
    1549 tp = p; /* terminator */
    1550 FIND_WHITESPACE(tp);
    1551 if (*tp)
    1552 *tp = 0;

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


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to All on Wednesday, January 28, 2026 13:46:25
    ----==_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--


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to All on Thursday, January 29, 2026 13:46:20
    ----==_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--


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to All on Friday, February 13, 2026 13:54:18
    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



    ---
    * Synchronet * Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to All on Tuesday, February 17, 2026 13:48:48
    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



    ---
    * Synchronet * Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From scan-admin@coverity.com@VERT to All on Wednesday, February 18, 2026 13:50:52
    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



    ---
    * Synchronet * Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • 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
  • From scan-admin@coverity.com@VERT to All on Sunday, March 15, 2026 14:04:34
    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 644904: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Mar-15-2026/src/conio/bitmap_con.c: 1139 in blinker_thread()


    _____________________________________________________________________________________________
    *** CID 644904: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Mar-15-2026/src/conio/bitmap_con.c: 1139 in blinker_thread()
    1133 assert_pthread_mutex_unlock(&screenlock);
    1134 assert_rwlock_unlock(&vstatlock);
    1135 continue;
    1136 }
    1137 assert_pthread_mutex_unlock(&screenlock);
    1138 if (curs_changed || blink_changed || lfc)
    CID 644904: Concurrent data access violations (MISSING_LOCK) >>> Accessing "vstat.vmem->changed" without holding lock "vstat_chlock". Elsewhere, "vstat_vmem.changed" is written to with "vstat_chlock" held 7 out of 8 times (6 of these accesses strongly imply that it is necessary).
    1139 vstat.vmem->changed = true;
    1140 assert_rwlock_unlock(&vstatlock);
    1141
    1142 if (check_redraw()) {
    1143 if (update_from_vmem(TRUE))
    1144 request_redraw();

    ** CID 644903: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Mar-15-2026/src/conio/bitmap_con.c: 861 in draw_char_row_slow()


    _____________________________________________________________________________________________
    *** CID 644903: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Mar-15-2026/src/conio/bitmap_con.c: 861 in draw_char_row_slow()
    855 ac = cs->bg;
    856 bc = cs->bg;
    857 }
    858
    859 if (screena.rect->data[pixeloffset] != ac) {
    860 screena.rect->data[pixeloffset] = ac;
    CID 644903: Concurrent data access violations (MISSING_LOCK) >>> Accessing "screena.update_pixels" without holding lock "screenlock". Elsewhere, "bitmap_screen.update_pixels" is written to with "screenlock" held 18 out of 24 times.
    861 screena.update_pixels = 1;
    862 }
    863 if (screenb.rect->data[pixeloffset] != bc) {
    864 screenb.rect->data[pixeloffset] = bc;
    865 screenb.update_pixels = 1;
    866 }

    ** CID 644905: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Mar-15-2026/src/conio/bitmap_con.c: 988 in bitmap_draw_vmem_locked()


    _____________________________________________________________________________________________
    *** CID 644905: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Mar-15-2026/src/conio/bitmap_con.c: 988 in bitmap_draw_vmem_locked()
    982 bs.pixeloffset += rsz;
    983 if (bs.pixeloffset >= bs.maxpix)
    984 bs.pixeloffset -= bs.maxpix; 985 }
    986 }
    987 if (didfast) {
    CID 644905: Concurrent data access violations (MISSING_LOCK) >>> Accessing "screena.update_pixels" without holding lock "screenlock". Elsewhere, "bitmap_screen.update_pixels" is written to with "screenlock" held 18 out of 24 times.
    988 screena.update_pixels = true;
    989 screenb.update_pixels = true;
    990 }
    991 }
    992 }
    993


    ________________________________________________________________________________________________________
    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 Monday, March 16, 2026 15:28:31
    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 644927: (RESOURCE_LEAK)
    /tmp/sbbs-Mar-16-2026/src/conio/scale.c: 462 in do_scale() /tmp/sbbs-Mar-16-2026/src/conio/scale.c: 462 in do_scale() /tmp/sbbs-Mar-16-2026/src/conio/scale.c: 462 in do_scale() /tmp/sbbs-Mar-16-2026/src/conio/scale.c: 462 in do_scale() /tmp/sbbs-Mar-16-2026/src/conio/scale.c: 462 in do_scale()


    _____________________________________________________________________________________________
    *** CID 644927: (RESOURCE_LEAK) /tmp/sbbs-Mar-16-2026/src/conio/scale.c: 462 in do_scale()
    456 ctarget = ret2;
    457 else
    458 ctarget = ret1;
    459 }
    460
    461 release_buffer(ctarget);
    CID 644927: (RESOURCE_LEAK)
    Variable "nt" going out of scope leaks the storage it points to.
    462 return csrc;
    463 }
    464
    465 static void
    466 pointy_scale_odd(const uint32_t* src, uint32_t* dest, const int width, const int height, const int mult)
    467 {
    /tmp/sbbs-Mar-16-2026/src/conio/scale.c: 462 in do_scale()
    456 ctarget = ret2;
    457 else
    458 ctarget = ret1;
    459 }
    460
    461 release_buffer(ctarget);
    CID 644927: (RESOURCE_LEAK)
    Variable "nt" going out of scope leaks the storage it points to.
    462 return csrc;
    463 }
    464
    465 static void
    466 pointy_scale_odd(const uint32_t* src, uint32_t* dest, const int width, const int height, const int mult)
    467 {
    /tmp/sbbs-Mar-16-2026/src/conio/scale.c: 462 in do_scale()
    456 ctarget = ret2;
    457 else
    458 ctarget = ret1;
    459 }
    460
    461 release_buffer(ctarget);
    CID 644927: (RESOURCE_LEAK)
    Variable "nt" going out of scope leaks the storage it points to.
    462 return csrc;
    463 }
    464
    465 static void
    466 pointy_scale_odd(const uint32_t* src, uint32_t* dest, const int width, const int height, const int mult)
    467 {
    /tmp/sbbs-Mar-16-2026/src/conio/scale.c: 462 in do_scale()
    456 ctarget = ret2;
    457 else
    458 ctarget = ret1;
    459 }
    460
    461 release_buffer(ctarget);
    CID 644927: (RESOURCE_LEAK)
    Variable "nt" going out of scope leaks the storage it points to.
    462 return csrc;
    463 }
    464
    465 static void
    466 pointy_scale_odd(const uint32_t* src, uint32_t* dest, const int width, const int height, const int mult)
    467 {
    /tmp/sbbs-Mar-16-2026/src/conio/scale.c: 462 in do_scale()
    456 ctarget = ret2;
    457 else
    458 ctarget = ret1;
    459 }
    460
    461 release_buffer(ctarget);
    CID 644927: (RESOURCE_LEAK)
    Variable "nt" going out of scope leaks the storage it points to.
    462 return csrc;
    463 }
    464
    465 static void
    466 pointy_scale_odd(const uint32_t* src, uint32_t* dest, const int width, const int height, const int mult)
    467 {


    ________________________________________________________________________________________________________
    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 Tuesday, March 17, 2026 12:54:04
    Hi,

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

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


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


    ** CID 645010: Insecure data handling (INTEGER_OVERFLOW) /tmp/sbbs-Mar-17-2026/src/conio/wl_events.c: 1136 in ds_send()


    _____________________________________________________________________________________________
    *** CID 645010: Insecure data handling (INTEGER_OVERFLOW) /tmp/sbbs-Mar-17-2026/src/conio/wl_events.c: 1136 in ds_send()
    1130 {
    1131 assert_pthread_mutex_lock(&wl_copybuf_mutex);
    1132 if (wl_copybuf) {
    1133 size_t len = strlen(wl_copybuf);
    1134 size_t sent = 0;
    1135 while (sent < len) {
    CID 645010: Insecure data handling (INTEGER_OVERFLOW)
    "len - sent", which might have underflowed, is passed to "write(fd, wl_copybuf + sent, len - sent)".
    1136 ssize_t rv = write(fd, wl_copybuf + sent, len - sent);
    1137 if (rv <= 0)
    1138 break;
    1139 sent += rv;
    1140 }
    1141 }

    ** CID 645009: Insecure data handling (INTEGER_OVERFLOW) /tmp/sbbs-Mar-17-2026/src/conio/wl_events.c: 1459 in readev()


    _____________________________________________________________________________________________
    *** CID 645009: Insecure data handling (INTEGER_OVERFLOW) /tmp/sbbs-Mar-17-2026/src/conio/wl_events.c: 1459 in readev()
    1453 readev(struct wl_local_event *lev)
    1454 {
    1455 size_t got = 0;
    1456 char *buf = (char *)lev;
    1457
    1458 while (got < sizeof(*lev)) {
    CID 645009: Insecure data handling (INTEGER_OVERFLOW)
    "96UL - got", which might have underflowed, is passed to "read(wl_local_pipe[0], buf + got, 96UL - got)".
    1459 int rv = read(wl_local_pipe[0], buf + got, sizeof(*lev) - got);
    1460 if (rv > 0)
    1461 got += rv;
    1462 }
    1463 }
    1464

    ** CID 645008: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Mar-17-2026/src/conio/wl_cio.c: 243 in wl_copytext()


    _____________________________________________________________________________________________
    *** CID 645008: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Mar-17-2026/src/conio/wl_cio.c: 243 in wl_copytext()
    237
    238 assert_pthread_mutex_lock(&wl_copybuf_mutex);
    239 FREE_AND_NULL(wl_copybuf);
    240 wl_copybuf = strdup(text);
    241 assert_pthread_mutex_unlock(&wl_copybuf_mutex);
    242
    CID 645008: Concurrent data access violations (MISSING_LOCK) >>> Accessing "wl_copybuf" without holding lock "wl_copybuf_mutex". Elsewhere, "wl_copybuf" is written to with "wl_copybuf_mutex" held 2 out of 2 times.
    243 if (wl_copybuf) {
    244 ev.type = WL_LOCAL_COPY;
    245 write_event(&ev);
    246 }
    247 }
    248

    ** CID 645007: Program hangs (SLEEP)


    _____________________________________________________________________________________________
    *** CID 645007: Program hangs (SLEEP) /tmp/sbbs-Mar-17-2026/src/conio/ciolib.c: 2754 in ciolib_add_hyperlink()
    2748 }
    2749 }
    2750
    2751 /* Run GC if free list is empty */
    2752 if (hyperlink_free_head == 0)
    2753 hyperlink_gc();
    CID 645007: Program hangs (SLEEP)
    Call to "hyperlink_gc" might sleep while holding lock "hyperlink_mutex".
    2754
    2755 /* Still empty after GC table is full */
    2756 if (hyperlink_free_head == 0) {
    2757 pthread_mutex_unlock(&hyperlink_mutex);
    2758 return 0;
    2759 }


    ________________________________________________________________________________________________________
    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 Wednesday, March 18, 2026 13:09: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.
    4 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 645069: Control flow issues (DEADCODE) /tmp/sbbs-Mar-18-2026/src/conio/cterm.c: 2702 in sgr_diff()


    _____________________________________________________________________________________________
    *** CID 645069: Control flow issues (DEADCODE) /tmp/sbbs-Mar-18-2026/src/conio/cterm.c: 2702 in sgr_diff()
    2696 else {
    2697 int params = 0;
    2698 char sgrbuf[128];
    2699 sgrbuf[0] = '\0';
    2700
    2701 if ((na & 0x08) && !(pa & 0x08)) {
    CID 645069: Control flow issues (DEADCODE)
    Execution cannot reach the expression "";1"" inside this statement: "strcat(sgrbuf, (params++ ? ...".
    2702 strcat(sgrbuf, params++ ? ";1" : "1");
    2703 }
    2704 if ((na & 0x80) && !(pa & 0x80)) {
    2705 strcat(sgrbuf, params++ ? ";5" : "5");
    2706 }
    2707 if ((na & 0x07) != (pa & 0x07)) {


    ________________________________________________________________________________________________________
    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