Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/procmail-3.22/src/goodies.h
Examining data/procmail-3.22/src/from.c
Examining data/procmail-3.22/src/procmail.h
Examining data/procmail-3.22/src/goodies.c
Examining data/procmail-3.22/src/robust.h
Examining data/procmail-3.22/src/acommon.c
Examining data/procmail-3.22/src/common.c
Examining data/procmail-3.22/src/mailfold.h
Examining data/procmail-3.22/src/includes.h
Examining data/procmail-3.22/src/cstdio.h
Examining data/procmail-3.22/src/ecommon.c
Examining data/procmail-3.22/src/exopen.c
Examining data/procmail-3.22/src/lmtp.h
Examining data/procmail-3.22/src/misc.h
Examining data/procmail-3.22/src/lockfile.c
Examining data/procmail-3.22/src/misc.c
Examining data/procmail-3.22/src/exopen.h
Examining data/procmail-3.22/src/regexp.c
Examining data/procmail-3.22/src/pipes.h
Examining data/procmail-3.22/src/locking.c
Examining data/procmail-3.22/src/authenticate.h
Examining data/procmail-3.22/src/foldinfo.c
Examining data/procmail-3.22/src/robust.c
Examining data/procmail-3.22/src/sublib.c
Examining data/procmail-3.22/src/mcommon.h
Examining data/procmail-3.22/src/setid.c
Examining data/procmail-3.22/src/sublib.h
Examining data/procmail-3.22/src/acommon.h
Examining data/procmail-3.22/src/common.h
Examining data/procmail-3.22/src/formail.h
Examining data/procmail-3.22/src/ecommon.h
Examining data/procmail-3.22/src/fields.h
Examining data/procmail-3.22/src/lastdirsep.c
Examining data/procmail-3.22/src/lastdirsep.h
Examining data/procmail-3.22/src/locking.h
Examining data/procmail-3.22/src/mcommon.c
Examining data/procmail-3.22/src/network.h
Examining data/procmail-3.22/src/regexp.h
Examining data/procmail-3.22/src/shell.h
Examining data/procmail-3.22/src/variables.c
Examining data/procmail-3.22/src/from.h
Examining data/procmail-3.22/src/variables.h
Examining data/procmail-3.22/src/comsat.h
Examining data/procmail-3.22/src/comsat.c
Examining data/procmail-3.22/src/lmtp.c
Examining data/procmail-3.22/src/memblk.c
Examining data/procmail-3.22/src/memblk.h
Examining data/procmail-3.22/src/recommend.c
Examining data/procmail-3.22/src/foldinfo.h
Examining data/procmail-3.22/src/authenticate.c
Examining data/procmail-3.22/src/procmail.c
Examining data/procmail-3.22/src/manconf.c
Examining data/procmail-3.22/src/pipes.c
Examining data/procmail-3.22/src/header.h
Examining data/procmail-3.22/src/mailfold.c
Examining data/procmail-3.22/src/fields.c
Examining data/procmail-3.22/src/formisc.h
Examining data/procmail-3.22/src/cstdio.c
Examining data/procmail-3.22/src/formail.c
Examining data/procmail-3.22/src/formisc.c
Examining data/procmail-3.22/patchlevel.h
Examining data/procmail-3.22/config.h

FINAL RESULTS:

data/procmail-3.22/src/exopen.c:134:3:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	 chown(full,uid,sgid))
data/procmail-3.22/src/foldinfo.c:84:23:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	     !stbuf.st_uid&&!chown(dir,uid,sgid))))  /* or be safely fixable */
data/procmail-3.22/src/foldinfo.c:276:8:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	      chmod(buf,stbuf.st_mode&=~cumask);
data/procmail-3.22/src/mailfold.c:221:5:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	   chmod(boxname,mode|UPDATE_MASK);
data/procmail-3.22/src/mailfold.c:308:6:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
     chmod(buf,mode|UPDATE_MASK);
data/procmail-3.22/src/mailfold.c:322:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
		    chmod(buf,mode|UPDATE_MASK);
data/procmail-3.22/src/procmail.c:367:4:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
			chown(buf2,ROOT_uid,stbuf.st_gid)||
data/procmail-3.22/src/procmail.c:369:4:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
			chmod(buf2,S_IRWXU)||		   /* to no one else */
data/procmail-3.22/src/acommon.c:34:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
     strcpy(name,names.nodename);
data/procmail-3.22/src/authenticate.c:114:22:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
  return !strcmp(rpw,crypt(pw,rpw));		    /* compare the passwords */
data/procmail-3.22/src/authenticate.c:188:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
     strcpy(pass->mbox,pass->pw->pw_dir);
data/procmail-3.22/src/authenticate.c:189:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
     strcpy(pass->mbox+i,mailfile);
data/procmail-3.22/src/authenticate.c:195:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
     strcpy(pass->mbox,mailspooldir);
data/procmail-3.22/src/authenticate.c:203:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(p,pass->pw->pw_name);
data/procmail-3.22/src/authenticate.c:205:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	   strcat(p,MAILSPOOLSUFFIX);
data/procmail-3.22/src/common.c:26:27:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  signal(SIGPIPE,SIG_DFL);execvp(*argv,(char*const*)argv);
data/procmail-3.22/src/common.c:30:3:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  execv(*newargv,newargv);free(newargv);nlog("Failed to execute");
data/procmail-3.22/src/comsat.c:41:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
     strcpy(new,md);
data/procmail-3.22/src/comsat.c:127:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(buf,cslgname);
data/procmail-3.22/src/cstdio.c:130:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      { strcpy(buf2,md);*(md=buf2+len)= *dirsep;strcpy(++md,name);
data/procmail-3.22/src/cstdio.c:130:49:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      { strcpy(buf2,md);*(md=buf2+len)= *dirsep;strcpy(++md,name);
data/procmail-3.22/src/exopen.c:48:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(to,from);		    /* copy the remaining characters */
data/procmail-3.22/src/foldinfo.c:58:12:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  p=strchr(strcpy(strcpy(buf2+i,bogusprefix)+STRLEN(bogusprefix),
data/procmail-3.22/src/foldinfo.c:58:19:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  p=strchr(strcpy(strcpy(buf2+i,bogusprefix)+STRLEN(bogusprefix),
data/procmail-3.22/src/foldinfo.c:66:6:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
   { syslog(LOG_ALERT,renfbogus,name,buf2);		 /* danger!  danger! */
data/procmail-3.22/src/foldinfo.c:69:3:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
  syslog(LOG_CRIT,renbogus,name,buf2);
data/procmail-3.22/src/foldinfo.c:106:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
   (strcpy(chp,maildirnew),mode=trymkdir(buffer,paranoid,i),S_ISDIR(mode))&&
data/procmail-3.22/src/foldinfo.c:107:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
   (strcpy(chp,maildircur),mode=trymkdir(buffer,paranoid,i),S_ISDIR(mode))&&
data/procmail-3.22/src/foldinfo.c:108:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
   (strcpy(chp,maildirtmp),mode=trymkdir(buffer,paranoid,i),S_ISDIR(mode));
data/procmail-3.22/src/foldinfo.c:179:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(buf,chp);
data/procmail-3.22/src/foldinfo.c:275:8:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	      syslog(LOG_NOTICE,slogstr,enfperm,buf);setids();
data/procmail-3.22/src/foldinfo.c:299:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
     strcpy(chp=strchr(buf,'\0'),lockext);
data/procmail-3.22/src/formail.c:261:8:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	      strcpy(chp,savetmp);chp=tmp;	     /* attach the user part */
data/procmail-3.22/src/formail.c:295:29:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
pnewname:  lastm=nowm;saddr=strcpy(malloc(strlen(saddr)+1),saddr);
data/procmail-3.22/src/formail.c:717:56:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	      *(p=ultoan(h2,p+1))='.';*(p=ultoan(h1,p+1))='@';strcpy(p+1,name);
data/procmail-3.22/src/from.c:65:23:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  buf2[0]=buf2[1]=' ';strcpy(buf2+2,ctime(&t));
data/procmail-3.22/src/from.c:86:2:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	syslog(LOG_ERR,slogstr,attemptst,invoker);from=0;
data/procmail-3.22/src/from.c:128:8:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	      syslog(LOG_ERR,slogstr,attemptst,fwhom);
data/procmail-3.22/src/from.c:155:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	   strcat(strcpy(themail.p,From_),fwhom);		/* From user */
data/procmail-3.22/src/from.c:155:12:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	   strcat(strcpy(themail.p,From_),fwhom);		/* From user */
data/procmail-3.22/src/from.c:160:8:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	      strcpy(rstart-tstamp,buf2);
data/procmail-3.22/src/from.c:162:8:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	      strcat(strcat(strcpy(themail.p,From_),fwhom),buf2);
data/procmail-3.22/src/from.c:162:15:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	      strcat(strcat(strcpy(themail.p,From_),fwhom),buf2);
data/procmail-3.22/src/from.c:162:22:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	      strcat(strcat(strcpy(themail.p,From_),fwhom),buf2);
data/procmail-3.22/src/from.c:163:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat(strcpy(rstart,Fakefield),invoker);	       /* fake alert */
data/procmail-3.22/src/from.c:163:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcat(strcpy(rstart,Fakefield),invoker);	       /* fake alert */
data/procmail-3.22/src/from.c:165:6:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
     strcat(themail.p,buf2);themail.p[lfr+linv]=r;
data/procmail-3.22/src/goodies.c:120:8:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			   )strcpy(startb,p),sh=1;
data/procmail-3.22/src/goodies.c:386:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
     strcpy(buf,p);			 /* copy literally, shell will parse */
data/procmail-3.22/src/goodies.c:394:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(buf,p),sh=1;		   /* oops, overflow or `test' found */
data/procmail-3.22/src/includes.h:317:9:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
#define syslog				(void)
data/procmail-3.22/src/lockfile.c:148:10:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		       strcat(strcpy(ma,p),lockext);
data/procmail-3.22/src/lockfile.c:148:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		       strcat(strcpy(ma,p),lockext);
data/procmail-3.22/src/locking.c:119:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(strcpy(lckfile,withext)+len,lockext);
data/procmail-3.22/src/locking.c:119:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(strcpy(lckfile,withext)+len,lockext);
data/procmail-3.22/src/mailfold.c:176:41:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
     ultoan((unsigned long)stbuf.st_ino,strcpy(chp,msgprefix)+mpl);
data/procmail-3.22/src/mailfold.c:204:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
     strcpy(buf,boxname);		 /* boxname can be found back in buf */
data/procmail-3.22/src/mailfold.c:223:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	 { strcpy(chp,lockext);
data/procmail-3.22/src/mailfold.c:254:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(buf2,buf);
data/procmail-3.22/src/mailfold.c:264:8:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	      strcpy(chp2,maildirnew);
data/procmail-3.22/src/mailfold.c:267:8:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	      strcpy(chp2,chp);
data/procmail-3.22/src/mailfold.c:289:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(buf2,buf);
data/procmail-3.22/src/mailfold.c:297:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	 { strcpy(buf,buf2);
data/procmail-3.22/src/mailfold.c:303:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(buf2,buf);
data/procmail-3.22/src/mailfold.c:312:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      { strcpy(buf,boxname);
data/procmail-3.22/src/manconf.c:77:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
   { sprintf(filebuf,"%s.%04d",*gargv,filecount++);freopen(filebuf,"w",stdout);
data/procmail-3.22/src/memblk.c:77:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
     strcpy(filename,MMAP_DIR);
data/procmail-3.22/src/misc.c:160:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
     strcpy(chp,file);				      /* append the filename */
data/procmail-3.22/src/misc.c:452:19:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	 for(chp=buf2+1;;strcpy(buf2,buf))
data/procmail-3.22/src/misc.c:572:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		  strcpy(buf2,skpspace(buf));
data/procmail-3.22/src/misc.c:575:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
copyrest:	  strcpy(buf,chp2);
data/procmail-3.22/src/misc.c:590:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		   strcpy(buf2,buf);
data/procmail-3.22/src/misc.c:599:28:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		  skipped(skpspace(chp));strcpy(buf2,buf);
data/procmail-3.22/src/pipes.c:87:6:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
   { syslog(LOG_ERR,slogstr,"Attempt to execute",newname);
data/procmail-3.22/src/procmail.c:223:23:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	 { writeerr(devnull);syslog(LOG_EMERG,slogstr,errwwriting,devnull);
data/procmail-3.22/src/procmail.c:311:35:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	      nlog(unkuser);logqnl(chp2);syslog(LOG_ERR,slogstr,unkuser,chp2);
data/procmail-3.22/src/procmail.c:354:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		    *(chp=strcpy(buf2,etcrcs)+STRLEN(etcrcs))=chCURDIR;
data/procmail-3.22/src/procmail.c:380:10:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
		       syslog(LOG_ALERT,slogstr,densppr,rcfile);
data/procmail-3.22/src/procmail.c:454:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	   strcpy(buf,rcfile);
data/procmail-3.22/src/procmail.c:456:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	   strcpy(buf,rcfile),rctype=rct_CURRENT;
data/procmail-3.22/src/procmail.c:485:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(buf,rcfile);
data/procmail-3.22/src/procmail.c:571:6:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
     syslog(LOG_ALERT,slogstr,susprcf,buf);
data/procmail-3.22/src/procmail.c:746:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			     strcpy(buf2,buf);strcpy(buf,chp);free(chp);
data/procmail-3.22/src/procmail.c:746:26:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			     strcpy(buf2,buf);strcpy(buf,chp);free(chp);
data/procmail-3.22/src/robust.c:116:21:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
     writeerr(file),syslog(LOG_NOTICE,slogstr,errwwriting,file);
data/procmail-3.22/src/setid.c:33:44:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
nodir:	nargv[0]=getenv("SHELL"),nargv[1]=0,execv(nargv[0],nargv);
data/procmail-3.22/src/variables.c:126:14:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  p[len]=' ';strcpy(p+len+1,buf);retbStdout(p);	  /* WARNING: no magic here! */
data/procmail-3.22/src/variables.c:136:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(buf,name);				 /* insert the variable name */
data/procmail-3.22/src/variables.c:249:18:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  didchd=1;*(chp=strcpy(buf2,maildir)+STRLEN(maildir))='=';
data/procmail-3.22/src/variables.c:250:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(++chp,newdir);sputenv(buf2);
data/procmail-3.22/src/variables.c:257:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(chp=malloc(len),lastfolder);
data/procmail-3.22/src/variables.c:273:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(buf2,exitcode);*p='=';
data/procmail-3.22/src/variables.c:334:12:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
     *(chp=strcpy(buf,slinebuf)+STRLEN(slinebuf))='=';
data/procmail-3.22/src/foldinfo.c:59:4:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
   getenv(lgname)),'\0');
data/procmail-3.22/src/goodies.c:32:18:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	  (unsigned)j>9?getenv(buf2):
data/procmail-3.22/src/includes.h:99:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
const char*getenv();
data/procmail-3.22/src/lockfile.c:137:23:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		  { if(!((ma=(char*)getenv(lgname))&&
data/procmail-3.22/src/pipes.c:147:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
     if(!(backblock=getenv(Stdout)))			/* no current value? */
data/procmail-3.22/src/procmail.c:185:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	   idhint=getenv(lgname);
data/procmail-3.22/src/regexp.c:597:5:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if(getenv(match)==(const char*)text)	     /* anal retentive match */
data/procmail-3.22/src/setid.c:33:17:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
nodir:	nargv[0]=getenv("SHELL"),nargv[1]=0,execv(nargv[0],nargv);
data/procmail-3.22/src/variables.c:144:13:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  return (b=getenv(a))?b:empty;
data/procmail-3.22/src/variables.c:265:17:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if(setxit&&(p=getenv(exitcode)))		 /* user specified exitcode? */
data/procmail-3.22/src/acommon.c:24:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char name[MAXHOSTNAMELEN]="";
data/procmail-3.22/src/foldinfo.c:104:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
     memcpy(buf2,buffer,i=chp-buffer+1),buf2[i-1]= *MCDIRSEP_,buf2[i]='\0';
data/procmail-3.22/src/foldinfo.c:148:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
     memcpy(buf2,buf,i=lastdirsep(buf)-buf),buf2[i]='\0';
data/procmail-3.22/src/foldinfo.c:253:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		 memcpy(buf2,buf,i);buf2[i]='\0';
data/procmail-3.22/src/foldinfo.c:304:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf2,buf,i);buf2[i]='\0';      /* try & rename bogus lockfile */
data/procmail-3.22/src/formail.c:102:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char ffileno[LEN_FILENO_VAR+8*sizeof(initfileno)*4/10+1+1]=DEFfileno;
data/procmail-3.22/src/formail.c:428:23:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		       if(!(idcache=fopen(chp,"r+b"))&&	  /* existing cache? */
data/procmail-3.22/src/formail.c:429:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			  !(idcache=fopen(chp,"w+b")))	    /* create cache? */
data/procmail-3.22/src/formail.c:715:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	      memcpy(p,fldp->fld_text,fldp->id_len);*(p+=fldp->id_len)=' ';
data/procmail-3.22/src/formail.h:35:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char fld_text[255];
data/procmail-3.22/src/formisc.c:229:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
{ if(!(mystdout=fopen(DevNull,"a")))
data/procmail-3.22/src/includes.h:551:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
#define charNUM(num,v)	char num[sizeNUM(v)]
data/procmail-3.22/src/lockfile.c:46:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(p,name,i);
data/procmail-3.22/src/lockfile.c:263:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
{ return open(name,mode,mask);					     /* stub */
data/procmail-3.22/src/locking.c:153:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(p=malloc(i+UNIQnamelen),name,i);		     /* try & rename */
data/procmail-3.22/src/mailfold.c:169:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
     memcpy(chp-MAILDIRLEN-1,maildirnew,MAILDIRLEN);	/* but link directly */
data/procmail-3.22/src/memblk.c:76:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   { char filename[MMAP_FILE_LEN];
data/procmail-3.22/src/misc.h:22:41:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
struct dynstring{struct dynstring*enext;char ename[255];};
data/procmail-3.22/src/procmail.c:643:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char flags[maxindex(exflags)];
data/procmail-3.22/src/robust.c:135:44:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  for(r=noresretry,lcking|=lck_FILDES;0>(i=open(name,mode,mask));)
data/procmail-3.22/src/setid.c:20:6:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if(fopen(CHECK_FILE,"r"))
data/procmail-3.22/src/sublib.c:40:3:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
{ bcopy(From,To,count);
data/procmail-3.22/src/variables.c:312:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      { memcpy(buf,src,len);
data/procmail-3.22/src/acommon.c:32:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     if(!(name=malloc(strlen(names.nodename)+1)))
data/procmail-3.22/src/authenticate.c:142:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     bbzero(op->pw_passwd,strlen(op->pw_passwd));
data/procmail-3.22/src/authenticate.c:149:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   { bbzero(p->pw_name,strlen(p->pw_name));
data/procmail-3.22/src/authenticate.c:151:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     if(p->pw_passwd)bbzero(p->pw_passwd,strlen(p->pw_passwd));
data/procmail-3.22/src/authenticate.c:154:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     if(p->pw_class)bbzero(p->pw_class,strlen(p->pw_class));
data/procmail-3.22/src/authenticate.c:157:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     if(p->pw_gecos)bbzero(p->pw_gecos,strlen(p->pw_gecos));
data/procmail-3.22/src/authenticate.c:159:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     bbzero(p->pw_dir,strlen(p->pw_dir));
data/procmail-3.22/src/authenticate.c:160:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     bbzero(p->pw_shell,strlen(p->pw_shell));
data/procmail-3.22/src/authenticate.c:164:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     bbzero(pass->mbox,strlen(pass->mbox));
data/procmail-3.22/src/authenticate.c:186:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     if(!(pass->mbox=malloc((i=strlen(pass->pw->pw_dir))+STRLEN(mailfile)+1)))
data/procmail-3.22/src/authenticate.c:193:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      strlen(pass->pw->pw_name)+1+STRLEN(MAILSPOOLSUFFIX))))
data/procmail-3.22/src/comsat.c:39:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     size_t len=strlen(md)+2+strlen(folder);
data/procmail-3.22/src/comsat.c:39:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     size_t len=strlen(md)+2+strlen(folder);
data/procmail-3.22/src/comsat.c:123:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if(!cslgname||!*cslgname||strlen(cslgname)+2>linebuf)/* is $LOGNAME bogus? */
data/procmail-3.22/src/comsat.c:136:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   { sendto(s,buf,strlen(buf),0,(struct sockaddr*)&csaddr,sizeof(csaddr));
data/procmail-3.22/src/cstdio.c:129:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	(len=strlen(md))+strlen(name)+2<linebuf)
data/procmail-3.22/src/cstdio.c:129:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	(len=strlen(md))+strlen(name)+2<linebuf)
data/procmail-3.22/src/exopen.c:31:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     else if(!(sname=to=malloc(3*badchars+strlen(from)+1)))
data/procmail-3.22/src/formail.c:120:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   { putssn(sfolder,STRLEN(sfolder));putssn(logsummary,i=strlen(logsummary));
data/procmail-3.22/src/formail.c:124:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     ultstr(7,Totallen,num);putssn(num,strlen(num));putcs('\n');
data/procmail-3.22/src/formail.c:295:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
pnewname:  lastm=nowm;saddr=strcpy(malloc(strlen(saddr)+1),saddr);
data/procmail-3.22/src/formail.c:321:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	for(p=key;(j=fgetc(idcache))==*p;p++)
data/procmail-3.22/src/formail.c:336:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    { switch(fgetc(idcache))
data/procmail-3.22/src/formail.c:350:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     fseek(idcache,insoffs,SEEK_SET);fwrite(key,1,strlen(key)+1,idcache);
data/procmail-3.22/src/formail.c:406:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		 if(strlen(logsummary=chp)>MAXfoldlen)
data/procmail-3.22/src/formail.c:450:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		 i=breakfield(chp,lnl=strlen(chp));
data/procmail-3.22/src/formail.c:493:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			    (!(i=breakfield(chp,strlen(chp)))&& /* fieldish? */
data/procmail-3.22/src/formail.c:511:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  escaplen=strlen(escap);mystdout=stdout;signal(SIGPIPE,SIG_IGN);
data/procmail-3.22/src/formail.c:517:12:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   { while(getchar()!=BABYL_SEP1||getchar()!=BABYL_SEP2||getchar()!='\n')
data/procmail-3.22/src/formail.c:517:35:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   { while(getchar()!=BABYL_SEP1||getchar()!=BABYL_SEP2||getchar()!='\n')
data/procmail-3.22/src/formail.c:517:58:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   { while(getchar()!=BABYL_SEP1||getchar()!=BABYL_SEP2||getchar()!='\n')
data/procmail-3.22/src/formail.c:518:8:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while(getchar()!='\n');
data/procmail-3.22/src/formail.c:519:12:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
     while(getchar()!='\n');
data/procmail-3.22/src/formail.c:521:18:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while((buflast=getchar())=='\n');		     /* skip leading garbage */
data/procmail-3.22/src/formail.c:535:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     if((lenfileno=strlen(chp= *vfileno+LEN_FILENO_VAR))>
data/procmail-3.22/src/formail.c:656:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	   loadbuf(namep,strlen(namep));	      /* then insert it here */
data/procmail-3.22/src/formail.c:692:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	   loadbuf(namep,strlen(namep));
data/procmail-3.22/src/formail.c:697:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	   loadchar(' '),chp=ctime(&t),loadbuf(chp,strlen(chp)); /* no Date: */
data/procmail-3.22/src/formail.c:714:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	       strlen(name=hostname())+2);     /* allocate worst case length */
data/procmail-3.22/src/formail.c:753:17:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
     for(lc=0;c=getchar(),c!=EOF&&(c!='\n'||lc!='\n');lc=c);
data/procmail-3.22/src/formail.c:761:49:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	   lnl=lwr==tbl&&lwr=='\n',lputcs(lwr=tbl),tbl=getchar();
data/procmail-3.22/src/formail.c:763:26:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	   lputcs('\n'),buflast=getchar();		/* wrap up loose end */
data/procmail-3.22/src/formisc.c:125:16:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
     while((ch=getchar())!=EOF&&ch!='\n')
data/procmail-3.22/src/formisc.c:129:18:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return buflast=getchar();			/* look ahead, one character */
data/procmail-3.22/src/from.c:66:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  return strlen(buf2);
data/procmail-3.22/src/from.c:92:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  makeblock(&themail,2*linebuf+(lfr=strlen(fwhom))+(linv=strlen(invoker)));
data/procmail-3.22/src/from.c:92:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  makeblock(&themail,2*linebuf+(lfr=strlen(fwhom))+(linv=strlen(invoker)));
data/procmail-3.22/src/goodies.c:43:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define fgetc() (*fpgetc)()	   /* some compilers previously choked on it */
data/procmail-3.22/src/goodies.c:60:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   { i=fgetc();
data/procmail-3.22/src/goodies.c:77:7:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	   i=fgetc();
data/procmail-3.22/src/goodies.c:103:17:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    { switch(i=fgetc())			 /* copy till next backquote */
data/procmail-3.22/src/goodies.c:137:16:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		    switch(i=fgetc())
data/procmail-3.22/src/goodies.c:187:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	   while((i=fgetc())!=EOF&&i!='\n');		    /* skip till EOL */
data/procmail-3.22/src/goodies.c:193:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	   switch(i=fgetc())
data/procmail-3.22/src/goodies.c:203:18:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		 while(EOF!=(i=fgetc())&&alphanum(i))
data/procmail-3.22/src/goodies.c:216:19:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		       switch(i=fgetc())
data/procmail-3.22/src/goodies.c:272:18:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		    quoted=1,i=fgetc();
data/procmail-3.22/src/goodies.c:279:21:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		    while(EOF!=(i=fgetc())&&alphanum(i));
data/procmail-3.22/src/lmtp.c:249:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  bufwrite("220 ",4,0);bufwrite(procmailn,strlen(procmailn),0);
data/procmail-3.22/src/lmtp.c:422:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	   bufwrite(msg,strlen(msg),1);
data/procmail-3.22/src/lmtp.c:579:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     bufwrite(msg,strlen(msg),flush||endoread());
data/procmail-3.22/src/lockfile.c:54:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
{ write(STDERR,a,strlen(a));
data/procmail-3.22/src/lockfile.c:146:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			!(ma=malloc(strlen(p)+STRLEN(lockext)+1)))
data/procmail-3.22/src/lockfile.c:220:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		 if(0<(permanent=strlen(cp)-1)&&      /* can we truncate it? */
data/procmail-3.22/src/locking.c:84:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	   if(0<(i=strlen(name)-1)&&!strchr(dirsep,name[i-1]))
data/procmail-3.22/src/locking.c:117:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      { size_t len=strlen(withext);
data/procmail-3.22/src/locking.c:118:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	lckfile=malloc(len+strlen(lockext)+1);
data/procmail-3.22/src/mailfold.c:172:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   { size_t mpl=strlen(msgprefix);
data/procmail-3.22/src/mailfold.c:356:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     i=strlen(buf)+STRLEN(sfolder);i-=i%TABWIDTH;		/* last dump */
data/procmail-3.22/src/manconf.c:74:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if(!filebuf&&!(filebuf=malloc(strlen(*gargv)+1+4+1)))
data/procmail-3.22/src/misc.c:39:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  i=lold+(lnew=strlen(newt));	   /* calculate additional and total lengths */
data/procmail-3.22/src/misc.c:155:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     if(chp-buf+strlen(file)+2>linebuf)			  /* +2 for / and \0 */
data/procmail-3.22/src/misc.c:220:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      { if(strlen(p)>linebuf-1)
data/procmail-3.22/src/misc.c:234:5:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  i=strlen(a)+1;
data/procmail-3.22/src/misc.c:371:57:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  curr=malloc(ioffsetof(struct dynstring,ename[0])+(len=strlen(chp)+1));
data/procmail-3.22/src/misc.c:494:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			ltobesent=strlen(lstartchar=(char*)tgetenv(chp));
data/procmail-3.22/src/misc.c:516:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			lregk=strlen(regsp->regkey);		/* insert it */
data/procmail-3.22/src/misc.c:517:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			tmemmove(chp2+(lregs=strlen(regsp->regsubst)),
data/procmail-3.22/src/misc.c:518:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			 chp2+lregk,strlen(chp2)-lregk+1);
data/procmail-3.22/src/pipes.c:152:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      { backlen=strlen(backblock);
data/procmail-3.22/src/procmail.c:499:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if(linebuf<(len=strlen(chp)+strlen(lockext)+UNIQnamelen))
data/procmail-3.22/src/procmail.c:499:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if(linebuf<(len=strlen(chp)+strlen(lockext)+UNIQnamelen))
data/procmail-3.22/src/robust.c:170:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while(0>(i=read(fd,a,(size_t)len))&&errno==EINTR);
data/procmail-3.22/src/robust.c:191:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
{ umask(cumask=mask);
data/procmail-3.22/src/sublib.c:158:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  return dst-start+strlen(src);
data/procmail-3.22/src/sublib.c:169:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  return dst-start+strlen(src);
data/procmail-3.22/src/variables.c:91:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  Stdfilled=ioffsetof(struct dynstring,ename[0])+strlen(varname);
data/procmail-3.22/src/variables.c:124:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len=Stdfilled+strlen(Stdout+Stdfilled);	     /* Skip over the header */
data/procmail-3.22/src/variables.c:125:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  p=realloc(Stdout,(Stdfilled=len+1+strlen(value))+1);
data/procmail-3.22/src/variables.c:158:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      { len=strlen(*pp);
data/procmail-3.22/src/variables.c:185:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if(!strncmp(*ep,p,strlen(p)))
data/procmail-3.22/src/variables.c:256:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len=STRLEN(lastfolder)+2+strlen(folder);

ANALYSIS SUMMARY:

Hits = 218
Lines analyzed = 11086 in approximately 0.39 seconds (28299 lines/second)
Physical Source Lines of Code (SLOC) = 9771
Hits@level = [0]  24 [1]  92 [2]  23 [3]  10 [4]  85 [5]   8
Hits@level+ = [0+] 242 [1+] 218 [2+] 126 [3+] 103 [4+]  93 [5+]   8
Hits/KSLOC@level+ = [0+] 24.7672 [1+] 22.3109 [2+] 12.8953 [3+] 10.5414 [4+] 9.51796 [5+] 0.818749
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.