• New Defects reported by Coverity Scan for Synchronet

    From scan-admin@coverity.com@1:103/705 to cov-scan@synchro.net on Mon Aug 10 13:31:15 2026

    ----==_mimepart_6a79d2a36a35d_667552b3f398219ac62de
    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 652885: Integer handling issues (INTEGER_OVERFLOW)
    /useredit.cpp: 167 in sbbs_t::useredit(int)()


    _____________________________________________________________________________________________
    *** CID 652885: Integer handling issues (INTEGER_OVERFLOW) /useredit.cpp: 167 in sbbs_t::useredit(int)()
    161 bprintf(text[UeditPrompt], user.number, l);
    162 SAFEPRINTF4(str, "QG[]?/{}()%c%c%c%c", TERM_KEY_LEFT, TERM_KEY_RIGHT, TERM_KEY_HOME, TERM_KEY_END);
    163 if (user.level <= useron.level)
    164 SAFECAT(str, "ABCDEFHIJKLMNOPRSTUVWXYZ+~*$#"); 165 l = getkeys(str, l, K_UPPER | K_NOCRLF);
    166 if (l & 0x80000000L) {
    CID 652885: Integer handling issues (INTEGER_OVERFLOW)
    Expression "user.number", where "l & 0xffffffff7fffffffL" is known to be equal to -2147483649, overflows the type of "user.number", which is type "int".
    167 user.number = l & ~0x80000000L;
    168 continue;
    169 }
    170 if (IS_ALPHA(l) || strchr("~+*$/", l) != NULL) // non-alpha commands that prompt
    171 term->newline();
    172 switch (l) {


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


    ----==_mimepart_6a79d2a36a35d_667552b3f398219ac62de
    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 652885: Integer handling issues (INTEGER_OVERFLOW)
    /useredit.cpp: 167 in sbbs_t::useredit(int)()


    _____________________________________________________________________________________________
    *** CID 652885: Integer handling issues (INTEGER_OVERFLOW) /useredit.cpp: 167 in sbbs_t::useredit(int)()
    161 bprintf(text[UeditPrompt], user.number, l);
    162 SAFEPRINTF4(str, &quot;QG[]?/{}()%c%c%c%c&quot;, TERM_KEY_LEFT, TERM_KEY_RIGHT, TERM_KEY_HOME, TERM_KEY_END);
    163 if (user.level &lt;= useron.level)
    164 SAFECAT(str, &quot;ABCDEFHIJKLMNOPRSTUVWXYZ+~*$#&quot;);
    165 l = getkeys(str, l, K_UPPER | K_NOCRLF);
    166 if (l &amp; 0x80000000L) {
    &gt;&gt;&gt; CID 652885: Integer handling issues (INTEGER_OVERFLOW)
    &gt;&gt;&gt; Expression &quot;user.number&quot;, where &quot;l &amp; 0xffffffff7fffffffL&quot; is known to be equal to -2147483649, overflows the type of &quot;user.number&quot;, which is type &quot;int&quot;.
    167 user.number = l &amp; ~0x80000000L;
    168 continue;
    169 }
    170 if (IS_ALPHA(l) || strchr(&quot;~+*$/&quot;, l) != NULL) // non-alpha commands that prompt
    171 term-&gt;newline();
    172 switch (l) {

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

    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From scan-admin@coverity.com@1:103/705 to All on Thu Aug 20 12:49:16 2026

    ----==_mimepart_6a86f7cb759c0_1065402c19123819ac73024
    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 653403: Insecure data handling (INTEGER_OVERFLOW)
    /userdat.c: 214 in total_users()


    _____________________________________________________________________________________________
    *** CID 653403: Insecure data handling (INTEGER_OVERFLOW)
    /userdat.c: 214 in total_users()
    208 lock is a synchronous round-trip that dominates the cost of this scan
    209 when the data directory is network-mounted, and no amount of locking
    210 makes the result more current than the snapshot it already is. */
    211 do {
    212 got = 0;
    213 while (got < bufsize) {
    CID 653403: Insecure data handling (INTEGER_OVERFLOW)
    "64000UL - got", which might have underflowed, is passed to "read(file, buf + got, 64000UL - got)".
    214 ssize_t rd = read(file, buf + got, bufsize - got);
    215 if (rd <= 0)
    216 break;
    217 got += (size_t)rd;
    218 }
    219 for (size_t offset = 0; offset + USER_RECORD_LINE_LEN <= got; offset += USER_RECORD_LINE_LEN) {


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


    ----==_mimepart_6a86f7cb759c0_1065402c19123819ac73024
    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 653403: Insecure data handling (INTEGER_OVERFLOW)
    /userdat.c: 214 in total_users()


    _____________________________________________________________________________________________
    *** CID 653403: Insecure data handling (INTEGER_OVERFLOW)
    /userdat.c: 214 in total_users()
    208 lock is a synchronous round-trip that dominates the cost of this scan
    209 when the data directory is network-mounted, and no amount of locking
    210 makes the result more current than the snapshot it already is. */
    211 do {
    212 got = 0;
    213 while (got &lt; bufsize) {
    &gt;&gt;&gt; CID 653403: Insecure data handling (INTEGER_OVERFLOW) &gt;&gt;&gt; &quot;64000UL - got&quot;, which might have underflowed, is passed to &quot;read(file, buf + got, 64000UL - got)&quot;.
    214 ssize_t rd = read(file, buf + got, bufsize - got);
    215 if (rd &lt;= 0)
    216 break;
    217 got += (size_t)rd;
    218 }
    219 for (size_t offset = 0; offset + USER_RECORD_LINE_LEN &lt;= got; offset += USER_RECORD_LINE_LEN) {

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

    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From scan-admin@coverity.com@1:103/705 to All on Sun Aug 30 12:51:09 2026

    ----==_mimepart_6a94273d447c5_1a4ee42b3f152419ac2932a
    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.
    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 3 of 3 defect(s)


    ** CID 654570: (CHECKED_RETURN)
    /xtrn_sec.cpp: 1223 in sbbs_t::xtrndat(const char *, const char *, unsigned char, unsigned int, unsigned int)()
    /xtrn_sec.cpp: 1213 in sbbs_t::xtrndat(const char *, const char *, unsigned char, unsigned int, unsigned int)()


    _____________________________________________________________________________________________
    *** CID 654570: (CHECKED_RETURN)
    /xtrn_sec.cpp: 1223 in sbbs_t::xtrndat(const char *, const char *, unsigned char, unsigned int, unsigned int)()
    1217 int chmod_result = CHMOD(str, _S_IREAD);
    1218 #else
    1219 int chmod_result = CHMOD(str, S_IRUSR);
    1220 #endif
    1221 if (chmod_result != 0) {
    1222 errormsg(WHERE, ERR_WRITE, str, errno);
    CID 654570: (CHECKED_RETURN)
    Calling "remove(str)" without checking return value. This library function may fail and return an error code.
    1223 remove(str);
    1224 return false;
    1225 }
    1226 }
    1227
    1228 else if (type)
    /xtrn_sec.cpp: 1213 in sbbs_t::xtrndat(const char *, const char *, unsigned char, unsigned int, unsigned int)()
    1207 }
    1208 bool write_ok = bbsdev_write(fp, lines, sizeof(lines) / sizeof(lines[0]));
    1209 if (fclose(fp) != 0)
    1210 write_ok = false;
    1211 if (!write_ok) {
    1212 errormsg(WHERE, ERR_WRITE, str, 0);
    CID 654570: (CHECKED_RETURN)
    Calling "remove(str)" without checking return value. This library function may fail and return an error code.
    1213 remove(str);
    1214 return false;
    1215 }
    1216 #if defined(_WIN32)
    1217 int chmod_result = CHMOD(str, _S_IREAD);
    1218 #else

    ** CID 654569: Memory - illegal accesses (OVERRUN)
    /xtrn_sec.cpp: 101 in bbsdev_language_tag_valid(const char *)()


    _____________________________________________________________________________________________
    *** CID 654569: Memory - illegal accesses (OVERRUN)
    /xtrn_sec.cpp: 101 in bbsdev_language_tag_valid(const char *)()
    95 || (lengths[at] == 4 && isdigit((unsigned char)parts[at][0])
    96 && bbsdev_subtag_chars(parts[at] + 1, 3, isalnum))))
    97 at++;
    98 while (at < count && lengths[at] == 1
    99 && tolower((unsigned char)parts[at][0]) != 'x') {
    100 at++;
    CID 654569: Memory - illegal accesses (OVERRUN)
    Overrunning array "lengths" of 32 8-byte elements at element index 32 (byte offset 263) using index "at" (which evaluates to 32).
    101 if (at == count || lengths[at] < 2)
    102 return false;
    103 while (at < count && lengths[at] >= 2)
    104 at++;
    105 }
    106 if (at < count && lengths[at] == 1 && tolower((unsigned char)parts[at][0]) == 'x')

    ** CID 654568: (RESOURCE_LEAK)
    /xtrn.cpp: 1925 in sbbs_t::external(const char *, int, const char *, const char *)()
    /xtrn.cpp: 1925 in sbbs_t::external(const char *, int, const char *, const char *)()


    _____________________________________________________________________________________________
    *** CID 654568: (RESOURCE_LEAK)
    /xtrn.cpp: 1925 in sbbs_t::external(const char *, int, const char *, const char *)()
    1919 dup2(fd, STDOUT_FILENO);
    1920 if (!(mode & EX_NOLOG))
    1921 dup2(fd, STDERR_FILENO);
    1922 if (fd > 2)
    1923 close(fd);
    1924 }
    CID 654568: (RESOURCE_LEAK)
    Handle variable "fd" going out of scope leaks the handle.
    1925 }
    1926
    1927 if (mode & EX_BG) /* background execution, detach child */
    1928 {
    1929 if (daemon(TRUE, FALSE) != 0)
    1930 lprintf(LOG_ERR, "!ERROR %d (%s) daemonizing: %s", errno, strerror(errno), argv[0]);
    /xtrn.cpp: 1925 in sbbs_t::external(const char *, int, const char *, const char *)()
    1919 dup2(fd, STDOUT_FILENO);
    1920 if (!(mode & EX_NOLOG))
    1921 dup2(fd, STDERR_FILENO);
    1922 if (fd > 2)
    1923 close(fd);
    1924 }
    CID 654568: (RESOURCE_LEAK)
    Handle variable "fd" going out of scope leaks the handle.
    1925 }
    1926
    1927 if (mode & EX_BG) /* background execution, detach child */
    1928 {
    1929 if (daemon(TRUE, FALSE) != 0)
    1930 lprintf(LOG_ERR, "!ERROR %d (%s) daemonizing: %s", errno, strerror(errno), argv[0]);


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


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

    <h3>Defect Details</h3>
    <pre>
    ** CID 654570: (CHECKED_RETURN)
    /xtrn_sec.cpp: 1223 in sbbs_t::xtrndat(const char *, const char *, unsigned char, unsigned int, unsigned int)()
    /xtrn_sec.cpp: 1213 in sbbs_t::xtrndat(const char *, const char *, unsigned char, unsigned int, unsigned int)()


    _____________________________________________________________________________________________
    *** CID 654570: (CHECKED_RETURN)
    /xtrn_sec.cpp: 1223 in sbbs_t::xtrndat(const char *, const char *, unsigned char, unsigned int, unsigned int)()
    1217 int chmod_result = CHMOD(str, _S_IREAD);
    1218 #else
    1219 int chmod_result = CHMOD(str, S_IRUSR);
    1220 #endif
    1221 if (chmod_result != 0) {
    1222 errormsg(WHERE, ERR_WRITE, str, errno); &gt;&gt;&gt; CID 654570: (CHECKED_RETURN)
    &gt;&gt;&gt; Calling &quot;remove(str)&quot; without checking return value. This library function may fail and return an error code.
    1223 remove(str);
    1224 return false;
    1225 }
    1226 }
    1227
    1228 else if (type)
    /xtrn_sec.cpp: 1213 in sbbs_t::xtrndat(const char *, const char *, unsigned char, unsigned int, unsigned int)()
    1207 }
    1208 bool write_ok = bbsdev_write(fp, lines, sizeof(lines) / sizeof(lines[0]));
    1209 if (fclose(fp) != 0)
    1210 write_ok = false;
    1211 if (!write_ok) {
    1212 errormsg(WHERE, ERR_WRITE, str, 0); &gt;&gt;&gt; CID 654570: (CHECKED_RETURN)
    &gt;&gt;&gt; Calling &quot;remove(str)&quot; without checking return value. This library function may fail and return an error code.
    1213 remove(str);
    1214 return false;
    1215 }
    1216 #if defined(_WIN32)
    1217 int chmod_result = CHMOD(str, _S_IREAD);
    1218 #else

    ** CID 654569: Memory - illegal accesses (OVERRUN)
    /xtrn_sec.cpp: 101 in bbsdev_language_tag_valid(const char *)()


    _____________________________________________________________________________________________
    *** CID 654569: Memory - illegal accesses (OVERRUN)
    /xtrn_sec.cpp: 101 in bbsdev_language_tag_valid(const char *)()
    95 || (lengths[at] == 4 &amp;&amp; isdigit((unsigned char)parts[at][0])
    96 &amp;&amp; bbsdev_subtag_chars(parts[at] + 1, 3, isalnum))))
    97 at++;
    98 while (at &lt; count &amp;&amp; lengths[at] == 1
    99 &amp;&amp; tolower((unsigned char)parts[at][0]) != &#39;x&#39;) { 100 at++;
    &gt;&gt;&gt; CID 654569: Memory - illegal accesses (OVERRUN) &gt;&gt;&gt; Overrunning array &quot;lengths&quot; of 32 8-byte elements at element index 32 (byte offset 263) using index &quot;at&quot; (which evaluates to 32).
    101 if (at == count || lengths[at] &lt; 2)
    102 return false;
    103 while (at &lt; count &amp;&amp; lengths[at] &gt;= 2) 104 at++;
    105 }
    106 if (at &lt; count &amp;&amp; lengths[at] == 1 &amp;&amp; tolower((unsigned char)parts[at][0]) == &#39;x&#39;)

    ** CID 654568: (RESOURCE_LEAK)
    /xtrn.cpp: 1925 in sbbs_t::external(const char *, int, const char *, const char *)()
    /xtrn.cpp: 1925 in sbbs_t::external(const char *, int, const char *, const char *)()


    _____________________________________________________________________________________________
    *** CID 654568: (RESOURCE_LEAK)
    /xtrn.cpp: 1925 in sbbs_t::external(const char *, int, const char *, const char *)()
    1919 dup2(fd, STDOUT_FILENO);
    1920 if (!(mode &amp; EX_NOLOG))
    1921 dup2(fd, STDERR_FILENO);
    1922 if (fd &gt; 2)
    1923 close(fd);
    1924 }
    &gt;&gt;&gt; CID 654568: (RESOURCE_LEAK)
    &gt;&gt;&gt; Handle variable &quot;fd&quot; going out of scope leaks the handle.
    1925 }
    1926
    1927 if (mode &amp; EX_BG) /* background execution, detach child */
    1928 {
    1929 if (daemon(TRUE, FALSE) != 0)
    1930 lprintf(LOG_ERR, &quot;!ERROR %d (%s) daemonizing: %s&quot;, errno, strerror(errno), argv[0]);
    /xtrn.cpp: 1925 in sbbs_t::external(const char *, int, const char *, const char *)()
    1919 dup2(fd, STDOUT_FILENO);
    1920 if (!(mode &amp; EX_NOLOG))
    1921 dup2(fd, STDERR_FILENO);
    1922 if (fd &gt; 2)
    1923 close(fd);
    1924 }
    &gt;&gt;&gt; CID 654568: (RESOURCE_LEAK)
    &gt;&gt;&gt; Handle variable &quot;fd&quot; going out of scope leaks the handle.
    1925 }
    1926
    1927 if (mode &amp; EX_BG) /* background execution, detach child */
    1928 {
    1929 if (daemon(TRUE, FALSE) != 0)
    1930 lprintf(LOG_ERR, &quot;!ERROR %d (%s) daemonizing: %s&quot;, errno, strerror(errno), argv[0]);

    </pre>

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

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

    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From scan-admin@coverity.com@1:103/705 to All on Mon Sep 7 14:25:22 2026

    ----==_mimepart_6a9ec9519c7f0_2264d92b3f152419ac2938d
    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.


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


    ** CID 655740: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Sep-07-2026/src/conio/sdl_con.c: 501 in sdl_init()


    _____________________________________________________________________________________________
    *** CID 655740: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Sep-07-2026/src/conio/sdl_con.c: 501 in sdl_init()
    495 _beginthread(sdl_video_event_thread, 0, NULL);
    496 #endif
    497 sdl_user_func_ret(SDL_USEREVENT_INIT);
    498 sdl_init_mode(ciolib_initial_mode);
    499
    500 if(sdl_init_good) {
    CID 655740: Concurrent data access violations (MISSING_LOCK) >>> Accessing "fullscreen" without holding lock "win_mutex". Elsewhere, "fullscreen" is written to with "win_mutex" held 3 out of 3 times (3 of these accesses strongly imply that it is necessary).
    501 cio_api.mode=fullscreen?CIOLIB_MODE_SDL_FULLSCREEN:CIOLIB_MODE_SDL;
    502 #ifdef _WIN32
    503 FreeConsole();
    504 #endif
    505 cio_api.options |= CONIO_OPT_PALETTE_SETTING | CONIO_OPT_SET_TITLE | CONIO_OPT_SET_NAME | CONIO_OPT_SET_ICON | CONIO_OPT_EXTERNAL_SCALING | CONIO_OPT_KEY_EVENTS;
    506 return(0);

    ** CID 655739: (ATOMICITY)
    /main.cpp: 2782 in output_thread(void *)()
    /main.cpp: 2764 in output_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 655739: (ATOMICITY)
    /main.cpp: 2782 in output_thread(void *)()
    2776 /* Handle the SSH error here. The lprintf inside GCESSTR
    2777 * runs while ssh_mutex is held; releasing+reacquiring it
    2778 * across the error report would make the error-handling
    2779 * sequence racy (ssh_errors++, online=FALSE) and is the
    2780 * wrong tradeoff for a fast log write. */
    2781 // coverity[SLEEP:SUPPRESS]
    CID 655739: (ATOMICITY)
    Using an unreliable value of "GCES_level" inside the second locked section. If the data that "GCES_level" depends on was changed by another thread, this use might be incorrect.
    2782 GCESSTR(err, node, sbbs->ssh_session, "pushing data");
    2783 sbbs->online = false; 2784 sendbytes = buftop - bufbot;
    2785 i = sendbytes; // Pretend we sent it all
    2786 }
    2787 else {
    /main.cpp: 2764 in output_thread(void *)()
    2758 }
    2759 if (sbbs->session_channel == -1) {
    2760 i = sendbytes; // Pretend we sent it all
    2761 }
    2762 else {
    2763 if (cryptStatusError((err = cryptSetAttribute(sbbs->ssh_session, CRYPT_SESSINFO_SSH_CHANNEL, sbbs->session_channel)))) {
    CID 655739: (ATOMICITY)
    Using an unreliable value of "GCES_level" inside the second locked section. If the data that "GCES_level" depends on was changed by another thread, this use might be incorrect.
    2764 GCESSTR(err, node, sbbs->ssh_session, "setting channel");
    2765 sbbs->online = false;
    2766 i = sendbytes; // Pretend we sent it all
    2767 }
    2768 else {
    2769 /*


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


    ----==_mimepart_6a9ec9519c7f0_2264d92b3f152419ac2938d
    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><strong>Defects Shown:</strong> Showing 2 of 2 defect(s)</li>
    </ul>

    <h3>Defect Details</h3>
    <pre>
    ** CID 655740: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Sep-07-2026/src/conio/sdl_con.c: 501 in sdl_init()


    _____________________________________________________________________________________________
    *** CID 655740: Concurrent data access violations (MISSING_LOCK) /tmp/sbbs-Sep-07-2026/src/conio/sdl_con.c: 501 in sdl_init()
    495 _beginthread(sdl_video_event_thread, 0, NULL);
    496 #endif
    497 sdl_user_func_ret(SDL_USEREVENT_INIT);
    498 sdl_init_mode(ciolib_initial_mode);
    499
    500 if(sdl_init_good) {
    &gt;&gt;&gt; CID 655740: Concurrent data access violations (MISSING_LOCK)
    &gt;&gt;&gt; Accessing &quot;fullscreen&quot; without holding lock &quot;win_mutex&quot;. Elsewhere, &quot;fullscreen&quot; is written to with &quot;win_mutex&quot; held 3 out of 3 times (3 of these accesses strongly imply that it is necessary).
    501 cio_api.mode=fullscreen?CIOLIB_MODE_SDL_FULLSCREEN:CIOLIB_MODE_SDL;
    502 #ifdef _WIN32
    503 FreeConsole();
    504 #endif
    505 cio_api.options |= CONIO_OPT_PALETTE_SETTING | CONIO_OPT_SET_TITLE | CONIO_OPT_SET_NAME | CONIO_OPT_SET_ICON | CONIO_OPT_EXTERNAL_SCALING | CONIO_OPT_KEY_EVENTS;
    506 return(0);

    ** CID 655739: (ATOMICITY)
    /main.cpp: 2782 in output_thread(void *)()
    /main.cpp: 2764 in output_thread(void *)()


    _____________________________________________________________________________________________
    *** CID 655739: (ATOMICITY)
    /main.cpp: 2782 in output_thread(void *)()
    2776 /* Handle the SSH error here. The lprintf inside GCESSTR
    2777 * runs while ssh_mutex is held; releasing+reacquiring it
    2778 * across the error report would make the error-handling
    2779 * sequence racy (ssh_errors++, online=FALSE) and is the
    2780 * wrong tradeoff for a fast log write. */
    2781 // coverity[SLEEP:SUPPRESS]
    &gt;&gt;&gt; CID 655739: (ATOMICITY)
    &gt;&gt;&gt; Using an unreliable value of &quot;GCES_level&quot; inside the second locked section. If the data that &quot;GCES_level&quot; depends on was changed by another thread, this use might be incorrect.
    2782 GCESSTR(err, node, sbbs-&gt;ssh_session, &quot;pushing data&quot;);
    2783 sbbs-&gt;online = false;
    2784 sendbytes = buftop - bufbot;
    2785 i = sendbytes; // Pretend we sent it all
    2786 }
    2787 else {
    /main.cpp: 2764 in output_thread(void *)()
    2758 }
    2759 if (sbbs-&gt;session_channel == -1) {
    2760 i = sendbytes; // Pretend we sent it all
    2761 }
    2762 else {
    2763 if (cryptStatusError((err = cryptSetAttribute(sbbs-&gt;ssh_session, CRYPT_SESSINFO_SSH_CHANNEL, sbbs-&gt;session_channel)))) {
    &gt;&gt;&gt; CID 655739: (ATOMICITY)
    &gt;&gt;&gt; Using an unreliable value of &quot;GCES_level&quot; inside the second locked section. If the data that &quot;GCES_level&quot; depends on was changed by another thread, this use might be incorrect.
    2764 GCESSTR(err, node, sbbs-&gt;ssh_session, &quot;setting channel&quot;);
    2765 sbbs-&gt;online = false;
    2766 i = sendbytes; // Pretend we sent it all
    2767 }
    2768 else {
    2769 /*

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

    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From scan-admin@coverity.com@1:103/705 to cov-scan@synchro.net on Mon Sep 14 13:45:35 2026

    ----==_mimepart_6aa7fa7ebcb51_297e652b6718b7799c607a
    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 656168: High impact quality (Y2K38_SAFETY)
    /main.cpp: 4542 in update_client_ini(sbbs_t *, const long *)()


    _____________________________________________________________________________________________
    *** CID 656168: High impact quality (Y2K38_SAFETY)
    /main.cpp: 4542 in update_client_ini(sbbs_t *, const long *)()
    4536 iniCloseFile(fp);
    4537 return;
    4538 }
    4539 iniSetUInteger(&ini, ROOT_SECTION, "user", (uint)sbbs->useron.number, NULL);
    4540 iniSetString(&ini, ROOT_SECTION, "name", sbbs->useron.alias, NULL);
    4541 if (done != NULL)
    CID 656168: High impact quality (Y2K38_SAFETY)
    A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "*done" is cast to "uint".
    4542 iniSetUInteger(&ini, ROOT_SECTION, "done", (uint)*done, NULL);
    4543 iniWriteFile(fp, ini);
    4544 iniCloseFile(fp);
    4545 iniFreeStringList(ini);
    4546 }
    4547


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


    ----==_mimepart_6aa7fa7ebcb51_297e652b6718b7799c607a
    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 656168: High impact quality (Y2K38_SAFETY)
    /main.cpp: 4542 in update_client_ini(sbbs_t *, const long *)()


    _____________________________________________________________________________________________
    *** CID 656168: High impact quality (Y2K38_SAFETY)
    /main.cpp: 4542 in update_client_ini(sbbs_t *, const long *)()
    4536 iniCloseFile(fp);
    4537 return;
    4538 }
    4539 iniSetUInteger(&amp;ini, ROOT_SECTION, &quot;user&quot;, (uint)sbbs-&gt;useron.number, NULL);
    4540 iniSetString(&amp;ini, ROOT_SECTION, &quot;name&quot;, sbbs-&gt;useron.alias, NULL);
    4541 if (done != NULL)
    &gt;&gt;&gt; CID 656168: 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;*done&quot; is cast to &quot;uint&quot;.
    4542 iniSetUInteger(&amp;ini, ROOT_SECTION, &quot;done&quot;, (uint)*done, NULL);
    4543 iniWriteFile(fp, ini);
    4544 iniCloseFile(fp);
    4545 iniFreeStringList(ini);
    4546 }
    4547

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

    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From scan-admin@coverity.com@1:103/705 to cov-scan@synchro.net on Fri Sep 25 14:41:33 2026

    ----==_mimepart_6ab6881d2c31b_354bfd2b6718b7799c6040
    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 656507: Error handling issues (CHECKED_RETURN) /tmp/sbbs-Sep-24-2026/src/xpdev/genwrap.c: 1530 in xp_pipe_open()


    _____________________________________________________________________________________________
    *** CID 656507: Error handling issues (CHECKED_RETURN) /tmp/sbbs-Sep-24-2026/src/xpdev/genwrap.c: 1530 in xp_pipe_open() 1524 FILE* fp;
    1525
    1526 /* A pipe is one-way, so the bidirectional mode gets a socket pair,
    1527 which is what the BSD popen() uses for it. */
    1528 if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv) != 0)
    1529 return NULL;
    CID 656507: Error handling issues (CHECKED_RETURN)
    Calling "fcntl(sv[0], 2, 1)" without checking return value. This library function may fail and return an error code.
    1530 fcntl(sv[0], F_SETFD, FD_CLOEXEC); /* our end isn't the command's */
    1531 if ((pid = fork()) == 0) {
    1532 close(sv[0]);
    1533 dup2(sv[1], STDIN_FILENO);
    1534 dup2(sv[1], STDOUT_FILENO);
    1535 if (sv[1] > STDERR_FILENO)


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


    ----==_mimepart_6ab6881d2c31b_354bfd2b6718b7799c6040
    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 656507: Error handling issues (CHECKED_RETURN) /tmp/sbbs-Sep-24-2026/src/xpdev/genwrap.c: 1530 in xp_pipe_open()


    _____________________________________________________________________________________________
    *** CID 656507: Error handling issues (CHECKED_RETURN) /tmp/sbbs-Sep-24-2026/src/xpdev/genwrap.c: 1530 in xp_pipe_open() 1524 FILE* fp;
    1525
    1526 /* A pipe is one-way, so the bidirectional mode gets a socket pair,
    1527 which is what the BSD popen() uses for it. */
    1528 if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv) != 0)
    1529 return NULL;
    &gt;&gt;&gt; CID 656507: Error handling issues (CHECKED_RETURN) &gt;&gt;&gt; Calling &quot;fcntl(sv[0], 2, 1)&quot; without checking return value. This library function may fail and return an error code.
    1530 fcntl(sv[0], F_SETFD, FD_CLOEXEC); /* our end isn&#39;t the command&#39;s */
    1531 if ((pid = fork()) == 0) {
    1532 close(sv[0]);
    1533 dup2(sv[1], STDIN_FILENO);
    1534 dup2(sv[1], STDOUT_FILENO);
    1535 if (sv[1] &gt; STDERR_FILENO)

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

    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From scan-admin@coverity.com@1:103/705 to All on Thu Oct 1 10:10:40 2026

    ----==_mimepart_6abe319fc4e9d_3b64712c3f1480d994457d6
    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.

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


    ** CID 656690: Error handling issues (CHECKED_RETURN)
    /websrvr.cpp: 2622 in js_add_cookieval(http_session_t *, const char *, const char *)()


    _____________________________________________________________________________________________
    *** CID 656690: Error handling issues (CHECKED_RETURN)
    /websrvr.cpp: 2622 in js_add_cookieval(http_session_t *, const char *, const char *)()
    2616 errprintf(LOG_ERR, WHERE, "%04d %-5s [%s] failed to create JSString for cookie value '%s', key=%s"
    2617 , session->socket, session->client.protocol, session->host_ip, value, key);
    2618 else {
    2619 lprintf(LOG_DEBUG, "%04d %-5s [%s] Adding cookie value %s=%s at pos %d"
    2620 , session->socket, session->client.protocol, session->host_ip, key, value, alen);
    2621 val = STRING_TO_JSVAL(js_str);
    CID 656690: Error handling issues (CHECKED_RETURN)
    Calling "JS_SetElement" without checking return value (as is done elsewhere 32 out of 40 times).
    2622 JS_SetElement(session->js_cx, keyarray, alen, &val); 2623 }
    2624 }
    2625
    2626 static void js_add_request_property(http_session_t * session, const char *key, const char *value, size_t len, bool writeable)
    2627 {

    ** CID 656689: Error handling issues (CHECKED_RETURN)
    /str.cpp: 1190 in sbbs_t::xfer_prot_menu(XFER_TYPE, user_t *, char *, unsigned long, const char *)()


    _____________________________________________________________________________________________
    *** CID 656689: Error handling issues (CHECKED_RETURN)
    /str.cpp: 1190 in sbbs_t::xfer_prot_menu(XFER_TYPE, user_t *, char *, unsigned long, const char *)()
    1184 for (int i = 0; i < cfg.total_prots; i++) {
    1185 if (available(i) && count + 1 < size)
    1186 keys[count++] = cfg.prot[i]->mnemonic; 1187 }
    1188 keys[count] = '\0';
    1189 if (extra_keys != nullptr)
    CID 656689: Error handling issues (CHECKED_RETURN)
    Calling "strlcat" without checking return value (as is done elsewhere 29 out of 31 times).
    1190 strlcat(keys, extra_keys, size);
    1191 set_cmd_keys(keys);
    1192 }
    1193 if (type == XFER_DOWNLOAD && current_file != nullptr)
    1194 menu("download", P_NOERROR);
    1195 bool menu_used = menu(prot_menu_file[type], P_NOERROR);

    ** CID 656688: Memory - corruptions (ARRAY_VS_SINGLETON)


    _____________________________________________________________________________________________
    *** CID 656688: Memory - corruptions (ARRAY_VS_SINGLETON) /js_console.cpp: 93 in js_key_str(JSContext *, char)()
    87 , CON_PROP_OUTPUT_RATE
    88 };
    89
    90 extern JSClass js_console_class;
    91 static JSString* js_key_str(JSContext* cx, char key)
    92 {
    CID 656688: Memory - corruptions (ARRAY_VS_SINGLETON)
    Passing "&key" to function "JS_NewStringCopyN" which uses it as an array. This might corrupt or misinterpret adjacent memory locations.
    93 return JS_NewStringCopyN(cx, &key, key == 0 ? 0 : 1);
    94 }
    95
    96 static JSBool js_console_get(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
    97 {
    98 jsval idval;

    ** CID 656687: (CHECKED_RETURN)
    /qwk.cpp: 456 in sbbs_t::qwk_download()()
    /qwk.cpp: 417 in sbbs_t::qwk_download()()


    _____________________________________________________________________________________________
    *** CID 656687: (CHECKED_RETURN)
    /qwk.cpp: 456 in sbbs_t::qwk_download()()
    450 }
    451 if (!sent) {
    452 for (int i = 0; i < cfg.total_subs; i++)
    453 subscan[i].ptr = sav_ptr[i];
    454 last_ns_time = ns_time;
    455 }
    CID 656687: (CHECKED_RETURN)
    Calling "remove(path)" without checking return value. This library function may fail and return an error code.
    456 remove(path);
    457 free(sav_ptr);
    458 return sent;
    459 }
    460
    461 /****************************************************************************/
    /qwk.cpp: 417 in sbbs_t::qwk_download()()
    411 return false;
    412 }
    413 for (int i = 0; i < cfg.total_subs; i++)
    414 sav_ptr[i] = subscan[i].ptr;
    415 snprintf(path, sizeof path, "%s%s.qwk", cfg.temp_dir, cfg.sys_id);
    416 snprintf(fname, sizeof fname, "%s.qwk", cfg.sys_id);
    CID 656687: (CHECKED_RETURN)
    Calling "remove(path)" without checking return value. This library function may fail and return an error code.
    417 remove(path);
    418 if (pack_qwk(path, &msgcnt, /* prepack: */ false)) {
    419 off_t l = flength(path);
    420 bprintf(text[FiFilename], getfname(path));
    421 bprintf(text[FiFileSize], u64toac(l, tmp)
    422 , byte_estimate_to_str(l, tmp2, sizeof(tmp2), /* units: */ 1024, /* precision: */ 1));

    ** CID 656686: Error handling issues (CHECKED_RETURN)
    /websrvr.cpp: 2584 in js_add_queryval(http_session_t *, const char *, const char *)()


    _____________________________________________________________________________________________
    *** CID 656686: Error handling issues (CHECKED_RETURN)
    /websrvr.cpp: 2584 in js_add_queryval(http_session_t *, const char *, const char *)()
    2578 errprintf(LOG_ERR, WHERE, "%04d %-5s [%s] failed to create JSString for query value '%s', key=%s"
    2579 , session->socket, session->client.protocol, session->host_ip, value, key);
    2580 else {
    2581 lprintf(LOG_DEBUG, "%04d %-5s [%s] Adding query value %s=%s at pos %d"
    2582 , session->socket, session->client.protocol, session->host_ip, key, value, alen);
    2583 val = STRING_TO_JSVAL(js_str);
    CID 656686: Error handling issues (CHECKED_RETURN)
    Calling "JS_SetElement" without checking return value (as is done elsewhere 32 out of 40 times).
    2584 JS_SetElement(session->js_cx, keyarray, alen, &val); 2585 }
    2586 }
    2587
    2588 static void js_add_cookieval(http_session_t * session, const char *key, const char *value)
    2589 {


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


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

    <h3>Defect Details</h3>
    <pre>
    ** CID 656690: Error handling issues (CHECKED_RETURN)
    /websrvr.cpp: 2622 in js_add_cookieval(http_session_t *, const char *, const char *)()


    _____________________________________________________________________________________________
    *** CID 656690: Error handling issues (CHECKED_RETURN)
    /websrvr.cpp: 2622 in js_add_cookieval(http_session_t *, const char *, const char *)()
    2616 errprintf(LOG_ERR, WHERE, &quot;%04d %-5s [%s] failed to create JSString for cookie value &#39;%s&#39;, key=%s&quot;
    2617 , session-&gt;socket, session-&gt;client.protocol, session-&gt;host_ip, value, key);
    2618 else {
    2619 lprintf(LOG_DEBUG, &quot;%04d %-5s [%s] Adding cookie value %s=%s at pos %d&quot;
    2620 , session-&gt;socket, session-&gt;client.protocol, session-&gt;host_ip, key, value, alen);
    2621 val = STRING_TO_JSVAL(js_str);
    &gt;&gt;&gt; CID 656690: Error handling issues (CHECKED_RETURN) &gt;&gt;&gt; Calling &quot;JS_SetElement&quot; without checking return value (as is done elsewhere 32 out of 40 times).
    2622 JS_SetElement(session-&gt;js_cx, keyarray, alen, &amp;val);
    2623 }
    2624 }
    2625
    2626 static void js_add_request_property(http_session_t * session, const char *key, const char *value, size_t len, bool writeable)
    2627 {

    ** CID 656689: Error handling issues (CHECKED_RETURN)
    /str.cpp: 1190 in sbbs_t::xfer_prot_menu(XFER_TYPE, user_t *, char *, unsigned long, const char *)()


    _____________________________________________________________________________________________
    *** CID 656689: Error handling issues (CHECKED_RETURN)
    /str.cpp: 1190 in sbbs_t::xfer_prot_menu(XFER_TYPE, user_t *, char *, unsigned long, const char *)()
    1184 for (int i = 0; i &lt; cfg.total_prots; i++) {
    1185 if (available(i) &amp;&amp; count + 1 &lt; size)
    1186 keys[count++] = cfg.prot[i]-&gt;mnemonic;
    1187 }
    1188 keys[count] = &#39;\0&#39;;
    1189 if (extra_keys != nullptr)
    &gt;&gt;&gt; CID 656689: Error handling issues (CHECKED_RETURN) &gt;&gt;&gt; Calling &quot;strlcat&quot; without checking return value (as is done elsewhere 29 out of 31 times).
    1190 strlcat(keys, extra_keys, size);
    1191 set_cmd_keys(keys);
    1192 }
    1193 if (type == XFER_DOWNLOAD &amp;&amp; current_file != nullptr) 1194 menu(&quot;download&quot;, P_NOERROR);
    1195 bool menu_used = menu(prot_menu_file[type], P_NOERROR);

    ** CID 656688: Memory - corruptions (ARRAY_VS_SINGLETON)


    _____________________________________________________________________________________________
    *** CID 656688: Memory - corruptions (ARRAY_VS_SINGLETON) /js_console.cpp: 93 in js_key_str(JSContext *, char)()
    87 , CON_PROP_OUTPUT_RATE
    88 };
    89
    90 extern JSClass js_console_class;
    91 static JSString* js_key_str(JSContext* cx, char key)
    92 {
    &gt;&gt;&gt; CID 656688: Memory - corruptions (ARRAY_VS_SINGLETON) &gt;&gt;&gt; Passing &quot;&amp;key&quot; to function &quot;JS_NewStringCopyN&quot; which uses it as an array. This might corrupt or misinterpret adjacent memory locations.
    93 return JS_NewStringCopyN(cx, &amp;key, key == 0 ? 0 : 1);
    94 }
    95
    96 static JSBool js_console_get(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
    97 {
    98 jsval idval;

    ** CID 656687: (CHECKED_RETURN)
    /qwk.cpp: 456 in sbbs_t::qwk_download()()
    /qwk.cpp: 417 in sbbs_t::qwk_download()()


    _____________________________________________________________________________________________
    *** CID 656687: (CHECKED_RETURN)
    /qwk.cpp: 456 in sbbs_t::qwk_download()()
    450 }
    451 if (!sent) {
    452 for (int i = 0; i &lt; cfg.total_subs; i++)
    453 subscan[i].ptr = sav_ptr[i];
    454 last_ns_time = ns_time;
    455 }
    &gt;&gt;&gt; CID 656687: (CHECKED_RETURN)
    &gt;&gt;&gt; Calling &quot;remove(path)&quot; without checking return value. This library function may fail and return an error code.
    456 remove(path);
    457 free(sav_ptr);
    458 return sent;
    459 }
    460
    461 /****************************************************************************/
    /qwk.cpp: 417 in sbbs_t::qwk_download()()
    411 return false;
    412 }
    413 for (int i = 0; i &lt; cfg.total_subs; i++)
    414 sav_ptr[i] = subscan[i].ptr;
    415 snprintf(path, sizeof path, &quot;%s%s.qwk&quot;, cfg.temp_dir, cfg.sys_id);
    416 snprintf(fname, sizeof fname, &quot;%s.qwk&quot;, cfg.sys_id); &gt;&gt;&gt; CID 656687: (CHECKED_RETURN)
    &gt;&gt;&gt; Calling &quot;remove(path)&quot; without checking return value. This library function may fail and return an error code.
    417 remove(path);
    418 if (pack_qwk(path, &amp;msgcnt, /* prepack: */ false)) {
    419 off_t l = flength(path);
    420 bprintf(text[FiFilename], getfname(path));
    421 bprintf(text[FiFileSize], u64toac(l, tmp)
    422 , byte_estimate_to_str(l, tmp2, sizeof(tmp2), /* units: */ 1024, /* precision: */ 1));

    ** CID 656686: Error handling issues (CHECKED_RETURN)
    /websrvr.cpp: 2584 in js_add_queryval(http_session_t *, const char *, const char *)()


    _____________________________________________________________________________________________
    *** CID 656686: Error handling issues (CHECKED_RETURN)
    /websrvr.cpp: 2584 in js_add_queryval(http_session_t *, const char *, const char *)()
    2578 errprintf(LOG_ERR, WHERE, &quot;%04d %-5s [%s] failed to create JSString for query value &#39;%s&#39;, key=%s&quot;
    2579 , session-&gt;socket, session-&gt;client.protocol, session-&gt;host_ip, value, key);
    2580 else {
    2581 lprintf(LOG_DEBUG, &quot;%04d %-5s [%s] Adding query value %s=%s at pos %d&quot;
    2582 , session-&gt;socket, session-&gt;client.protocol, session-&gt;host_ip, key, value, alen);
    2583 val = STRING_TO_JSVAL(js_str);
    &gt;&gt;&gt; CID 656686: Error handling issues (CHECKED_RETURN) &gt;&gt;&gt; Calling &quot;JS_SetElement&quot; without checking return value (as is done elsewhere 32 out of 40 times).
    2584 JS_SetElement(session-&gt;js_cx, keyarray, alen, &amp;val);
    2585 }
    2586 }
    2587
    2588 static void js_add_cookieval(http_session_t * session, const char *key, const char *value)
    2589 {

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

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