Subj : New Defects reported by Coverity Scan for Synchronet To : cov-scan@synchro.net From : scan-admin@coverity.com Date : Fri Apr 29 2022 12:53:27 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 174496: Integer handling issues (BAD_SHIFT) /scfg/scfgxtrn.c: 670 in tevents_cfg() ________________________________________________________________________________________________________ *** CID 174496: Integer handling issues (BAD_SHIFT) /scfg/scfgxtrn.c: 670 in tevents_cfg() 664 SAFECOPY(str,monthstr(cfg.event[i]->months)); 665 uifc.input(WIN_MID|WIN_SAV,0,0,"Months to Execute Event (or Any)" 666 ,str,50,K_EDIT); 667 cfg.event[i]->months=0; 668 for(p=str;*p;p++) { 669 if(atoi(p)) { >>> CID 174496: Integer handling issues (BAD_SHIFT) >>> In expression "1 << atoi(p) - 1", shifting by a negative amount has undefined behavior. The shift amount, "atoi(p) - 1", is -1. 670 cfg.event[i]->months|=(1<<(atoi(p)-1)); 671 while(*p && IS_DIGIT(*p)) 672 p++; 673 } else { 674 for(j=0;j<12;j++) 675 if(strnicmp(mon[j],p,3)==0) { ________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yp-2FP9gGRhvFklLaQKuBylUrkMFB3WMR2p7qIYKYTZrh4BbWTBf-2B-2Fi5ZUVF-2Fo-2B6flxo-3DVZMJ_g4j7BHlu96plUOfCQsO0yRjoWZCZl8YGnZ-2FUtT39hrCQmMgBhImIpoofA21e2cYWDMn9dQmSVHtjFCh60LPEB91qYxruc9ZGQnWSfgRIBCx31HV-2B9vykJP8nBxiFvarl1-2B0LIjP4E7k5t-2Bb2S9DBYSULH-2BW9IR1DBJq2v2Tmn3A-2F7NFVCMYXdJbh3-2FUaBuA0-2FKeM-2FzS-2FeqpNiUal0lsG1g-3D-3D --- SBBSecho 3.15-Linux * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705) .