Just a sample of the Echomail archive
[ << oldest | < older | list | newer > | newest >> ]
|  Message 48580  |
|  scan-admin@coverity.com to All  |
|  New Defects reported by Coverity Scan fo  |
|  07 Jan 26 13:48:08  |
 
TZUTC: 0000
MSGID: 54011.syncprog@1:103/705 2dc46d16
PID: Synchronet 3.21b-Linux master/7ed899d1c Jan 06 2026 GCC 12.2.0
TID: SBBSecho 3.34-Linux master/7ed899d1c Jan 06 2026 GCC 12.2.0
BBSID: VERT
CHRS: ASCII 1
FORMAT: flowed
----==_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.coverit
.com/projects/synchronet?tab=overview
----==_mimepart_695e6417e6a62_1f55b62c2daae1599845373
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
Defect Details
** 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_M
NY_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;
Best regards, The Coverity Scan Admin Team |
[ << oldest | < older | list | newer > | newest >> ]