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.
7 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 516462: Resource leaks (RESOURCE_LEAK)
/str.cpp: 277 in sbbs_t::sif(char *, char *, int)()
________________________________________________________________________________________________________
*** CID 516462: Resource leaks (RESOURCE_LEAK)
/str.cpp: 277 in sbbs_t::sif(char *, char *, int)()
271 errormsg(WHERE,ERR_OPEN,str,O_RDONLY);
272 return;
273 }
274 length=(int)filelength(file);
275 if(length < 0) {
276 errormsg(WHERE, ERR_CHK, str, length);
>>> CID 516462: Resource leaks (RESOURCE_LEAK)
>>> Handle variable "file" going out of scope leaks the handle.
277 return;
278 }
279 if((buf=(char *)calloc(length + 1, 1))==0) {
280 close(file);
281 errormsg(WHERE,ERR_ALLOC,str,length);
282 return;
** CID 516461: Resource leaks (RESOURCE_LEAK)
/writemsg.cpp: 678 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()
________________________________________________________________________________________________________
*** CID 516461: Resource leaks (RESOURCE_LEAK)
/writemsg.cpp: 678 in sbbs_t::writemsg(const char *, const char *, char *, int, int, const char *, const char *, const char **, const char **)()
672 return(false);
673 }
674 length=(long)filelength(file);
675 if(length < 0) {
676 errormsg(WHERE, ERR_LEN, msgtmp, length);
677 free(buf);
>>> CID 516461: Resource leaks (RESOURCE_LEAK)
>>> Handle variable "file" going out of scope leaks the handle.
678 return false;
679 }
680 l=strlen((char *)buf); /* reserve space for top and terminating null */
681 /* truncate if too big */
682 if(length>(long)((cfg.level_linespermsg[useron_level]*MAX_LINE_LEN)-(l+1))) {
683 length=(cfg.level_linespermsg[useron_level]*MAX_LINE_LEN)-(l+1);
** CID 516460: Error handling issues (CHECKED_RETURN)
/chat.cpp: 254 in sbbs_t::multinodechat(int)()
________________________________________________________________________________________________________
*** CID 516460: Error handling issues (CHECKED_RETURN)
/chat.cpp: 254 in sbbs_t::multinodechat(int)()
248 if(getstr(str,8,K_UPPER|K_ALPHA|K_LINE)) {
249 getnodedat(cfg.node_num,&thisnode,true);
250 thisnode.aux=channel;
251 packchatpass(str,&thisnode);
252 }
253 else {
>>> CID 516460: Error handling issues (CHECKED_RETURN)
>>> Calling "getnodedat" without checking return value (as is done elsewhere 54 out of 58 times).
254 getnodedat(cfg.node_num,&thisnode,true);
255 thisnode.aux=channel;
256 }
257 }
258 else {
259 getnodedat(cfg.node_num,&thisnode,true);
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu4gdQbQRNsarCbK0jIoVQSWT2zCPijRqaed4AhLiEI9Z7MR9SJQ09ot5XPbn9SW-2F14-3DT8kj_7FYjIqE8olEh4k02KWtt1r1LGSyuXVEtCuKuJCXgAQZ0FBX-2BUT7uzaWITu7U3dUMhdetuA-2BXV7YO8edQOGefnmNi1UdppKCC6vLOx06Y8sPuw5srJbsIYFYToJzSPdHxTD057AtOipCaMaoVsZPXJm19KDepDOzvHsB8koLerJtFoWwn5Qu57g8OiPy6q-2FxqWajzzHkfT1WyGUJ-2Bbs009Q-3D-3D
--- SBBSecho 3.23-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
|