TIP: Click on subject to list as thread! ANSI
echo: sync_programming
to: cov-scan@synchro.net
from: scan-admin@coverity.com
date: 2023-02-21 13:36:00
subject: New Defects reported by C

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 436563:  High impact quality  (Y2K38_SAFETY)
/tmp/sbbs-Feb-21-2023/src/smblib/smblib.c: 2033 in smb_create()


________________________________________________________________________________________________________
*** CID 436563:  High impact quality  (Y2K38_SAFETY)
/tmp/sbbs-Feb-21-2023/src/smblib/smblib.c: 2033 in smb_create()
2027     	rewind(smb->sid_fp);
2028     	if(chsize(fileno(smb->sid_fp),0L) != 0)
2029     		return SMB_ERR_TRUNCATE;
2030
2031     	SAFEPRINTF(str,"%s.ini",smb->file);
2032     	if((fp = fopen(str, "w")) != NULL) {
>>>     CID 436563:  High impact quality  (Y2K38_SAFETY)
>>>     A "time_t" value is stored in an integer with too few bits to accommodate it.  The expression "time(NULL)" is cast to "int".
2033     		fprintf(fp, "Created = 0x%x\n", (int)time(NULL));
2034     		fclose(fp);
2035     	}
2036     	SAFEPRINTF(str,"%s.sda",smb->file);
2037     	(void)remove(str);						/* if it exists, delete it */
2038     	SAFEPRINTF(str,"%s.sha",smb->file);


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4BbWTBf-2B-2Fi5ZUVF-2Fo-2B6flxo-3D6NZ4_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrB-2BSws-2BCbxlcVNPlCMlu3BJhlBm9ihxGUC5HVYM0IVOs04Kz9bZ0eoogx9vF3V4RK7H-2FAqguVEOaGqUDhn-2BkizHNIhtSAreEeh-2FFRCp4Cd-2BnjQP8DEfNeZ9f9ZPjHBz4mF3SSPlmrjqNIqJn1YzLbAFkkez3JgMfD0h7jKBCjInFw-3D-3D


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

SOURCE: echomail via QWK@pharcyde.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.