TIP: Click on subject to list as thread! ANSI
echo: sync_programming
to: cov-scan@synchro.net
from: scan-admin@coverity.com
date: 2021-05-14 12:48:00
subject: New Defects reported by C

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 331583:    (RESOURCE_LEAK)
/tmp/sbbs-May-14-2021/src/conio/scale.c: 200 in do_scale()
/tmp/sbbs-May-14-2021/src/conio/scale.c: 173 in do_scale()


________________________________________________________________________________________________________
*** CID 331583:    (RESOURCE_LEAK)
/tmp/sbbs-May-14-2021/src/conio/scale.c: 200 in do_scale()
194     		ret1->sz = needsz;
195     	}
196
197     	if (needsz > ret2->sz) {
198     		nt = realloc(ret2->data, needsz);
199     		if (nt == NULL)
>>>     CID 331583:    (RESOURCE_LEAK)
>>>     Variable "ret2" going out of scope leaks the storage it points to.
200     			return NULL;
201     		ret2->data = nt;
202     		ret2->sz = needsz;
203     	}
204
205     	// Copy rect into first buffer
/tmp/sbbs-May-14-2021/src/conio/scale.c: 173 in do_scale()
167     	}
168
169     	if (*xscale != *yscale) {
170     		if (*yscale == *xscale * 2)
171     			ymult *= 2;
172     		else
>>>     CID 331583:    (RESOURCE_LEAK)
>>>     Variable "ret2" going out of scope leaks the storage it points to.
173     			return NULL;
174     	}
175
176     	// Calculate the scaled height from ratio...
177     	if (ratio < 1)
178     		fheight = lround((double)(rect->rect.height * (*yscale)) / ratio);

** CID 331582:  Uninitialized variables  (UNINIT)


________________________________________________________________________________________________________
*** CID 331582:  Uninitialized variables  (UNINIT)
/file.cpp: 297 in sbbs_t::editfilename(smbmsg_t *)()
291     		return true;
292     	/* rename */
293     	if(stricmp(str,f->name)	&& findfile(&cfg, f->dir, path, NULL)) {
294     		bprintf(text[FileAlreadyThere],path);
295     		return false;
296     	}
>>>     CID 331582:  Uninitialized variables  (UNINIT)
>>>     Using uninitialized value "*dirpath" as argument to "%s" when calling "safe_snprintf".
297     	SAFEPRINTF2(path,"%s%s",dirpath,f->name);
298     	SAFEPRINTF2(tmp,"%s%s",dirpath,str);
299     	if(fexistcase(path) && rename(path,tmp) != 0) {
300     		bprintf(text[CouldntRenameFile],path,tmp);
301     		return false;
302     	}

** CID 331581:    (RESOURCE_LEAK)
/tmp/sbbs-May-14-2021/src/conio/scale.c: 173 in do_scale()
/tmp/sbbs-May-14-2021/src/conio/scale.c: 200 in do_scale()


________________________________________________________________________________________________________
*** CID 331581:    (RESOURCE_LEAK)
/tmp/sbbs-May-14-2021/src/conio/scale.c: 173 in do_scale()
167     	}
168
169     	if (*xscale != *yscale) {
170     		if (*yscale == *xscale * 2)
171     			ymult *= 2;
172     		else
>>>     CID 331581:    (RESOURCE_LEAK)
>>>     Variable "ret1" going out of scope leaks the storage it points to.
173     			return NULL;
174     	}
175
176     	// Calculate the scaled height from ratio...
177     	if (ratio < 1)
178     		fheight = lround((double)(rect->rect.height * (*yscale)) / ratio);
/tmp/sbbs-May-14-2021/src/conio/scale.c: 200 in do_scale()
194     		ret1->sz = needsz;
195     	}
196
197     	if (needsz > ret2->sz) {
198     		nt = realloc(ret2->data, needsz);
199     		if (nt == NULL)
>>>     CID 331581:    (RESOURCE_LEAK)
>>>     Variable "ret1" going out of scope leaks the storage it points to.
200     			return NULL;
201     		ret2->data = nt;
202     		ret2->sz = needsz;
203     	}
204
205     	// Copy rect into first buffer


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4BbWTBf-2B-2Fi5ZUVF-2Fo-2B6flxo-3DSNk9_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrDNqOeF93LTzMiN-2BXlkx2DWBkGIJWCanQX2uTnnKsqpYRRhZqJ2PhYsO5qpiOVK0BDvuiIrhUR4EjIR5oQGDt665DYDrF8ysSVAFDj7KiWmGsN1QlkSFgPQKgi7Pl3ZtNdBE2MJqRyaneT2BQLMnPKZbiAJosmewAFCQVicjYEPqQ-3D-3D


--- SBBSecho 3.14-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™.