• New Defects reported by Coverity Scan for Synchronet

    From scan-admin@coverity.com@1:103/705 to All on Sun Dec 14 13:48:36 2025
    ----==_mimepart_693ec0347df67_815e22c07a52839ac105f0
    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.

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


    ** CID 639949: Error handling issues (CHECKED_RETURN)
    /websrvr.cpp: 2047 in check_ars(http_session_t *)()


    _____________________________________________________________________________________________
    *** CID 639949: Error handling issues (CHECKED_RETURN)
    /websrvr.cpp: 2047 in check_ars(http_session_t *)()
    2041 else
    2042 lprintf(LOG_NOTICE, "%04d !UNKNOWN USER: '%s'" 2043 , session->socket, session->req.auth.username);
    2044 return false;
    2045 }
    2046 thisuser.number = i;
    CID 639949: Error handling issues (CHECKED_RETURN)
    Calling "getuserdat" without checking return value (as is done elsewhere 90 out of 103 times).
    2047 getuserdat(&scfg, &thisuser);
    2048 switch (session->req.auth.type) {
    2049 case AUTHENTICATION_TLS_PSK:
    2050 if ((auth_allowed & (1 << AUTHENTICATION_TLS_PSK)) == 0)
    2051 return false;
    2052 if (session->last_user_num != 0) {

    ** CID 639948: Program hangs (SLEEP)
    /services.cpp: 1619 in native_service_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 639948: Program hangs (SLEEP)
    /services.cpp: 1619 in native_service_thread(void *)()
    1613 client_on(socket, &client, false /* update */);
    1614
    1615 if (startup->login_attempt.throttle
    1616 && (login_attempts = loginAttempts(startup->login_attempt_list, &service_client.addr)) > 1) {
    1617 lprintf(LOG_DEBUG, "%04d %s Throttling suspicious connection from: %s (%lu login attempts)"
    1618 , socket, service->protocol, client.addr, login_attempts);
    CID 639948: Program hangs (SLEEP)
    Call to "nanosleep" might sleep while holding lock "startup->login_attempt_list->mutex".
    1619 mswait(login_attempts * startup->login_attempt.throttle);
    1620 }
    1621
    1622 /* RUN SCRIPT */
    1623 if (strpbrk(service->cmd, "/\\") == NULL)
    1624 SAFEPRINTF2(cmd, "%s%s", scfg.exec_dir, service->cmd);

    ** CID 639947: Control flow issues (DEADCODE)
    /websrvr.cpp: 6533 in read_post_data(http_session_t *)()


    _____________________________________________________________________________________________
    *** CID 639947: Control flow issues (DEADCODE)
    /websrvr.cpp: 6533 in read_post_data(http_session_t *)()
    6527 if (ch_len == 0)
    6528 break;
    6529 /* Check size */
    6530 s += ch_len;
    6531 if (s > MAX_POST_LEN) {
    6532 if (s > SIZE_MAX) {
    CID 639947: Control flow issues (DEADCODE)
    Execution cannot reach this statement: "send_error(session, 6533U, ...".
    6533 send_error(session, __LINE__, "413 Request entity too large");
    6534 FCLOSE_OPEN_FILE(fp); 6535 return false;
    6536 }
    6537 if (fp == NULL) {
    6538 fp = open_post_file(session);

    ** CID 639946: (CHECKED_RETURN)
    /js_socket.cpp: 1412 in js_recv(JSContext *, unsigned int, unsigned long *)()
    /js_socket.cpp: 1415 in js_recv(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639946: (CHECKED_RETURN)
    /js_socket.cpp: 1412 in js_recv(JSContext *, unsigned int, unsigned long *)()
    1406
    1407 if ((p = (js_socket_private_t*)js_GetClassPrivate(cx, obj, &js_socket_class)) == NULL) {
    1408 return JS_FALSE;
    1409 }
    1410
    1411 if (argc && argv[0] != JSVAL_VOID) {
    CID 639946: (CHECKED_RETURN)
    Calling "JS_ValueToInt32" without checking return value (as is done elsewhere 236 out of 268 times).
    1412 JS_ValueToInt32(cx, argv[0], &len);
    1413
    1414 if (argc > 1 && argv[1] != JSVAL_VOID) {
    1415 JS_ValueToInt32(cx, argv[1], &timeout);
    1416 }
    1417 }
    /js_socket.cpp: 1415 in js_recv(JSContext *, unsigned int, unsigned long *)()
    1409 }
    1410
    1411 if (argc && argv[0] != JSVAL_VOID) {
    1412 JS_ValueToInt32(cx, argv[0], &len);
    1413
    1414 if (argc > 1 && argv[1] != JSVAL_VOID) {
    CID 639946: (CHECKED_RETURN)
    Calling "JS_ValueToInt32" without checking return value (as is done elsewhere 236 out of 268 times).
    1415 JS_ValueToInt32(cx, argv[1], &timeout);
    1416 }
    1417 }
    1418
    1419 if ((buf = (char*)malloc(len + 1)) == NULL) {
    1420 JS_ReportError(cx, "Error allocating %u bytes", len + 1);

    ** CID 639945: (CHECKED_RETURN)
    /js_system.cpp: 1002 in js_matchuserdata(JSContext *, unsigned int, unsigned long *)()
    /js_system.cpp: 987 in js_matchuserdata(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639945: (CHECKED_RETURN)
    /js_system.cpp: 1002 in js_matchuserdata(JSContext *, unsigned int, unsigned long *)()
    996 if ((js_str = JS_ValueToString(cx, argv[1])) == NULL)
    997 return JS_FALSE;
    998
    999 if (argnum < argc && JSVAL_IS_BOOLEAN(argv[argnum]))
    1000 JS_ValueToBoolean(cx, argv[argnum++], &match_del);
    1001 if (argnum < argc && JSVAL_IS_NUMBER(argv[argnum]))
    CID 639945: (CHECKED_RETURN)
    Calling "JS_ValueToInt32" without checking return value (as is done elsewhere 236 out of 268 times).
    1002 JS_ValueToInt32(cx, argv[argnum++], &usernumber);
    1003 if (argnum < argc && JSVAL_IS_BOOLEAN(argv[argnum]))
    1004 JS_ValueToBoolean(cx, argv[argnum++], &match_next); 1005
    1006 JSSTRING_TO_ASTRING(cx, js_str, p, 128, NULL);
    1007 if (p == NULL)
    /js_system.cpp: 987 in js_matchuserdata(JSContext *, unsigned int, unsigned long *)()
    981 return JS_TRUE;
    982 }
    983 js_system_private_t* sys;
    984 if ((sys = (js_system_private_t*)js_GetClassPrivate(cx, obj, &js_system_class)) == NULL)
    985 return JS_FALSE;
    986
    CID 639945: (CHECKED_RETURN)
    Calling "JS_ValueToInt32" without checking return value (as is done elsewhere 236 out of 268 times).
    987 JS_ValueToInt32(cx, argv[0], &field);
    988 rc = JS_SUSPENDREQUEST(cx);
    989 len = user_field_len(static_cast<user_field>(field));
    990 JS_RESUMEREQUEST(cx, rc);
    991 if (len < 1) {
    992 JS_ReportError(cx, "Invalid user field: %d", field);

    ** CID 639944: Uninitialized variables (UNINIT)


    _____________________________________________________________________________________________
    *** CID 639944: Uninitialized variables (UNINIT)
    /js_system.cpp: 2108 in js_chkpassword(JSContext *, unsigned int, unsigned long *)()
    2102
    2103 js_system_private_t* sys;
    2104 if ((sys = (js_system_private_t*)js_GetClassPrivate(cx, obj, &js_system_class)) == NULL)
    2105 return JS_FALSE;
    2106
    2107 rc = JS_SUSPENDREQUEST(cx);
    CID 639944: Uninitialized variables (UNINIT)
    Using uninitialized value "*str" when calling "check_pass".
    2108 bool result = check_pass(sys->cfg, str, /* user: */NULL, /* unique: */false, /* reason: */NULL);
    2109 JS_SET_RVAL(cx, arglist, BOOLEAN_TO_JSVAL(result));
    2110 JS_RESUMEREQUEST(cx, rc);
    2111
    2112 return JS_TRUE;
    2113 }

    ** CID 639943: (Y2K38_SAFETY)
    /js_filebase.cpp: 1591 in js_filebase_get(JSContext *, JSObject *, long, unsigned long *)()
    /js_filebase.cpp: 1581 in js_filebase_get(JSContext *, JSObject *, long, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639943: (Y2K38_SAFETY)
    /js_filebase.cpp: 1591 in js_filebase_get(JSContext *, JSObject *, long, unsigned long *)()
    1585 rc = JS_SUSPENDREQUEST(cx);
    1586 smb_getstatus(&(p->smb));
    1587 JS_RESUMEREQUEST(cx, rc);
    1588 *vp = UINT_TO_JSVAL(p->smb.status.total_files); 1589 break;
    1590 case FB_PROP_UPDATE_TIME:
    CID 639943: (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "newfiletime(&p->smb)" is cast to "uint32_t".
    1591 *vp = UINT_TO_JSVAL((uint32_t)newfiletime(&p->smb));
    1592 break;
    1593 case FB_PROP_MAX_FILES:
    1594 *vp = UINT_TO_JSVAL(p->smb.status.max_files); 1595 break;
    1596 case FB_PROP_MAX_AGE:
    /js_filebase.cpp: 1581 in js_filebase_get(JSContext *, JSObject *, long, unsigned long *)()
    1575 smb_getstatus(&(p->smb));
    1576 JS_RESUMEREQUEST(cx, rc);
    1577 *vp = UINT_TO_JSVAL(p->smb.status.last_file); 1578 break;
    1579 case FB_PROP_LAST_FILE_TIME:
    1580 rc = JS_SUSPENDREQUEST(cx);
    CID 639943: (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "lastfiletime(&p->smb)" is cast to "uint32_t".
    1581 *vp = UINT_TO_JSVAL((uint32_t)lastfiletime(&p->smb));
    1582 JS_RESUMEREQUEST(cx, rc);
    1583 break;
    1584 case FB_PROP_FILES:
    1585 rc = JS_SUSPENDREQUEST(cx);
    1586 smb_getstatus(&(p->smb));

    ** CID 639942: Error handling issues (CHECKED_RETURN)
    /js_socket.cpp: 3624 in js_socket_constructor(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639942: Error handling issues (CHECKED_RETURN)
    /js_socket.cpp: 3624 in js_socket_constructor(JSContext *, unsigned int, unsigned long *)()
    3618 return JS_TRUE;
    3619 }
    3620 }
    3621
    3622 for (; i < argc; i++) {
    3623 if (JSVAL_IS_NUMBER(argv[i])) {
    CID 639942: Error handling issues (CHECKED_RETURN)
    Calling "JS_ValueToInt32" without checking return value (as is done elsewhere 236 out of 268 times).
    3624 JS_ValueToInt32(cx, argv[i], &type);
    3625 }
    3626 else if (JSVAL_IS_BOOLEAN(argv[i])) {
    3627 if (argv[i] == JSVAL_TRUE)
    3628 domain = AF_INET6;
    3629 }

    ** CID 639941: Error handling issues (CHECKED_RETURN)
    /websrvr.cpp: 6856 in http_session_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 639941: Error handling issues (CHECKED_RETURN)
    /websrvr.cpp: 6856 in http_session_thread(void *)()
    6850 session.tls_sess = -1;
    6851 close_session_no_rb(&session);
    6852 thread_down();
    6853 return;
    6854 }
    6855 bool nodelay = true;
    CID 639941: Error handling issues (CHECKED_RETURN)
    Calling "setsockopt(session.socket, IPPROTO_TCP, 1, (char *)&nodelay, 1U)" without checking return value. This library function may fail and return an error code.
    6856 setsockopt(session.socket, IPPROTO_TCP, TCP_NODELAY, (char*)&nodelay, sizeof(nodelay));
    6857
    6858 if (looking_good)
    6859 looking_good = HANDLE_CRYPT_CALL(cryptSetAttribute(session.tls_sess, CRYPT_SESSINFO_TLS_OPTIONS, CRYPT_TLSOPTION_MINVER_TLS12), &session, "setting TLS minver to 1.2");
    6860 if (looking_good)
    6861 looking_good = HANDLE_CRYPT_CALL(cryptSetAttribute(session.tls_sess, CRYPT_SESSINFO_NETWORKSOCKET, session.socket), &session, "setting network socket");

    ** CID 639940: High impact quality (Y2K38_SAFETY)
    /js_filebase.cpp: 701 in js_hash_file(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639940: High impact quality (Y2K38_SAFETY)
    /js_filebase.cpp: 701 in js_hash_file(JSContext *, unsigned int, unsigned long *)()
    695 if (size == -1)
    696 JS_ReportError(cx, "File does not exist: %s", path); 697 else {
    698 smb_setfilesize(&file.idx, size);
    699 if ((p->smb_result = smb_hashfile(path, size, &file.file_idx.hash.data)) > 0) {
    700 file.file_idx.hash.flags = p->smb_result;
    CID 639940: High impact quality (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "fdate(path)" is cast to "uint32_t".
    701 file.hdr.when_written.time = (uint32_t)fdate(path);
    702 JSObject* fobj;
    703 if ((fobj = JS_NewObject(cx, NULL, NULL, obj)) == NULL)
    704 JS_ReportError(cx, "object allocation failure, line %d", __LINE__);
    705 else {
    706 set_file_properties(cx, fobj, &file, detail);

    ** CID 639939: Memory - corruptions (REVERSE_NEGATIVE)
    /websrvr.cpp: 7033 in http_session_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 639939: Memory - corruptions (REVERSE_NEGATIVE)
    /websrvr.cpp: 7033 in http_session_thread(void *)()
    7027 memset(session.req.ld, 0, sizeof(struct log_data));
    7028 /* FREE()d in http_logging_thread */
    7029 session.req.ld->hostname = strdup(session.host_name);
    7030 }
    7031 while ((redirp == NULL || session.req.send_location >= MOVED_TEMP)
    7032 && !session.finished && !session.req.finished >>> CID 639939: Memory - corruptions (REVERSE_NEGATIVE)
    You might be using variable "session.socket" before verifying that it is >= 0.
    7033 && session.socket != INVALID_SOCKET) {
    7034 SAFECOPY(session.req.status, "200 OK");
    7035 session.req.send_location = NO_LOCATION;
    7036 if (session.req.headers == NULL) {
    7037 /* FREE()d in close_request() */
    7038 if ((session.req.headers = strListInit()) == NULL) {

    ** CID 639938: (CHECKED_RETURN)
    /js_msgbase.cpp: 3037 in js_msgbase_get(JSContext *, JSObject *, long, unsigned long *)()
    /js_msgbase.cpp: 3031 in js_msgbase_get(JSContext *, JSObject *, long, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639938: (CHECKED_RETURN)
    /js_msgbase.cpp: 3037 in js_msgbase_get(JSContext *, JSObject *, long, unsigned long *)()
    3031 smb_getstatus(&(p->smb));
    3032 JS_RESUMEREQUEST(cx, rc);
    3033 *vp = UINT_TO_JSVAL(p->smb.status.last_msg); 3034 break;
    3035 case SMB_PROP_TOTAL_MSGS:
    3036 rc = JS_SUSPENDREQUEST(cx);
    CID 639938: (CHECKED_RETURN)
    Calling "smb_getstatus" without checking return value (as is done elsewhere 32 out of 36 times).
    3037 smb_getstatus(&(p->smb));
    3038 JS_RESUMEREQUEST(cx, rc);
    3039 *vp = UINT_TO_JSVAL(p->smb.status.total_msgs); 3040 break;
    3041 case SMB_PROP_MAX_CRCS:
    3042 *vp = UINT_TO_JSVAL(p->smb.status.max_crcs); /js_msgbase.cpp: 3031 in js_msgbase_get(JSContext *, JSObject *, long, unsigned long *)()
    3025 } else {
    3026 *vp = UINT_TO_JSVAL(p->first_msg);
    3027 }
    3028 break;
    3029 case SMB_PROP_LAST_MSG:
    3030 rc = JS_SUSPENDREQUEST(cx);
    CID 639938: (CHECKED_RETURN)
    Calling "smb_getstatus" without checking return value (as is done elsewhere 32 out of 36 times).
    3031 smb_getstatus(&(p->smb));
    3032 JS_RESUMEREQUEST(cx, rc);
    3033 *vp = UINT_TO_JSVAL(p->smb.status.last_msg); 3034 break;
    3035 case SMB_PROP_TOTAL_MSGS:
    3036 rc = JS_SUSPENDREQUEST(cx);

    ** CID 639937: Incorrect expression (PRECEDENCE_ERROR)
    /js_socket.cpp: 1254 in js_sendto(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639937: Incorrect expression (PRECEDENCE_ERROR) /js_socket.cpp: 1254 in js_sendto(JSContext *, unsigned int, unsigned long *)()
    1248
    1249 memset(&hints, 0, sizeof(hints));
    1250 hints.ai_socktype = p->type;
    1251 hints.ai_flags = AI_ADDRCONFIG;
    1252 dbprintf(false, p, "resolving hostname: %s", p->hostname);
    1253
    CID 639937: Incorrect expression (PRECEDENCE_ERROR)
    Evaluates as: "result = (getaddrinfo(p->hostname, NULL, &hints, &res) != 0)", because "!=" has higher operator precedence than "=". The context suggests that this might be in error.
    1254 if ((result = getaddrinfo(p->hostname, NULL, &hints, &res) != 0)) {
    1255 store_socket_error(p, result, gai_strerror(result)); 1256 dbprintf(TRUE, p, "getaddrinfo(%s) failed with error %d", p->hostname, result);
    1257 JS_SET_RVAL(cx, arglist, JSVAL_FALSE);
    1258 free(cp);
    1259 JS_RESUMEREQUEST(cx, rc);

    ** CID 639936: Error handling issues (CHECKED_RETURN)
    /js_socket.cpp: 2363 in js_socket_set(JSContext *, JSObject *, long, int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639936: Error handling issues (CHECKED_RETURN)
    /js_socket.cpp: 2363 in js_socket_set(JSContext *, JSObject *, long, int, unsigned long *)()
    2357
    2358 if (ssl_sync(scfg, lprintf)) { 2359 if ((ret = cryptCreateSession(&p->session, CRYPT_UNUSED, tiny == SOCK_PROP_SSL_SESSION ? CRYPT_SESSION_TLS: CRYPT_SESSION_TLS_SERVER)) == CRYPT_OK) {
    2360 ulong nb = 0; 2361 ioctlsocket(p->sock, FIONBIO, &nb);
    2362 nb = 1;
    CID 639936: Error handling issues (CHECKED_RETURN)
    Calling "setsockopt(p->sock, IPPROTO_TCP, 1, (char *)&nb, 8U)" without checking return value. This library function may fail and return an error code.
    2363 setsockopt(p->sock, IPPROTO_TCP, TCP_NODELAY, (char*)&nb, sizeof(nb));
    2364 if ((ret = do_cryptAttribute(p->session, CRYPT_SESSINFO_NETWORKSOCKET, p->sock)) == CRYPT_OK) {
    2365 int minver = CRYPT_TLSOPTION_MINVER_TLS12;
    2366 if (p->tls_minver == 100)
    2367 minver = CRYPT_TLSOPTION_MINVER_TLS10;
    2368 else if (p->tls_minver == 101)

    ** CID 639935: (INTEGER_OVERFLOW)
    /websrvr.cpp: 725 in sess_sendbuf(http_session_t *, const char *, unsigned long, volatile bool *)()
    /websrvr.cpp: 712 in sess_sendbuf(http_session_t *, const char *, unsigned long, volatile bool *)()


    _____________________________________________________________________________________________
    *** CID 639935: (INTEGER_OVERFLOW)
    /websrvr.cpp: 725 in sess_sendbuf(http_session_t *, const char *, unsigned long, volatile bool *)()
    719 else if (SOCKET_ERRNO == EPIPE) 720 lprintf(LOG_NOTICE, "%04d %-5s [%s] Unable to send to peer", session->socket, session->client.protocol, session->host_ip);
    721 #endif
    722 else if (session->socket != INVALID_SOCKET)
    723 lprintf(LOG_WARNING, "%04d %-5s [%s] !ERROR %d sending on socket", session->socket, session->client.protocol, session->host_ip, SOCKET_ERRNO);
    724 *failed = true;
    CID 639935: (INTEGER_OVERFLOW)
    "sent", which might have underflowed, is returned from the function. 725 return sent;
    726 }
    727 }
    728 }
    729 else {
    730 lprintf(LOG_WARNING, "%04d %-5s [%s] Timeout waiting for socket to become writable", session->socket, session->client.protocol, session->host_ip);
    /websrvr.cpp: 712 in sess_sendbuf(http_session_t *, const char *, unsigned long, volatile bool *)()
    706 }
    707 else
    708 *failed = true;
    709 result = tls_sent;
    710 }
    711 else {
    CID 639935: (INTEGER_OVERFLOW)
    "len - sent", which might have underflowed, is passed to "send(session->socket, buf + sent, len - sent, 0)".
    712 result = sendsocket(session->socket, buf + sent, len - sent);
    713 if (result == SOCKET_ERROR) {
    714 if (SOCKET_ERRNO == ECONNRESET) 715 lprintf(LOG_NOTICE, "%04d %-5s [%s] Connection reset by peer on send", session->socket, session->client.protocol, session->host_ip);
    716 else if (SOCKET_ERRNO == ECONNABORTED)
    717 lprintf(LOG_NOTICE, "%04d %-5s [%s] Connection aborted by peer on send", session->socket, session->client.protocol, session->host_ip);

    ** CID 639934: Uninitialized variables (UNINIT)
    /js_user.cpp: 1279 in js_downloaded_file(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639934: Uninitialized variables (UNINIT)
    /js_user.cpp: 1279 in js_downloaded_file(JSContext *, unsigned int, unsigned long *)()
    1273
    1274 uintN argn = 0;
    1275 if (argc > argn && JSVAL_IS_STRING(argv[argn])) {
    1276 char *p;
    1277 JSSTRING_TO_ASTRING(cx, JSVAL_TO_STRING(argv[argn]), p, LEN_EXTCODE + 2, NULL);
    1278 for (dirnum = 0; dirnum < scfg->total_dirs; dirnum++) >>> CID 639934: Uninitialized variables (UNINIT)
    Using uninitialized value "*p" when calling "strcasecmp".
    1279 if (!stricmp(scfg->dir[dirnum]->code, p))
    1280 break;
    1281 argn++;
    1282 }
    1283 if (argc > argn && JSVAL_IS_STRING(argv[argn])) {
    1284 JSSTRING_TO_ASTRING(cx, JSVAL_TO_STRING(argv[argn]), fname, MAX_PATH + 1, NULL);

    ** CID 639933: Error handling issues (CHECKED_RETURN)
    /js_system.cpp: 1481 in js_filter_ip(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639933: Error handling issues (CHECKED_RETURN)
    /js_system.cpp: 1481 in js_filter_ip(JSContext *, unsigned int, unsigned long *)()
    1475 js_system_private_t* sys;
    1476 if ((sys = (js_system_private_t*)js_GetClassPrivate(cx, obj, &js_system_class)) == NULL)
    1477 return JS_FALSE;
    1478
    1479 for (i = 0; i < argc && fname == NULL; i++) {
    1480 if (JSVAL_IS_NUMBER(argv[i])) {
    CID 639933: Error handling issues (CHECKED_RETURN)
    Calling "JS_ValueToInt32" without checking return value (as is done elsewhere 236 out of 268 times).
    1481 JS_ValueToInt32(cx, argv[i], &duration);
    1482 continue;
    1483 }
    1484 if (!JSVAL_IS_STRING(argv[i]))
    1485 continue;
    1486 JSVALUE_TO_MSTRING(cx, argv[i], p, NULL);

    ** CID 639932: Error handling issues (CHECKED_RETURN)
    /websrvr.cpp: 1188 in close_request(http_session_t *)()


    _____________________________________________________________________________________________
    *** CID 639932: Error handling issues (CHECKED_RETURN)
    /websrvr.cpp: 1188 in close_request(http_session_t *)()
    1182 FCLOSE_OPEN_FILE(session->req.fp);
    1183
    1184 for (i = 0; i < MAX_CLEANUPS; i++) {
    1185 if (session->req.cleanup_file[i] != NULL) {
    1186 if (i != CLEANUP_SSJS_TMP_FILE
    1187 || !(startup->options & WEB_OPT_DEBUG_SSJS))
    CID 639932: Error handling issues (CHECKED_RETURN)
    Calling "remove(session->req.cleanup_file[i])" without checking return value. This library function may fail and return an error code.
    1188 remove(session->req.cleanup_file[i]); 1189 free(session->req.cleanup_file[i]);
    1190 }
    1191 }
    1192
    1193 smb_freefilemem(&session->file);

    ** CID 639931: Memory - illegal accesses (OVERRUN)
    /mailsrvr.cpp: 901 in sockmimetext(int, const char *, int, smbmsg_t *, char *, unsigned long, char **, char *)()


    _____________________________________________________________________________________________
    *** CID 639931: Memory - illegal accesses (OVERRUN)
    /mailsrvr.cpp: 901 in sockmimetext(int, const char *, int, smbmsg_t *, char *, unsigned long, char **, char *)()
    895 np = "\r\n"; // Send at least one line of message text (issue #822)
    896 else
    897 np = msgtxt;
    898 long bytes = 0;
    899 while (*np && lines < maxlines) {
    900 len = 0;
    CID 639931: Memory - illegal accesses (OVERRUN)
    Overrunning array of 3 bytes at byte offset 997 by dereferencing pointer "np + len".
    901 while (len < RFC822_MAX_LINE_LEN && *(np + len) != 0 && *(np + len) != '\n')
    902 len++;
    903
    904 tlen = len;
    905 while (tlen && *(np + (tlen - 1)) <= ' ') /* Takes care of '\r' or spaces */
    906 tlen--;

    ** CID 639930: Error handling issues (CHECKED_RETURN)
    /js_system.cpp: 1640 in js_put_node_message(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639930: Error handling issues (CHECKED_RETURN)
    /js_system.cpp: 1640 in js_put_node_message(JSContext *, unsigned int, unsigned long *)()
    1634 return JS_FALSE;
    1635
    1636 js_system_private_t* sys;
    1637 if ((sys = (js_system_private_t*)js_GetClassPrivate(cx, obj, &js_system_class)) == NULL)
    1638 return JS_FALSE;
    1639
    CID 639930: Error handling issues (CHECKED_RETURN)
    Calling "JS_ValueToInt32" without checking return value (as is done elsewhere 236 out of 268 times).
    1640 JS_ValueToInt32(cx, argv[0], &node);
    1641 if (node < 1)
    1642 node = 1;
    1643
    1644 if ((js_msg = JS_ValueToString(cx, argv[1])) == NULL)
    1645 return JS_FALSE;


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


    ----==_mimepart_693ec0347df67_815e22c07a52839ac105f0
    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> 89</li>
    <li>
    88 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 89 defect(s)</li>
    </ul>

    <h3>Defect Details</h3>
    <pre>
    ** CID 639949: Error handling issues (CHECKED_RETURN)
    /websrvr.cpp: 2047 in check_ars(http_session_t *)()


    _____________________________________________________________________________________________
    *** CID 639949: Error handling issues (CHECKED_RETURN)
    /websrvr.cpp: 2047 in check_ars(http_session_t *)()
    2041 else
    2042 lprintf(LOG_NOTICE, &quot;%04d !UNKNOWN USER: &#39;%s&#39;&quot;
    2043 , session-&gt;socket, session-&gt;req.auth.username);
    2044 return false;
    2045 }
    2046 thisuser.number = i;
    &gt;&gt;&gt; CID 639949: Error handling issues (CHECKED_RETURN) &gt;&gt;&gt; Calling &quot;getuserdat&quot; without checking return value (as is done elsewhere 90 out of 103 times).
    2047 getuserdat(&amp;scfg, &amp;thisuser);
    2048 switch (session-&gt;req.auth.type) {
    2049 case AUTHENTICATION_TLS_PSK:
    2050 if ((auth_allowed &amp; (1 &lt;&lt; AUTHENTICATION_TLS_PSK)) == 0)
    2051 return false;
    2052 if (session-&gt;last_user_num != 0) {

    ** CID 639948: Program hangs (SLEEP)
    /services.cpp: 1619 in native_service_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 639948: Program hangs (SLEEP)
    /services.cpp: 1619 in native_service_thread(void *)()
    1613 client_on(socket, &amp;client, false /* update */);
    1614
    1615 if (startup-&gt;login_attempt.throttle
    1616 &amp;&amp; (login_attempts = loginAttempts(startup-&gt;login_attempt_list, &amp;service_client.addr)) &gt; 1) {
    1617 lprintf(LOG_DEBUG, &quot;%04d %s Throttling suspicious connection from: %s (%lu login attempts)&quot;
    1618 , socket, service-&gt;protocol, client.addr, login_attempts);
    &gt;&gt;&gt; CID 639948: Program hangs (SLEEP)
    &gt;&gt;&gt; Call to &quot;nanosleep&quot; might sleep while holding lock &quot;startup-&gt;login_attempt_list-&gt;mutex&quot;.
    1619 mswait(login_attempts * startup-&gt;login_attempt.throttle);
    1620 }
    1621
    1622 /* RUN SCRIPT */
    1623 if (strpbrk(service-&gt;cmd, &quot;/\\&quot;) == NULL)
    1624 SAFEPRINTF2(cmd, &quot;%s%s&quot;, scfg.exec_dir, service-&gt;cmd);

    ** CID 639947: Control flow issues (DEADCODE)
    /websrvr.cpp: 6533 in read_post_data(http_session_t *)()


    _____________________________________________________________________________________________
    *** CID 639947: Control flow issues (DEADCODE)
    /websrvr.cpp: 6533 in read_post_data(http_session_t *)()
    6527 if (ch_len == 0)
    6528 break;
    6529 /* Check size */
    6530 s += ch_len;
    6531 if (s &gt; MAX_POST_LEN) {
    6532 if (s &gt; SIZE_MAX) { &gt;&gt;&gt; CID 639947: Control flow issues (DEADCODE) &gt;&gt;&gt; Execution cannot reach this statement: &quot;send_error(session, 6533U, ...&quot;.
    6533 send_error(session, __LINE__, &quot;413 Request entity too large&quot;);
    6534 FCLOSE_OPEN_FILE(fp); 6535 return false;
    6536 }
    6537 if (fp == NULL) {
    6538 fp = open_post_file(session);

    ** CID 639946: (CHECKED_RETURN)
    /js_socket.cpp: 1412 in js_recv(JSContext *, unsigned int, unsigned long *)()
    /js_socket.cpp: 1415 in js_recv(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639946: (CHECKED_RETURN)
    /js_socket.cpp: 1412 in js_recv(JSContext *, unsigned int, unsigned long *)()
    1406
    1407 if ((p = (js_socket_private_t*)js_GetClassPrivate(cx, obj, &amp;js_socket_class)) == NULL) {
    1408 return JS_FALSE;
    1409 }
    1410
    1411 if (argc &amp;&amp; argv[0] != JSVAL_VOID) {
    &gt;&gt;&gt; CID 639946: (CHECKED_RETURN)
    &gt;&gt;&gt; Calling &quot;JS_ValueToInt32&quot; without checking return value (as is done elsewhere 236 out of 268 times).
    1412 JS_ValueToInt32(cx, argv[0], &amp;len);
    1413
    1414 if (argc &gt; 1 &amp;&amp; argv[1] != JSVAL_VOID) { 1415 JS_ValueToInt32(cx, argv[1], &amp;timeout); 1416 }
    1417 }
    /js_socket.cpp: 1415 in js_recv(JSContext *, unsigned int, unsigned long *)()
    1409 }
    1410
    1411 if (argc &amp;&amp; argv[0] != JSVAL_VOID) {
    1412 JS_ValueToInt32(cx, argv[0], &amp;len);
    1413
    1414 if (argc &gt; 1 &amp;&amp; argv[1] != JSVAL_VOID) { &gt;&gt;&gt; CID 639946: (CHECKED_RETURN)
    &gt;&gt;&gt; Calling &quot;JS_ValueToInt32&quot; without checking return value (as is done elsewhere 236 out of 268 times).
    1415 JS_ValueToInt32(cx, argv[1], &amp;timeout); 1416 }
    1417 }
    1418
    1419 if ((buf = (char*)malloc(len + 1)) == NULL) {
    1420 JS_ReportError(cx, &quot;Error allocating %u bytes&quot;, len + 1);

    ** CID 639945: (CHECKED_RETURN)
    /js_system.cpp: 1002 in js_matchuserdata(JSContext *, unsigned int, unsigned long *)()
    /js_system.cpp: 987 in js_matchuserdata(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639945: (CHECKED_RETURN)
    /js_system.cpp: 1002 in js_matchuserdata(JSContext *, unsigned int, unsigned long *)()
    996 if ((js_str = JS_ValueToString(cx, argv[1])) == NULL)
    997 return JS_FALSE;
    998
    999 if (argnum &lt; argc &amp;&amp; JSVAL_IS_BOOLEAN(argv[argnum])) 1000 JS_ValueToBoolean(cx, argv[argnum++], &amp;match_del); 1001 if (argnum &lt; argc &amp;&amp; JSVAL_IS_NUMBER(argv[argnum])) &gt;&gt;&gt; CID 639945: (CHECKED_RETURN)
    &gt;&gt;&gt; Calling &quot;JS_ValueToInt32&quot; without checking return value (as is done elsewhere 236 out of 268 times).
    1002 JS_ValueToInt32(cx, argv[argnum++], &amp;usernumber); 1003 if (argnum &lt; argc &amp;&amp; JSVAL_IS_BOOLEAN(argv[argnum])) 1004 JS_ValueToBoolean(cx, argv[argnum++], &amp;match_next); 1005
    1006 JSSTRING_TO_ASTRING(cx, js_str, p, 128, NULL);
    1007 if (p == NULL)
    /js_system.cpp: 987 in js_matchuserdata(JSContext *, unsigned int, unsigned long *)()
    981 return JS_TRUE;
    982 }
    983 js_system_private_t* sys;
    984 if ((sys = (js_system_private_t*)js_GetClassPrivate(cx, obj, &amp;js_system_class)) == NULL)
    985 return JS_FALSE;
    986
    &gt;&gt;&gt; CID 639945: (CHECKED_RETURN)
    &gt;&gt;&gt; Calling &quot;JS_ValueToInt32&quot; without checking return value (as is done elsewhere 236 out of 268 times).
    987 JS_ValueToInt32(cx, argv[0], &amp;field);
    988 rc = JS_SUSPENDREQUEST(cx);
    989 len = user_field_len(static_cast&lt;user_field&gt;(field));
    990 JS_RESUMEREQUEST(cx, rc);
    991 if (len &lt; 1) {
    992 JS_ReportError(cx, &quot;Invalid user field: %d&quot;, field);

    ** CID 639944: Uninitialized variables (UNINIT)


    _____________________________________________________________________________________________
    *** CID 639944: Uninitialized variables (UNINIT)
    /js_system.cpp: 2108 in js_chkpassword(JSContext *, unsigned int, unsigned long *)()
    2102
    2103 js_system_private_t* sys;
    2104 if ((sys = (js_system_private_t*)js_GetClassPrivate(cx, obj, &amp;js_system_class)) == NULL)
    2105 return JS_FALSE;
    2106
    2107 rc = JS_SUSPENDREQUEST(cx);
    &gt;&gt;&gt; CID 639944: Uninitialized variables (UNINIT) &gt;&gt;&gt; Using uninitialized value &quot;*str&quot; when calling &quot;check_pass&quot;.
    2108 bool result = check_pass(sys-&gt;cfg, str, /* user: */NULL, /* unique: */false, /* reason: */NULL);
    2109 JS_SET_RVAL(cx, arglist, BOOLEAN_TO_JSVAL(result));
    2110 JS_RESUMEREQUEST(cx, rc);
    2111
    2112 return JS_TRUE;
    2113 }

    ** CID 639943: (Y2K38_SAFETY)
    /js_filebase.cpp: 1591 in js_filebase_get(JSContext *, JSObject *, long, unsigned long *)()
    /js_filebase.cpp: 1581 in js_filebase_get(JSContext *, JSObject *, long, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639943: (Y2K38_SAFETY)
    /js_filebase.cpp: 1591 in js_filebase_get(JSContext *, JSObject *, long, unsigned long *)()
    1585 rc = JS_SUSPENDREQUEST(cx);
    1586 smb_getstatus(&amp;(p-&gt;smb));
    1587 JS_RESUMEREQUEST(cx, rc);
    1588 *vp = UINT_TO_JSVAL(p-&gt;smb.status.total_files);
    1589 break;
    1590 case FB_PROP_UPDATE_TIME:
    &gt;&gt;&gt; CID 639943: (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;newfiletime(&amp;p-&gt;smb)&quot; is cast to &quot;uint32_t&quot;.
    1591 *vp = UINT_TO_JSVAL((uint32_t)newfiletime(&amp;p-&gt;smb));
    1592 break;
    1593 case FB_PROP_MAX_FILES:
    1594 *vp = UINT_TO_JSVAL(p-&gt;smb.status.max_files);
    1595 break;
    1596 case FB_PROP_MAX_AGE:
    /js_filebase.cpp: 1581 in js_filebase_get(JSContext *, JSObject *, long, unsigned long *)()
    1575 smb_getstatus(&amp;(p-&gt;smb));
    1576 JS_RESUMEREQUEST(cx, rc);
    1577 *vp = UINT_TO_JSVAL(p-&gt;smb.status.last_file);
    1578 break;
    1579 case FB_PROP_LAST_FILE_TIME:
    1580 rc = JS_SUSPENDREQUEST(cx);
    &gt;&gt;&gt; CID 639943: (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;lastfiletime(&amp;p-&gt;smb)&quot; is cast to &quot;uint32_t&quot;.
    1581 *vp = UINT_TO_JSVAL((uint32_t)lastfiletime(&amp;p-&gt;smb));
    1582 JS_RESUMEREQUEST(cx, rc);
    1583 break;
    1584 case FB_PROP_FILES:
    1585 rc = JS_SUSPENDREQUEST(cx);
    1586 smb_getstatus(&amp;(p-&gt;smb));

    ** CID 639942: Error handling issues (CHECKED_RETURN)
    /js_socket.cpp: 3624 in js_socket_constructor(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639942: Error handling issues (CHECKED_RETURN)
    /js_socket.cpp: 3624 in js_socket_constructor(JSContext *, unsigned int, unsigned long *)()
    3618 return JS_TRUE;
    3619 }
    3620 }
    3621
    3622 for (; i &lt; argc; i++) {
    3623 if (JSVAL_IS_NUMBER(argv[i])) {
    &gt;&gt;&gt; CID 639942: Error handling issues (CHECKED_RETURN) &gt;&gt;&gt; Calling &quot;JS_ValueToInt32&quot; without checking return value (as is done elsewhere 236 out of 268 times).
    3624 JS_ValueToInt32(cx, argv[i], &amp;type);
    3625 }
    3626 else if (JSVAL_IS_BOOLEAN(argv[i])) {
    3627 if (argv[i] == JSVAL_TRUE)
    3628 domain = AF_INET6;
    3629 }

    ** CID 639941: Error handling issues (CHECKED_RETURN)
    /websrvr.cpp: 6856 in http_session_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 639941: Error handling issues (CHECKED_RETURN)
    /websrvr.cpp: 6856 in http_session_thread(void *)()
    6850 session.tls_sess = -1;
    6851 close_session_no_rb(&amp;session);
    6852 thread_down();
    6853 return;
    6854 }
    6855 bool nodelay = true;
    &gt;&gt;&gt; CID 639941: Error handling issues (CHECKED_RETURN) &gt;&gt;&gt; Calling &quot;setsockopt(session.socket, IPPROTO_TCP, 1, (char *)&amp;nodelay, 1U)&quot; without checking return value. This library function may fail and return an error code.
    6856 setsockopt(session.socket, IPPROTO_TCP, TCP_NODELAY, (char*)&amp;nodelay, sizeof(nodelay));
    6857
    6858 if (looking_good)
    6859 looking_good = HANDLE_CRYPT_CALL(cryptSetAttribute(session.tls_sess, CRYPT_SESSINFO_TLS_OPTIONS, CRYPT_TLSOPTION_MINVER_TLS12), &amp;session, &quot;setting TLS minver to 1.2&quot;);
    6860 if (looking_good)
    6861 looking_good = HANDLE_CRYPT_CALL(cryptSetAttribute(session.tls_sess, CRYPT_SESSINFO_NETWORKSOCKET, session.socket), &amp;session, &quot;setting network socket&quot;);

    ** CID 639940: High impact quality (Y2K38_SAFETY)
    /js_filebase.cpp: 701 in js_hash_file(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639940: High impact quality (Y2K38_SAFETY)
    /js_filebase.cpp: 701 in js_hash_file(JSContext *, unsigned int, unsigned long *)()
    695 if (size == -1)
    696 JS_ReportError(cx, &quot;File does not exist: %s&quot;, path);
    697 else {
    698 smb_setfilesize(&amp;file.idx, size);
    699 if ((p-&gt;smb_result = smb_hashfile(path, size, &amp;file.file_idx.hash.data)) &gt; 0) {
    700 file.file_idx.hash.flags = p-&gt;smb_result; &gt;&gt;&gt; CID 639940: 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;fdate(path)&quot; is cast to &quot;uint32_t&quot;.
    701 file.hdr.when_written.time = (uint32_t)fdate(path);
    702 JSObject* fobj;
    703 if ((fobj = JS_NewObject(cx, NULL, NULL, obj)) == NULL)
    704 JS_ReportError(cx, &quot;object allocation failure, line %d&quot;, __LINE__);
    705 else {
    706 set_file_properties(cx, fobj, &amp;file, detail);

    ** CID 639939: Memory - corruptions (REVERSE_NEGATIVE)
    /websrvr.cpp: 7033 in http_session_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 639939: Memory - corruptions (REVERSE_NEGATIVE)
    /websrvr.cpp: 7033 in http_session_thread(void *)()
    7027 memset(session.req.ld, 0, sizeof(struct log_data));
    7028 /* FREE()d in http_logging_thread */
    7029 session.req.ld-&gt;hostname = strdup(session.host_name);
    7030 }
    7031 while ((redirp == NULL || session.req.send_location &gt;= MOVED_TEMP)
    7032 &amp;&amp; !session.finished &amp;&amp; !session.req.finished
    &gt;&gt;&gt; CID 639939: Memory - corruptions (REVERSE_NEGATIVE) &gt;&gt;&gt; You might be using variable &quot;session.socket&quot; before verifying that it is &gt;= 0.
    7033 &amp;&amp; session.socket != INVALID_SOCKET) { 7034 SAFECOPY(session.req.status, &quot;200 OK&quot;);
    7035 session.req.send_location = NO_LOCATION;
    7036 if (session.req.headers == NULL) {
    7037 /* FREE()d in close_request() */
    7038 if ((session.req.headers = strListInit()) == NULL) {

    ** CID 639938: (CHECKED_RETURN)
    /js_msgbase.cpp: 3037 in js_msgbase_get(JSContext *, JSObject *, long, unsigned long *)()
    /js_msgbase.cpp: 3031 in js_msgbase_get(JSContext *, JSObject *, long, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639938: (CHECKED_RETURN)
    /js_msgbase.cpp: 3037 in js_msgbase_get(JSContext *, JSObject *, long, unsigned long *)()
    3031 smb_getstatus(&amp;(p-&gt;smb));
    3032 JS_RESUMEREQUEST(cx, rc);
    3033 *vp = UINT_TO_JSVAL(p-&gt;smb.status.last_msg); 3034 break;
    3035 case SMB_PROP_TOTAL_MSGS:
    3036 rc = JS_SUSPENDREQUEST(cx);
    &gt;&gt;&gt; CID 639938: (CHECKED_RETURN)
    &gt;&gt;&gt; Calling &quot;smb_getstatus&quot; without checking return value (as is done elsewhere 32 out of 36 times).
    3037 smb_getstatus(&amp;(p-&gt;smb));
    3038 JS_RESUMEREQUEST(cx, rc);
    3039 *vp = UINT_TO_JSVAL(p-&gt;smb.status.total_msgs);
    3040 break;
    3041 case SMB_PROP_MAX_CRCS:
    3042 *vp = UINT_TO_JSVAL(p-&gt;smb.status.max_crcs); /js_msgbase.cpp: 3031 in js_msgbase_get(JSContext *, JSObject *, long, unsigned long *)()
    3025 } else {
    3026 *vp = UINT_TO_JSVAL(p-&gt;first_msg); 3027 }
    3028 break;
    3029 case SMB_PROP_LAST_MSG:
    3030 rc = JS_SUSPENDREQUEST(cx);
    &gt;&gt;&gt; CID 639938: (CHECKED_RETURN)
    &gt;&gt;&gt; Calling &quot;smb_getstatus&quot; without checking return value (as is done elsewhere 32 out of 36 times).
    3031 smb_getstatus(&amp;(p-&gt;smb));
    3032 JS_RESUMEREQUEST(cx, rc);
    3033 *vp = UINT_TO_JSVAL(p-&gt;smb.status.last_msg); 3034 break;
    3035 case SMB_PROP_TOTAL_MSGS:
    3036 rc = JS_SUSPENDREQUEST(cx);

    ** CID 639937: Incorrect expression (PRECEDENCE_ERROR)
    /js_socket.cpp: 1254 in js_sendto(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639937: Incorrect expression (PRECEDENCE_ERROR) /js_socket.cpp: 1254 in js_sendto(JSContext *, unsigned int, unsigned long *)()
    1248
    1249 memset(&amp;hints, 0, sizeof(hints));
    1250 hints.ai_socktype = p-&gt;type;
    1251 hints.ai_flags = AI_ADDRCONFIG;
    1252 dbprintf(false, p, &quot;resolving hostname: %s&quot;, p-&gt;hostname);
    1253
    &gt;&gt;&gt; CID 639937: Incorrect expression (PRECEDENCE_ERROR) &gt;&gt;&gt; Evaluates as: &quot;result = (getaddrinfo(p-&gt;hostname, NULL, &amp;hints, &amp;res) != 0)&quot;, because &quot;!=&quot; has higher operator precedence than &quot;=&quot;. The context suggests that this might be in error.
    1254 if ((result = getaddrinfo(p-&gt;hostname, NULL, &amp;hints, &amp;res) != 0)) {
    1255 store_socket_error(p, result, gai_strerror(result)); 1256 dbprintf(TRUE, p, &quot;getaddrinfo(%s) failed with error %d&quot;, p-&gt;hostname, result);
    1257 JS_SET_RVAL(cx, arglist, JSVAL_FALSE);
    1258 free(cp);
    1259 JS_RESUMEREQUEST(cx, rc);

    ** CID 639936: Error handling issues (CHECKED_RETURN)
    /js_socket.cpp: 2363 in js_socket_set(JSContext *, JSObject *, long, int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639936: Error handling issues (CHECKED_RETURN)
    /js_socket.cpp: 2363 in js_socket_set(JSContext *, JSObject *, long, int, unsigned long *)()
    2357
    2358 if (ssl_sync(scfg, lprintf)) { 2359 if ((ret = cryptCreateSession(&amp;p-&gt;session, CRYPT_UNUSED, tiny == SOCK_PROP_SSL_SESSION ? CRYPT_SESSION_TLS: CRYPT_SESSION_TLS_SERVER)) == CRYPT_OK) {
    2360 ulong nb = 0; 2361 ioctlsocket(p-&gt;sock, FIONBIO, &amp;nb);
    2362 nb = 1; &gt;&gt;&gt; CID 639936: Error handling issues (CHECKED_RETURN) &gt;&gt;&gt; Calling &quot;setsockopt(p-&gt;sock, IPPROTO_TCP, 1, (char *)&amp;nb, 8U)&quot; without checking return value. This library function may fail and return an error code.
    2363 setsockopt(p-&gt;sock, IPPROTO_TCP, TCP_NODELAY, (char*)&amp;nb, sizeof(nb));
    2364 if ((ret = do_cryptAttribute(p-&gt;session, CRYPT_SESSINFO_NETWORKSOCKET, p-&gt;sock)) == CRYPT_OK) {
    2365 int minver = CRYPT_TLSOPTION_MINVER_TLS12;
    2366 if (p-&gt;tls_minver == 100)
    2367 minver = CRYPT_TLSOPTION_MINVER_TLS10;
    2368 else if (p-&gt;tls_minver == 101)

    ** CID 639935: (INTEGER_OVERFLOW)
    /websrvr.cpp: 725 in sess_sendbuf(http_session_t *, const char *, unsigned long, volatile bool *)()
    /websrvr.cpp: 712 in sess_sendbuf(http_session_t *, const char *, unsigned long, volatile bool *)()


    _____________________________________________________________________________________________
    *** CID 639935: (INTEGER_OVERFLOW)
    /websrvr.cpp: 725 in sess_sendbuf(http_session_t *, const char *, unsigned long, volatile bool *)()
    719 else if (SOCKET_ERRNO == EPIPE) 720 lprintf(LOG_NOTICE, &quot;%04d %-5s [%s] Unable to send to peer&quot;, session-&gt;socket, session-&gt;client.protocol, session-&gt;host_ip);
    721 #endif
    722 else if (session-&gt;socket != INVALID_SOCKET)
    723 lprintf(LOG_WARNING, &quot;%04d %-5s [%s] !ERROR %d sending on socket&quot;, session-&gt;socket, session-&gt;client.protocol, session-&gt;host_ip, SOCKET_ERRNO);
    724 *failed = true;
    &gt;&gt;&gt; CID 639935: (INTEGER_OVERFLOW)
    &gt;&gt;&gt; &quot;sent&quot;, which might have underflowed, is returned from the function.
    725 return sent;
    726 }
    727 }
    728 }
    729 else {
    730 lprintf(LOG_WARNING, &quot;%04d %-5s [%s] Timeout waiting for socket to become writable&quot;, session-&gt;socket, session-&gt;client.protocol, session-&gt;host_ip);
    /websrvr.cpp: 712 in sess_sendbuf(http_session_t *, const char *, unsigned long, volatile bool *)()
    706 }
    707 else
    708 *failed = true;
    709 result = tls_sent;
    710 }
    711 else {
    &gt;&gt;&gt; CID 639935: (INTEGER_OVERFLOW)
    &gt;&gt;&gt; &quot;len - sent&quot;, which might have underflowed, is passed to &quot;send(session-&gt;socket, buf + sent, len - sent, 0)&quot;.
    712 result = sendsocket(session-&gt;socket, buf + sent, len - sent);
    713 if (result == SOCKET_ERROR) {
    714 if (SOCKET_ERRNO == ECONNRESET) 715 lprintf(LOG_NOTICE, &quot;%04d %-5s [%s] Connection reset by peer on send&quot;, session-&gt;socket, session-&gt;client.protocol, session-&gt;host_ip);
    716 else if (SOCKET_ERRNO == ECONNABORTED)
    717 lprintf(LOG_NOTICE, &quot;%04d %-5s [%s] Connection aborted by peer on send&quot;, session-&gt;socket, session-&gt;client.protocol, session-&gt;host_ip);

    ** CID 639934: Uninitialized variables (UNINIT)
    /js_user.cpp: 1279 in js_downloaded_file(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639934: Uninitialized variables (UNINIT)
    /js_user.cpp: 1279 in js_downloaded_file(JSContext *, unsigned int, unsigned long *)()
    1273
    1274 uintN argn = 0;
    1275 if (argc &gt; argn &amp;&amp; JSVAL_IS_STRING(argv[argn])) { 1276 char *p;
    1277 JSSTRING_TO_ASTRING(cx, JSVAL_TO_STRING(argv[argn]), p, LEN_EXTCODE + 2, NULL);
    1278 for (dirnum = 0; dirnum &lt; scfg-&gt;total_dirs; dirnum++)
    &gt;&gt;&gt; CID 639934: Uninitialized variables (UNINIT) &gt;&gt;&gt; Using uninitialized value &quot;*p&quot; when calling &quot;strcasecmp&quot;.
    1279 if (!stricmp(scfg-&gt;dir[dirnum]-&gt;code, p)) 1280 break;
    1281 argn++;
    1282 }
    1283 if (argc &gt; argn &amp;&amp; JSVAL_IS_STRING(argv[argn])) { 1284 JSSTRING_TO_ASTRING(cx, JSVAL_TO_STRING(argv[argn]), fname, MAX_PATH + 1, NULL);

    ** CID 639933: Error handling issues (CHECKED_RETURN)
    /js_system.cpp: 1481 in js_filter_ip(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639933: Error handling issues (CHECKED_RETURN)
    /js_system.cpp: 1481 in js_filter_ip(JSContext *, unsigned int, unsigned long *)()
    1475 js_system_private_t* sys;
    1476 if ((sys = (js_system_private_t*)js_GetClassPrivate(cx, obj, &amp;js_system_class)) == NULL)
    1477 return JS_FALSE;
    1478
    1479 for (i = 0; i &lt; argc &amp;&amp; fname == NULL; i++) {
    1480 if (JSVAL_IS_NUMBER(argv[i])) {
    &gt;&gt;&gt; CID 639933: Error handling issues (CHECKED_RETURN) &gt;&gt;&gt; Calling &quot;JS_ValueToInt32&quot; without checking return value (as is done elsewhere 236 out of 268 times).
    1481 JS_ValueToInt32(cx, argv[i], &amp;duration); 1482 continue;
    1483 }
    1484 if (!JSVAL_IS_STRING(argv[i]))
    1485 continue;
    1486 JSVALUE_TO_MSTRING(cx, argv[i], p, NULL);

    ** CID 639932: Error handling issues (CHECKED_RETURN)
    /websrvr.cpp: 1188 in close_request(http_session_t *)()


    _____________________________________________________________________________________________
    *** CID 639932: Error handling issues (CHECKED_RETURN)
    /websrvr.cpp: 1188 in close_request(http_session_t *)()
    1182 FCLOSE_OPEN_FILE(session-&gt;req.fp);
    1183
    1184 for (i = 0; i &lt; MAX_CLEANUPS; i++) {
    1185 if (session-&gt;req.cleanup_file[i] != NULL) {
    1186 if (i != CLEANUP_SSJS_TMP_FILE
    1187 || !(startup-&gt;options &amp; WEB_OPT_DEBUG_SSJS))
    &gt;&gt;&gt; CID 639932: Error handling issues (CHECKED_RETURN) &gt;&gt;&gt; Calling &quot;remove(session-&gt;req.cleanup_file[i])&quot; without checking return value. This library function may fail and return an error code.
    1188 remove(session-&gt;req.cleanup_file[i]);
    1189 free(session-&gt;req.cleanup_file[i]);
    1190 }
    1191 }
    1192
    1193 smb_freefilemem(&amp;session-&gt;file);

    ** CID 639931: Memory - illegal accesses (OVERRUN)
    /mailsrvr.cpp: 901 in sockmimetext(int, const char *, int, smbmsg_t *, char *, unsigned long, char **, char *)()


    _____________________________________________________________________________________________
    *** CID 639931: Memory - illegal accesses (OVERRUN)
    /mailsrvr.cpp: 901 in sockmimetext(int, const char *, int, smbmsg_t *, char *, unsigned long, char **, char *)()
    895 np = &quot;\r\n&quot;; // Send at least one line of message text (issue #822)
    896 else
    897 np = msgtxt;
    898 long bytes = 0;
    899 while (*np &amp;&amp; lines &lt; maxlines) {
    900 len = 0;
    &gt;&gt;&gt; CID 639931: Memory - illegal accesses (OVERRUN) &gt;&gt;&gt; Overrunning array of 3 bytes at byte offset 997 by dereferencing pointer &quot;np + len&quot;.
    901 while (len &lt; RFC822_MAX_LINE_LEN &amp;&amp; *(np + len) != 0 &amp;&amp; *(np + len) != &#39;\n&#39;)
    902 len++;
    903
    904 tlen = len;
    905 while (tlen &amp;&amp; *(np + (tlen - 1)) &lt;= &#39; &#39;) /* Takes care of &#39;\r&#39; or spaces */
    906 tlen--;

    ** CID 639930: Error handling issues (CHECKED_RETURN)
    /js_system.cpp: 1640 in js_put_node_message(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 639930: Error handling issues (CHECKED_RETURN)
    /js_system.cpp: 1640 in js_put_node_message(JSContext *, unsigned int, unsigned long *)()
    1634 return JS_FALSE;
    1635
    1636 js_system_private_t* sys;
    1637 if ((sys = (js_system_private_t*)js_GetClassPrivate(cx, obj, &amp;js_system_class)) == NULL)
    1638 return JS_FALSE;
    1639
    &gt;&gt;&gt; CID 639930: Error handling issues (CHECKED_RETURN) &gt;&gt;&gt; Calling &quot;JS_ValueToInt32&quot; without checking return value (as is done elsewhere 236 out of 268 times).
    1640 JS_ValueToInt32(cx, argv[0], &amp;node);
    1641 if (node &lt; 1)
    1642 node = 1;
    1643
    1644 if ((js_msg = JS_ValueToString(cx, argv[1])) == NULL)
    1645 return JS_FALSE;

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

    --- SBBSecho 3.33-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From scan-admin@coverity.com@1:103/705 to All on Fri Dec 19 13:45:09 2025
    ----==_mimepart_694556e537c80_cf6232c07a52839ac1056
    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 640043: (USE_AFTER_FREE)
    /js_socket.cpp: 3566 in js_listening_socket_constructor(JSContext *, unsigned int, unsigned long *)()
    /js_socket.cpp: 3540 in js_listening_socket_constructor(JSContext *, unsigned int, unsigned long *)()
    /js_socket.cpp: 3593 in js_listening_socket_constructor(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 640043: (USE_AFTER_FREE)
    /js_socket.cpp: 3566 in js_listening_socket_constructor(JSContext *, unsigned int, unsigned long *)()
    3560 }
    3561
    3562 if (!js_DefineSocketOptionsArray(cx, obj, type)) {
    3563 JS_ReportError(cx, "js_DefineSocketOptionsArray failed");
    3564 xpms_destroy(set, sock_close_cb, nullptr);
    3565 free(p);
    CID 640043: (USE_AFTER_FREE)
    Calling "free" frees pointer "set" which has already been freed.
    3566 free(set);
    3567 return JS_FALSE;
    3568 }
    3569
    3570 #ifdef BUILD_JSDOCS
    3571 js_DescribeSyncObject(cx, obj, "Class used for incoming TCP/IP socket communications", 317);
    /js_socket.cpp: 3540 in js_listening_socket_constructor(JSContext *, unsigned int, unsigned long *)()
    3534 JS_SET_RVAL(cx, arglist, OBJECT_TO_JSVAL(obj));
    3535
    3536 if ((p = (js_socket_private_t*)malloc(sizeof(js_socket_private_t))) == NULL) {
    3537 JS_ReportError(cx, "malloc failed");
    3538 free(protocol);
    3539 xpms_destroy(set, sock_close_cb, nullptr);
    CID 640043: (USE_AFTER_FREE)
    Calling "free" frees pointer "set" which has already been freed.
    3540 free(set);
    3541 return JS_FALSE;
    3542 }
    3543 memset(p, 0, sizeof(js_socket_private_t));
    3544 p->type = type;
    3545 p->set = set;
    /js_socket.cpp: 3593 in js_listening_socket_constructor(JSContext *, unsigned int, unsigned long *)()
    3587
    3588 return JS_TRUE;
    3589
    3590 fail:
    3591 xpms_destroy(set, sock_close_cb, nullptr);
    3592 free(protocol);
    CID 640043: (USE_AFTER_FREE)
    Calling "free" frees pointer "set" which has already been freed.
    3593 free(set);
    3594 return JS_FALSE;
    3595 }
    3596
    3597 static JSBool
    3598 js_socket_constructor(JSContext *cx, uintN argc, jsval *arglist)


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


    ----==_mimepart_694556e537c80_cf6232c07a52839ac1056
    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 640043: (USE_AFTER_FREE)
    /js_socket.cpp: 3566 in js_listening_socket_constructor(JSContext *, unsigned int, unsigned long *)()
    /js_socket.cpp: 3540 in js_listening_socket_constructor(JSContext *, unsigned int, unsigned long *)()
    /js_socket.cpp: 3593 in js_listening_socket_constructor(JSContext *, unsigned int, unsigned long *)()


    _____________________________________________________________________________________________
    *** CID 640043: (USE_AFTER_FREE)
    /js_socket.cpp: 3566 in js_listening_socket_constructor(JSContext *, unsigned int, unsigned long *)()
    3560 }
    3561
    3562 if (!js_DefineSocketOptionsArray(cx, obj, type)) {
    3563 JS_ReportError(cx, &quot;js_DefineSocketOptionsArray failed&quot;);
    3564 xpms_destroy(set, sock_close_cb, nullptr);
    3565 free(p);
    &gt;&gt;&gt; CID 640043: (USE_AFTER_FREE)
    &gt;&gt;&gt; Calling &quot;free&quot; frees pointer &quot;set&quot; which has already been freed.
    3566 free(set);
    3567 return JS_FALSE;
    3568 }
    3569
    3570 #ifdef BUILD_JSDOCS
    3571 js_DescribeSyncObject(cx, obj, &quot;Class used for incoming TCP/IP socket communications&quot;, 317);
    /js_socket.cpp: 3540 in js_listening_socket_constructor(JSContext *, unsigned int, unsigned long *)()
    3534 JS_SET_RVAL(cx, arglist, OBJECT_TO_JSVAL(obj));
    3535
    3536 if ((p = (js_socket_private_t*)malloc(sizeof(js_socket_private_t))) == NULL) {
    3537 JS_ReportError(cx, &quot;malloc failed&quot;);
    3538 free(protocol);
    3539 xpms_destroy(set, sock_close_cb, nullptr);
    &gt;&gt;&gt; CID 640043: (USE_AFTER_FREE)
    &gt;&gt;&gt; Calling &quot;free&quot; frees pointer &quot;set&quot; which has already been freed.
    3540 free(set);
    3541 return JS_FALSE;
    3542 }
    3543 memset(p, 0, sizeof(js_socket_private_t));
    3544 p-&gt;type = type;
    3545 p-&gt;set = set;
    /js_socket.cpp: 3593 in js_listening_socket_constructor(JSContext *, unsigned int, unsigned long *)()
    3587
    3588 return JS_TRUE;
    3589
    3590 fail:
    3591 xpms_destroy(set, sock_close_cb, nullptr);
    3592 free(protocol);
    &gt;&gt;&gt; CID 640043: (USE_AFTER_FREE)
    &gt;&gt;&gt; Calling &quot;free&quot; frees pointer &quot;set&quot; which has already been freed.
    3593 free(set);
    3594 return JS_FALSE;
    3595 }
    3596
    3597 static JSBool
    3598 js_socket_constructor(JSContext *cx, uintN argc, jsval *arglist)

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

    --- SBBSecho 3.33-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From scan-admin@coverity.com@1:103/705 to All on Sat Dec 27 13:44:41 2025
    ----==_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--

    --- SBBSecho 3.34-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From scan-admin@coverity.com@1:103/705 to All on Wed Dec 31 13:45:24 2025
    ----==_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--

    --- SBBSecho 3.34-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From scan-admin@coverity.com@1:103/705 to All on Sun Jan 4 13:50:57 2026
    ----==_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--

    --- SBBSecho 3.34-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From scan-admin@coverity.com@1:103/705 to All on Mon Jan 5 13:46:18 2026
    ----==_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--

    --- SBBSecho 3.34-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From scan-admin@coverity.com@1:103/705 to All on Wed Jan 7 13:48:08 2026
    ----==_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--

    --- SBBSecho 3.34-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From scan-admin@coverity.com@1:103/705 to All on Thu Jan 8 13:44:45 2026
    ----==_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--

    --- SBBSecho 3.34-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From scan-admin@coverity.com@1:103/705 to All on Sat Jan 10 13:44:53 2026
    ----==_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--

    --- SBBSecho 3.34-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From scan-admin@coverity.com@1:103/705 to All on Sun Jan 11 13:48:17 2026
    ----==_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--

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