----==_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); >>> 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]);
</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)