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/pexec-1.0~rc8/src/numhash.h
Examining data/pexec-1.0~rc8/src/pexec.h
Examining data/pexec-1.0~rc8/src/linebuffer.h
Examining data/pexec-1.0~rc8/src/iof.h
Examining data/pexec-1.0~rc8/src/fifo.h
Examining data/pexec-1.0~rc8/src/tokenize.h
Examining data/pexec-1.0~rc8/src/format.c
Examining data/pexec-1.0~rc8/src/format.h
Examining data/pexec-1.0~rc8/src/longhelp.h
Examining data/pexec-1.0~rc8/src/fifo.c
Examining data/pexec-1.0~rc8/src/iof.c
Examining data/pexec-1.0~rc8/src/longhelp.c
Examining data/pexec-1.0~rc8/src/linebuffer.c
Examining data/pexec-1.0~rc8/src/list.h
Examining data/pexec-1.0~rc8/src/tokenize.c
Examining data/pexec-1.0~rc8/src/pexec.c
Examining data/pexec-1.0~rc8/src/str.h
Examining data/pexec-1.0~rc8/src/numhash.c
Examining data/pexec-1.0~rc8/src/str.c

FINAL RESULTS:

data/pexec-1.0~rc8/src/format.c:144: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((*out)+(*len)+(d1-slen),vs);
data/pexec-1.0~rc8/src/format.c:148: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((*out)+(*len),vs);
data/pexec-1.0~rc8/src/format.c:154: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((*out)+(*len),vs);
data/pexec-1.0~rc8/src/format.c:230:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
						sprintf(buff,sbuff,vi);
data/pexec-1.0~rc8/src/iof.c:63: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(ret,buff);
data/pexec-1.0~rc8/src/iof.c:82:4:  [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(ret,wr);
data/pexec-1.0~rc8/src/pexec.c:148:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
 vfprintf(log->fwlog,msg,ap);
data/pexec-1.0~rc8/src/pexec.c:374: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(command+len,argv[i]);
data/pexec-1.0~rc8/src/pexec.c:486:4:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
 n=vsnprintf(buff,HPRINT_BUFFER_SIZE,msg,ap);
data/pexec-1.0~rc8/src/pexec.c:816: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(p->shell,argv);
data/pexec-1.0~rc8/src/pexec.c:851:3:  [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.
		execvp(argv[0],argv);
data/pexec-1.0~rc8/src/pexec.c:870:3:  [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.
		execvp(argv[0],argv);
data/pexec-1.0~rc8/src/pexec.c:2618:2:  [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.
	execvp(rsh,argv);
data/pexec-1.0~rc8/src/pexec.c:2996: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(shell,largv);
data/pexec-1.0~rc8/src/pexec.c:3013:3:  [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.
		execvp(largv[0],largv);
data/pexec-1.0~rc8/src/pexec.c:3746:4:  [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(list+llen,argv[i]);llen+=ilen;
data/pexec-1.0~rc8/src/pexec.c:3762: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(list+llen,argv[i]);llen+=ilen;
data/pexec-1.0~rc8/src/str.c:77: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((*str)+l1,cat);
data/pexec-1.0~rc8/src/str.c:98:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  {	n=vsnprintf((*str)+l,size,fmt,ap);
data/pexec-1.0~rc8/src/pexec.c:4542: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.
		ctrlport=getenv(ctrlenv);
data/pexec-1.0~rc8/src/fifo.c:96:5:  [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(f->buffer+wpnt,buffer,msize);
data/pexec-1.0~rc8/src/fifo.c:178:5:  [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(buffer,f->buffer+f->rpnt,msize);
data/pexec-1.0~rc8/src/format.c:223:5:  [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	buff[256],sbuff[16];
data/pexec-1.0~rc8/src/format.c:229:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
						sprintf(sbuff,"%%.%dd",d2);
data/pexec-1.0~rc8/src/format.c:233:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
						sprintf(buff,"%d",vi);
data/pexec-1.0~rc8/src/format.c:249:5:  [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(out+len,format,next-format);
data/pexec-1.0~rc8/src/iof.c:55:2:  [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	*ret,buff[256];
data/pexec-1.0~rc8/src/iof.c:105:14:  [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).
 else					fr=fopen(name,"rb");
data/pexec-1.0~rc8/src/iof.c:113:14:  [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).
 else					fw=fopen(name,"wb");
data/pexec-1.0~rc8/src/linebuffer.c:73: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(lb->buffer+lb->length,buff,size);
data/pexec-1.0~rc8/src/linebuffer.c:81:2:  [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	*line,*eoc,buff[256];
data/pexec-1.0~rc8/src/linebuffer.c:104: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(line,lb->buffer,length);
data/pexec-1.0~rc8/src/linebuffer.c:163: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(line,lb->buffer,length);
data/pexec-1.0~rc8/src/linebuffer.c:191: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(line,lb->buffer,length);
data/pexec-1.0~rc8/src/pexec.c:173:11:  [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).
	if ( ( i=open("/dev/tty",O_RDWR) ) >= 0 )
data/pexec-1.0~rc8/src/pexec.c:183:16:  [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).
	 {	nulldev_fd=open("/dev/null",O_RDONLY);
data/pexec-1.0~rc8/src/pexec.c:191:14:  [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).
		nulldev_fd=open("/dev/null",O_WRONLY);
data/pexec-1.0~rc8/src/pexec.c:426:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(q,"\\%.2X",c);
data/pexec-1.0~rc8/src/pexec.c:481:2:  [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		buff[HPRINT_BUFFER_SIZE],*tbuff;
data/pexec-1.0~rc8/src/pexec.c:517:2:  [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	buff[BUFF_LEN];
data/pexec-1.0~rc8/src/pexec.c:520:5:  [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).
 fr=fopen("/proc/cpuinfo","rb");
data/pexec-1.0~rc8/src/pexec.c:664:14:  [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).
	 {	stdfd[0]=open(PEXEC_DEFAULT_NULLFILE,O_RDONLY);
data/pexec-1.0~rc8/src/pexec.c:671:14:  [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).
	 		stdfd[0]=open(p->in,O_RDONLY);
data/pexec-1.0~rc8/src/pexec.c:674:13:  [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).
			stdfd[0]=open(inname,O_RDONLY);
data/pexec-1.0~rc8/src/pexec.c:682:14:  [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).
	 {	stdfd[1]=open(PEXEC_DEFAULT_NULLFILE,O_WRONLY);
data/pexec-1.0~rc8/src/pexec.c:696:13:  [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).
			stdfd[1]=open(p->out,O_WRONLY|O_CREAT|O_TRUNC,0644);
data/pexec-1.0~rc8/src/pexec.c:699:13:  [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).
			stdfd[1]=open(outname,O_WRONLY|O_CREAT|O_TRUNC,0644);
data/pexec-1.0~rc8/src/pexec.c:709:14:  [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).
	 {	stdfd[2]=open(PEXEC_DEFAULT_NULLFILE,O_WRONLY);
data/pexec-1.0~rc8/src/pexec.c:723:13:  [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).
			stdfd[2]=open(p->err,O_WRONLY|O_CREAT|O_TRUNC,0644);
data/pexec-1.0~rc8/src/pexec.c:726:13:  [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).
			stdfd[2]=open(errname,O_WRONLY|O_CREAT|O_TRUNC,0644);
data/pexec-1.0~rc8/src/pexec.c:809:5:  [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	*argv[4];
data/pexec-1.0~rc8/src/pexec.c:1234: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(&pcw,&mx->pclients[0],sizeof(pendingclient));
data/pexec-1.0~rc8/src/pexec.c:2565:2:  [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	**argv,num_buff[32],pri_buff[32];
data/pexec-1.0~rc8/src/pexec.c:2591:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(num_buff,"%d",rh->num_processes);
data/pexec-1.0~rc8/src/pexec.c:2609:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(pri_buff,"%d",prio-128);
data/pexec-1.0~rc8/src/pexec.c:2663:2:  [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			buff[256],*colon;
data/pexec-1.0~rc8/src/pexec.c:2690:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(buff,"%d",port);
data/pexec-1.0~rc8/src/pexec.c:2714:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(buff,"%d",port);
data/pexec-1.0~rc8/src/pexec.c:2727: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(hostname,ctrlport,(colon-ctrlport));
data/pexec-1.0~rc8/src/pexec.c:2742: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(&inaddr.sin_addr.s_addr,peer->h_addr,peer->h_length);
data/pexec-1.0~rc8/src/pexec.c:2766:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(unaddr.sun_path,"/tmp/pexec.%d.sock",pid);
data/pexec-1.0~rc8/src/pexec.c:2873: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(hostname,ctrlport,len);
data/pexec-1.0~rc8/src/pexec.c:2881: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(&inaddr.sin_addr.s_addr,peer->h_addr,peer->h_length);
data/pexec-1.0~rc8/src/pexec.c:2989:5:  [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	*largv[4];
data/pexec-1.0~rc8/src/pexec.c:3027:2:  [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	buff[16];
data/pexec-1.0~rc8/src/pexec.c:4028:7:  [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).
			fr=fopen(listfile,"rb");
data/pexec-1.0~rc8/src/pexec.c:4179:12:  [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).
			p.fwout=fopen(p.out,"wb");
data/pexec-1.0~rc8/src/pexec.c:4194:12:  [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).
			p.fwerr=fopen(p.err,"wb");
data/pexec-1.0~rc8/src/pexec.c:4209:14:  [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).
			log.fwlog=fopen(logfile,"wb");
data/pexec-1.0~rc8/src/pexec.c:4565:28:  [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 ( file != NULL && (fr=fopen(file,"rb")) != NULL && name != NULL )
data/pexec-1.0~rc8/src/pexec.c:4575:28:  [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 ( file != NULL && (fw=fopen(file,"wb")) != NULL && name != NULL )
data/pexec-1.0~rc8/src/format.c:134: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).
 slen=strlen(vs);
data/pexec-1.0~rc8/src/iof.c:60:38:  [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 ( ret==NULL )	ret=(char *)malloc(strlen(buff)+1),ret[0]=0;
data/pexec-1.0~rc8/src/iof.c:61: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).
	else			ret=(char *)realloc(ret,strlen(ret)+strlen(buff)+1);
data/pexec-1.0~rc8/src/iof.c:61: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).
	else			ret=(char *)realloc(ret,strlen(ret)+strlen(buff)+1);
data/pexec-1.0~rc8/src/iof.c:64:11:  [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 ( ret[strlen(ret)-1]==10 )	break;
data/pexec-1.0~rc8/src/iof.c:80:22:  [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).
		 {	ret=realloc(ret,strlen(ret)+strlen(wr)+1);
data/pexec-1.0~rc8/src/iof.c:80:34:  [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).
		 {	ret=realloc(ret,strlen(ret)+strlen(wr)+1);
data/pexec-1.0~rc8/src/iof.c:85: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).
		n=strlen(ret);
data/pexec-1.0~rc8/src/linebuffer.c:125:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	 {	n=read(fd,buff,256);
data/pexec-1.0~rc8/src/linebuffer.c:136:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		 {	n=read(fd,buff,256);
data/pexec-1.0~rc8/src/longhelp.c:63:31:  [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 ( k )	memmove(buff,buff+k,strlen(buff)+1-k);
data/pexec-1.0~rc8/src/longhelp.c:136: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).
	 {	l=strlen(cmd[n]);
data/pexec-1.0~rc8/src/pexec.c:366: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).
  {	l=strlen(argv[i]);
data/pexec-1.0~rc8/src/pexec.c:371:3:  [1] (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). Risk is low because the source is a constant character.
		strcpy(command+len," ");
data/pexec-1.0~rc8/src/pexec.c:442:26:  [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 ( buff==NULL || (len=strlen(buff))<=0 )
data/pexec-1.0~rc8/src/pexec.c:498: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).
	 {	n=strlen(tbuff);
data/pexec-1.0~rc8/src/pexec.c:525: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).
		for ( i=0 ; i<strlen(buff) ; )
data/pexec-1.0~rc8/src/pexec.c:528: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).
				memmove(buff+i,buff+i+1,strlen(buff+i));
data/pexec-1.0~rc8/src/pexec.c:532: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).
		for ( j=0 ; j<strlen(buff) ; j++ )
data/pexec-1.0~rc8/src/pexec.c:534:11:  [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 ( j==strlen(buff) )  continue;
data/pexec-1.0~rc8/src/pexec.c:967:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  {	rd=read(fd,cdata,size);
data/pexec-1.0~rc8/src/pexec.c:1008: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).
  {	len=strlen(outline);
data/pexec-1.0~rc8/src/pexec.c:1546:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				 {	n=read(cc->fdstdout,buff,buffsize);	
data/pexec-1.0~rc8/src/pexec.c:1558:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				 {	n=read(cc->fdstderr,buff,buffsize);
data/pexec-1.0~rc8/src/pexec.c:1609:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		 {	n=read(cc->fdstdout,buff,buffsize);
data/pexec-1.0~rc8/src/pexec.c:1618:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		 {	n=read(cc->fdstderr,buff,buffsize);
data/pexec-1.0~rc8/src/pexec.c:1638:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		n=read(rs->fhrecv,buff,buffsize);
data/pexec-1.0~rc8/src/pexec.c:1712:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		n=read(cl->peer,buff,buffsize);
data/pexec-1.0~rc8/src/pexec.c:1746:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		n=read(hsck,buff,buffsize);
data/pexec-1.0~rc8/src/pexec.c:2118: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).
 write(fhsend,out,strlen(out));
data/pexec-1.0~rc8/src/pexec.c:2240:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				 {	n=read(cc->fdstdout,buff,buffsize);	
data/pexec-1.0~rc8/src/pexec.c:2251:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				 {	n=read(cc->fdstderr,buff,buffsize);
data/pexec-1.0~rc8/src/pexec.c:2275:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		n=read(fhrecv,buff,buffsize);
data/pexec-1.0~rc8/src/pexec.c:2310:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		 {	n=read(cc->fdstdout,buff,buffsize);
data/pexec-1.0~rc8/src/pexec.c:2319:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		 {	n=read(cc->fdstderr,buff,buffsize);
data/pexec-1.0~rc8/src/pexec.c:2336:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		n=read(cl->peer,buff,buffsize);
data/pexec-1.0~rc8/src/pexec.c:2368:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		n=read(hsck,buff,buffsize);
data/pexec-1.0~rc8/src/pexec.c:2791:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(unaddr.sun_path,ctrlport,UNIX_PATH_MAX-1);
data/pexec-1.0~rc8/src/pexec.c:2841:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(unaddr.sun_path,ctrlport,UNIX_PATH_MAX-1);
data/pexec-1.0~rc8/src/pexec.c:3031:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
 n=read(sock,buff,16);
data/pexec-1.0~rc8/src/pexec.c:3273:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		n=read(cl->peer,buff,buffsize);
data/pexec-1.0~rc8/src/pexec.c:3739: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).
			llen=strlen(list);
data/pexec-1.0~rc8/src/pexec.c:3743: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).
			ilen=strlen(argv[i]);
data/pexec-1.0~rc8/src/pexec.c:3745:4:  [1] (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). Risk is low because the source is a constant character.
			strcpy(list+llen," ");llen++;
data/pexec-1.0~rc8/src/pexec.c:3755: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).
				llen=strlen(list);
data/pexec-1.0~rc8/src/pexec.c:3759: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).
				ilen=strlen(argv[i]);
data/pexec-1.0~rc8/src/pexec.c:3761:5:  [1] (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). Risk is low because the source is a constant character.
				strcpy(list+llen," ");llen++;
data/pexec-1.0~rc8/src/pexec.c:4040: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 ( ! ( strlen(line)>0 ) )
data/pexec-1.0~rc8/src/str.c:54:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
 strncpy(out,in,size);
data/pexec-1.0~rc8/src/str.c:73: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).
  {	l1=strlen(*str);
data/pexec-1.0~rc8/src/str.c:74: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).
	l2=strlen(cat);
data/pexec-1.0~rc8/src/str.c:91:11:  [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			l=strlen(*str);
data/pexec-1.0~rc8/src/tokenize.c:60: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 ( k )	memmove(buff,buff+k,strlen(buff)+1-k);
data/pexec-1.0~rc8/src/tokenize.c:74: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 ( k )	memmove(buff,buff+k,strlen(buff)+1-k);
data/pexec-1.0~rc8/src/tokenize.c:86:31:  [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 ( k )	memmove(buff,buff+k,strlen(buff)+1-k);
data/pexec-1.0~rc8/src/tokenize.c:98:31:  [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 ( k )	memmove(buff,buff+k,strlen(buff)+1-k);

ANALYSIS SUMMARY:

Hits = 127
Lines analyzed = 7753 in approximately 0.24 seconds (32443 lines/second)
Physical Source Lines of Code (SLOC) = 5682
Hits@level = [0] 110 [1]  56 [2]  51 [3]   1 [4]  19 [5]   0
Hits@level+ = [0+] 237 [1+] 127 [2+]  71 [3+]  20 [4+]  19 [5+]   0
Hits/KSLOC@level+ = [0+] 41.7107 [1+] 22.3513 [2+] 12.4956 [3+] 3.51989 [4+] 3.34389 [5+]   0
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.