Subj : New Defects reported by Coverity Scan for Synchronet To : All From : scan-admin@coverity.com Date : Mon Aug 18 2025 13:37:12 ----==_mimepart_68a32c876d3fd_16fcff2e2b69fdf990236c2 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 584091: (Y2K38_SAFETY) /logon.cpp: 631 in sbbs_t::logonstats()() /logon.cpp: 642 in sbbs_t::logonstats()() /logon.cpp: 638 in sbbs_t::logonstats()() _____________________________________________________________________________________________ *** CID 584091: (Y2K38_SAFETY) /logon.cpp: 631 in sbbs_t::logonstats()() 625 errormsg(WHERE, ERR_READ, "system stats"); 626 return 0; 627 } 628 629 now = time(NULL); 630 if (stats.date > now + (24L * 60L * 60L)) /* More than a day in the future? */ >>> CID 584091: (Y2K38_SAFETY) >>> A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "stats.date" is cast to "int". 631 errormsg(WHERE, ERR_CHK, "Daily stats date/time stamp", (int)stats.date); 632 633 if (!dates_are_same(now, stats.date)) { 634 635 struct tm tm{}; 636 struct tm update_tm{}; /logon.cpp: 642 in sbbs_t::logonstats()() 636 struct tm update_tm{}; 637 if (localtime_r(&stats.date, &update_tm) == NULL) { 638 errormsg(WHERE, ERR_CHK, "Daily stats date/time break down", (int)stats.date); 639 return 0; 640 } 641 if (localtime_r(&now, &tm) == NULL) { >>> CID 584091: (Y2K38_SAFETY) >>> A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "stats.date" is cast to "int". 642 errormsg(WHERE, ERR_CHK, "Current date/time break down", (int)stats.date); 643 return 0; 644 } 645 646 sys_status |= SS_NEW_DAY; 647 if (tm.tm_mon != update_tm.tm_mon) /logon.cpp: 638 in sbbs_t::logonstats()() 632 633 if (!dates_are_same(now, stats.date)) { 634 635 struct tm tm{}; 636 struct tm update_tm{}; 637 if (localtime_r(&stats.date, &update_tm) == NULL) { >>> CID 584091: (Y2K38_SAFETY) >>> A "time_t" value is stored in an integer with too few bits to accommodate it. The expression "stats.date" is cast to "int". 638 errormsg(WHERE, ERR_CHK, "Daily stats date/time break down", (int)stats.date); 639 return 0; 640 } 641 if (localtime_r(&now, &tm) == NULL) { 642 errormsg(WHERE, ERR_CHK, "Current date/time break down", (int)stats.date); 643 return 0; ________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/synchronet?tab=overview ----==_mimepart_68a32c876d3fd_16fcff2e2b69fdf990236c2 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit New Defects Reported - Synchronet

Hi,

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

Defect Details

** CID 584091:         (Y2K38_SAFETY)
/logon.cpp: 631           in sbbs_t::logonstats()()
/logon.cpp: 642           in sbbs_t::logonstats()()
/logon.cpp: 638           in sbbs_t::logonstats()()


_____________________________________________________________________________________________
*** CID 584091:           (Y2K38_SAFETY)
/logon.cpp: 631             in sbbs_t::logonstats()()
625     		errormsg(WHERE, ERR_READ, "system stats");
626     		return 0;
627     	}
628
629     	now = time(NULL);
630     	if (stats.date > now + (24L * 60L * 60L)) /* More than a day in the future? */
>>>     CID 584091:           (Y2K38_SAFETY)
>>>     A "time_t" value is stored in an integer with too few bits to accommodate it.  The expression "stats.date" is cast to "int".
631     		errormsg(WHERE, ERR_CHK, "Daily stats date/time stamp", (int)stats.date);
632
633     	if (!dates_are_same(now, stats.date)) {
634
635     		struct tm tm{};
636     		struct tm update_tm{};
/logon.cpp: 642             in sbbs_t::logonstats()()
636     		struct tm update_tm{};
637     		if (localtime_r(&stats.date, &update_tm) == NULL) {
638     			errormsg(WHERE, ERR_CHK, "Daily stats date/time break down", (int)stats.date);
639     			return 0;
640     		}
641     		if (localtime_r(&now, &tm) == NULL) {
>>>     CID 584091:           (Y2K38_SAFETY)
>>>     A "time_t" value is stored in an integer with too few bits to accommodate it.  The expression "stats.date" is cast to "int".
642     			errormsg(WHERE, ERR_CHK, "Current date/time break down", (int)stats.date);
643     			return 0;
644     		}
645
646     		sys_status |= SS_NEW_DAY;
647     		if (tm.tm_mon != update_tm.tm_mon)
/logon.cpp: 638             in sbbs_t::logonstats()()
632
633     	if (!dates_are_same(now, stats.date)) {
634
635     		struct tm tm{};
636     		struct tm update_tm{};
637     		if (localtime_r(&stats.date, &update_tm) == NULL) {
>>>     CID 584091:           (Y2K38_SAFETY)
>>>     A "time_t" value is stored in an integer with too few bits to accommodate it.  The expression "stats.date" is cast to "int".
638     			errormsg(WHERE, ERR_CHK, "Daily stats date/time break down", (int)stats.date);
639     			return 0;
640     		}
641     		if (localtime_r(&now, &tm) == NULL) {
642     			errormsg(WHERE, ERR_CHK, "Current date/time break down", (int)stats.date);
643     			return 0;

  

View Defects in Coverity Scan

Best regards,

The Coverity Scan Admin Team

----==_mimepart_68a32c876d3fd_16fcff2e2b69fdf990236c2-- --- þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net .