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/autodir-0.99.9/src/autodir.h
Examining data/autodir-0.99.9/src/miscfuncs.h
Examining data/autodir-0.99.9/src/backup_argv.h
Examining data/autodir-0.99.9/src/options.h
Examining data/autodir-0.99.9/src/backup_child.h
Examining data/autodir-0.99.9/src/dropcap.c
Examining data/autodir-0.99.9/src/modules/autogroup.c
Examining data/autodir-0.99.9/src/modules/autohome.c
Examining data/autodir-0.99.9/src/modules/automisc.c
Examining data/autodir-0.99.9/src/backup_pid.h
Examining data/autodir-0.99.9/src/workon.c
Examining data/autodir-0.99.9/src/backup_child.c
Examining data/autodir-0.99.9/src/thread.h
Examining data/autodir-0.99.9/src/workon.h
Examining data/autodir-0.99.9/src/backup_queue.c
Examining data/autodir-0.99.9/src/backup_argv.c
Examining data/autodir-0.99.9/src/backup_queue.h
Examining data/autodir-0.99.9/src/msg.h
Examining data/autodir-0.99.9/src/backup_fork.h
Examining data/autodir-0.99.9/src/multipath.h
Examining data/autodir-0.99.9/src/dropcap.h
Examining data/autodir-0.99.9/src/options.c
Examining data/autodir-0.99.9/src/backup.h
Examining data/autodir-0.99.9/src/time_mono.c
Examining data/autodir-0.99.9/src/expire.c
Examining data/autodir-0.99.9/src/backup.c
Examining data/autodir-0.99.9/src/lockfile.c
Examining data/autodir-0.99.9/src/mpacket.c
Examining data/autodir-0.99.9/src/backup_pid.c
Examining data/autodir-0.99.9/src/time_mono.h
Examining data/autodir-0.99.9/src/mpacket.h
Examining data/autodir-0.99.9/src/thread_cache.c
Examining data/autodir-0.99.9/src/expire.h
Examining data/autodir-0.99.9/src/thread_cache.h
Examining data/autodir-0.99.9/src/lockfile.h
Examining data/autodir-0.99.9/src/msg.c
Examining data/autodir-0.99.9/src/thread.c
Examining data/autodir-0.99.9/src/autodir.c
Examining data/autodir-0.99.9/src/miscfuncs.c
Examining data/autodir-0.99.9/src/multipath.c
Examining data/autodir-0.99.9/src/backup_fork.c
Examining data/autodir-0.99.9/src/module.h
Examining data/autodir-0.99.9/src/module.c

FINAL RESULTS:

data/autodir-0.99.9/src/modules/autogroup.c:384:8:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
			if( chown( groupdir, -1 , gid ) )
data/autodir-0.99.9/src/modules/autogroup.c:393:8:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
			if( chown( groupdir, uid, -1 ) )
data/autodir-0.99.9/src/modules/autogroup.c:402:8:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
			if( chmod( groupdir, ag_conf.mode ) )
data/autodir-0.99.9/src/modules/autogroup.c:415:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
		if( chmod( groupdir, ag_conf.mode ) )
data/autodir-0.99.9/src/modules/autogroup.c:422:7:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
		if( chown( groupdir, uid, gid ) )
data/autodir-0.99.9/src/modules/autohome.c:420:7:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
		if( chown( file, uid, -1 ) )
data/autodir-0.99.9/src/modules/autohome.c:453:7:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
		if( chown( dir, uid, -1 ) )
data/autodir-0.99.9/src/modules/autohome.c:649:5:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
				chown( ddent, uid, gid );
data/autodir-0.99.9/src/modules/autohome.c:756:8:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
			if( chown( home, uid, -1 ) )
data/autodir-0.99.9/src/modules/autohome.c:767:8:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
			if( chown( home, -1, gid ) )
data/autodir-0.99.9/src/modules/autohome.c:778:8:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
			if( chmod( home, ah_conf.mode ) )
data/autodir-0.99.9/src/modules/autohome.c:806:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
		if( chmod( home, ah_conf.mode ) )
data/autodir-0.99.9/src/modules/autohome.c:812:7:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
		if( chown( home, uid, gid ) )
data/autodir-0.99.9/src/modules/automisc.c:350:8:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
			if( chown( mpath, uid , -1 ) )
data/autodir-0.99.9/src/modules/automisc.c:359:8:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
			if( chown( mpath, -1 , gid ) )
data/autodir-0.99.9/src/modules/automisc.c:368:8:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
			if( chmod( mpath, am_conf.mode ) )
data/autodir-0.99.9/src/modules/automisc.c:380:7:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
		if( chmod( mpath, am_conf.mode ) )
data/autodir-0.99.9/src/modules/automisc.c:387:7:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
		if( chown( mpath, uid, gid ) )
data/autodir-0.99.9/src/backup_fork.c:68:6:  [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.
	if( execv( argv[0], argv ) )
data/autodir-0.99.9/src/msg.c:115:8:  [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.
	len = vsnprintf( b, sz, fmt, ap );
data/autodir-0.99.9/src/modules/autogroup.c:106:7:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	char realpath[ PATH_MAX+1 ];
data/autodir-0.99.9/src/modules/autogroup.c:251:28:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
				string_n_copy( ag_conf.realpath, 
data/autodir-0.99.9/src/modules/autogroup.c:254:28:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
				        sizeof(ag_conf.realpath) );
data/autodir-0.99.9/src/modules/autogroup.c:301:10:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	ag_conf.realpath[ 0 ] = 0;
data/autodir-0.99.9/src/modules/autogroup.c:314:16:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if( ! ag_conf.realpath[ 0 ] )
data/autodir-0.99.9/src/modules/autogroup.c:318:26:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
		string_n_copy( ag_conf.realpath, DFLT_AUTOGROUP_REALPATH,
data/autodir-0.99.9/src/modules/autogroup.c:319:20:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
				sizeof(ag_conf.realpath) );
data/autodir-0.99.9/src/modules/autogroup.c:443:28:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if( ! create_dir( ag_conf.realpath, 0700 ) )
data/autodir-0.99.9/src/modules/autogroup.c:446:16:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
							ag_conf.realpath );
data/autodir-0.99.9/src/modules/autogroup.c:455:35:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if( ! strcmp( groupbase, ag_conf.realpath ) )
data/autodir-0.99.9/src/modules/autogroup.c:483:13:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
				ag_conf.realpath, name);
data/autodir-0.99.9/src/modules/autogroup.c:488:13:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
				ag_conf.realpath, a,name );
data/autodir-0.99.9/src/modules/autogroup.c:494:13:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
				ag_conf.realpath, a, a, b, name );
data/autodir-0.99.9/src/modules/autohome.c:125:7:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	char realpath[ PATH_MAX+1 ]; /*real base directory*/
data/autodir-0.99.9/src/modules/autohome.c:285:28:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
				string_n_copy( ah_conf.realpath, 
data/autodir-0.99.9/src/modules/autohome.c:288:22:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
					sizeof( ah_conf.realpath) );
data/autodir-0.99.9/src/modules/autohome.c:350:10:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	ah_conf.realpath[ 0 ] = 0;
data/autodir-0.99.9/src/modules/autohome.c:366:16:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if( ! ah_conf.realpath[ 0 ] )
data/autodir-0.99.9/src/modules/autohome.c:371:26:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
		string_n_copy( ah_conf.realpath, DFLT_AUTOHOME_REALDIR,
data/autodir-0.99.9/src/modules/autohome.c:372:20:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
				sizeof(ah_conf.realpath) );
data/autodir-0.99.9/src/modules/autohome.c:830:28:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if( ! create_dir( ah_conf.realpath, 0700 ) )
data/autodir-0.99.9/src/modules/autohome.c:833:16:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
							ah_conf.realpath );
data/autodir-0.99.9/src/modules/autohome.c:842:34:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if( ! strcmp( homebase, ah_conf.realpath ) )
data/autodir-0.99.9/src/modules/autohome.c:845:23:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
				homebase, ah_conf.realpath );
data/autodir-0.99.9/src/modules/autohome.c:869:13:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
				ah_conf.realpath, name);
data/autodir-0.99.9/src/modules/autohome.c:874:13:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
				ah_conf.realpath, a,name );
data/autodir-0.99.9/src/modules/autohome.c:880:13:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
				ah_conf.realpath, a, a, b, name );
data/autodir-0.99.9/src/modules/automisc.c:101:7:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	char realpath[ PATH_MAX+1 ];
data/autodir-0.99.9/src/modules/automisc.c:238:28:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
				string_n_copy( am_conf.realpath, 
data/autodir-0.99.9/src/modules/automisc.c:241:28:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
				        sizeof(am_conf.realpath) );
data/autodir-0.99.9/src/modules/automisc.c:277:10:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	am_conf.realpath[ 0 ] = 0;
data/autodir-0.99.9/src/modules/automisc.c:289:16:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if( ! am_conf.realpath[ 0 ] )
data/autodir-0.99.9/src/modules/automisc.c:293:26:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
		string_n_copy( am_conf.realpath, DFLT_AUTOMISC_REALPATH,
data/autodir-0.99.9/src/modules/automisc.c:294:20:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
				sizeof(am_conf.realpath) );
data/autodir-0.99.9/src/modules/automisc.c:407:28:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if( ! create_dir( am_conf.realpath, 0700 ) )
data/autodir-0.99.9/src/modules/automisc.c:411:12:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
			am_conf.realpath );
data/autodir-0.99.9/src/modules/automisc.c:415:30:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if( ! strcmp( hdir, am_conf.realpath ) )
data/autodir-0.99.9/src/modules/automisc.c:433:13:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
				am_conf.realpath, name);
data/autodir-0.99.9/src/modules/automisc.c:438:13:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
				am_conf.realpath, a,name );
data/autodir-0.99.9/src/modules/automisc.c:444:13:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
				am_conf.realpath, a, a, b, name );
data/autodir-0.99.9/src/options.c:165:15:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while( ( c = getopt( argc, argv, options.ostr ) ) != -1 )
data/autodir-0.99.9/src/autodir.c:75: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 name[ NAME_MAX+1 ]; /* modified argv[0] */
data/autodir-0.99.9/src/autodir.c:161: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 path[ PATH_MAX+1 ];
data/autodir-0.99.9/src/autodir.c:196: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 options[ 128 ];
data/autodir-0.99.9/src/autodir.c:197: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 our_name[ 128 ];
data/autodir-0.99.9/src/autodir.c:198: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 dot_path[ PATH_MAX+1 ];
data/autodir-0.99.9/src/autodir.c:226:20:  [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).
	autodir.ioctlfd = open( dot_path, O_RDONLY ); /* Root directory for ioctl()'s*/
data/autodir-0.99.9/src/autodir.c:304: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 mname[ NAME_MAX+1 ]; /*origial requested directory.
data/autodir-0.99.9/src/autodir.c:308: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 vpath[ PATH_MAX+1 ];
data/autodir-0.99.9/src/autodir.c:309: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 rpath[ PATH_MAX+1 ];
data/autodir-0.99.9/src/autodir.c:433: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 name[ NAME_MAX+1 ], *n;
data/autodir-0.99.9/src/autodir.c:434: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 path[ PATH_MAX+1 ];
data/autodir-0.99.9/src/autodir.c:557:17:  [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( ( nullfd = open( "/dev/null", O_RDWR ) ) < 0 )
data/autodir-0.99.9/src/autodir.c:576: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( ( pidfp = fopen( self.pid_file, "wt" ) ) )
data/autodir-0.99.9/src/backup.c:302: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 buf[200];
data/autodir-0.99.9/src/backup.c:326: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 buf[200];
data/autodir-0.99.9/src/backup.c:350: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 buf[200];
data/autodir-0.99.9/src/backup_argv.c:58:8:  [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 hostname[ HOSTNAME_LEN+1 ];
data/autodir-0.99.9/src/backup_argv.c:98: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 b[ ARG_BUF_SIZE + 1 ], c;
data/autodir-0.99.9/src/backup_argv.c:150: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 **av, arg_buf[ ARG_BUF_SIZE + 1 ];
data/autodir-0.99.9/src/backup_pid.h:12: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 name[ NAME_MAX+1 ];
data/autodir-0.99.9/src/backup_queue.c:59: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 dname[NAME_MAX+1];
data/autodir-0.99.9/src/backup_queue.c:60: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 dpath[PATH_MAX+1];
data/autodir-0.99.9/src/lockfile.c:46: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 name[ NAME_MAX + 1 ];
data/autodir-0.99.9/src/lockfile.c:47: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 path[ PATH_MAX + 1 ];
data/autodir-0.99.9/src/lockfile.c:64:8:  [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 spid[ 128 ]; /*string form of pid*/
data/autodir-0.99.9/src/lockfile.c:362: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 path[ PATH_MAX + 1 ];
data/autodir-0.99.9/src/lockfile.c:383: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).
		if( ( fd = open( path, O_RDWR | O_CREAT, 0644 ) ) == -1 )
data/autodir-0.99.9/src/lockfile.c:547: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 ldir[ PATH_MAX + 1 ];
data/autodir-0.99.9/src/miscfuncs.c:170: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 path[ PATH_MAX + 1 ];
data/autodir-0.99.9/src/miscfuncs.c:278: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 to[ PATH_MAX+1 ];
data/autodir-0.99.9/src/miscfuncs.c:281: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 str_time[ 256 ];
data/autodir-0.99.9/src/modules/autogroup.c:106: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 realpath[ PATH_MAX+1 ];
data/autodir-0.99.9/src/modules/autogroup.c:107: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 renamedir[ PATH_MAX+1 ];
data/autodir-0.99.9/src/modules/autogroup.c:606: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 realdir[PATH_MAX+1];
data/autodir-0.99.9/src/modules/autogroup.c:607: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 name[128];
data/autodir-0.99.9/src/modules/autohome.c:125: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 realpath[ PATH_MAX+1 ]; /*real base directory*/
data/autodir-0.99.9/src/modules/autohome.c:126: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 skel[ PATH_MAX+1 ]; 
data/autodir-0.99.9/src/modules/autohome.c:127: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 renamedir[ PATH_MAX+1 ];
data/autodir-0.99.9/src/modules/autohome.c:469: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 buf[ READ_BUF_SIZE ];
data/autodir-0.99.9/src/modules/autohome.c:500: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).
	if( ( sfd = open( sfile, O_RDONLY ) ) == -1 )
data/autodir-0.99.9/src/modules/autohome.c:507:8:  [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).
	dfd = open( dfile, O_WRONLY | O_CREAT | O_EXCL,
data/autodir-0.99.9/src/modules/autohome.c:571: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 sdent[ PATH_MAX+1 ]; /*source directory entry*/
data/autodir-0.99.9/src/modules/autohome.c:572: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 ddent[ PATH_MAX+1 ]; /*destination directory entry*/
data/autodir-0.99.9/src/modules/autohome.c:667: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 stamp[ PATH_MAX+1 ];
data/autodir-0.99.9/src/modules/autohome.c:672:7:  [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).
	fd = open( stamp, O_WRONLY | O_CREAT | O_TRUNC, 0 );
data/autodir-0.99.9/src/modules/autohome.c:719: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 stamp[ PATH_MAX+1 ];
data/autodir-0.99.9/src/modules/autohome.c:920: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 tmp[ PATH_MAX+1 ];
data/autodir-0.99.9/src/modules/autohome.c:921: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 home[ PATH_MAX+1 ];
data/autodir-0.99.9/src/modules/autohome.c:976: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 realdir[PATH_MAX+1];
data/autodir-0.99.9/src/modules/autohome.c:977: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 name[128];
data/autodir-0.99.9/src/modules/automisc.c:101: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 realpath[ PATH_MAX+1 ];
data/autodir-0.99.9/src/msg.c:101: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 buf[ MSG_BUFSZ ], *b = buf;
data/autodir-0.99.9/src/multipath.c:48: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 name[ NAME_MAX + 1 ];
data/autodir-0.99.9/src/options.c:74: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 ostr[ MAX_OPTIONS * 2 + 1 ];
data/autodir-0.99.9/src/workon.c:41: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 name[ NAME_MAX + 1 ]; /*file/dir name can not exceed more then this*/
data/autodir-0.99.9/src/autodir.c:257:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while( ( n = read( fd, buf, sz ) ) == -1 &&
data/autodir-0.99.9/src/modules/autogroup.c:557: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).
	if( ! name || strlen( name ) > NAME_MAX )
data/autodir-0.99.9/src/modules/autohome.c:524:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		n = read( sfd, buf, sizeof(buf) );
data/autodir-0.99.9/src/modules/autohome.c:926: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).
	if( ! name || strlen( name ) > NAME_MAX )
data/autodir-0.99.9/src/modules/automisc.c:455: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).
	if( ! name || strlen( name ) > NAME_MAX )

ANALYSIS SUMMARY:

Hits = 121
Lines analyzed = 10537 in approximately 0.27 seconds (39090 lines/second)
Physical Source Lines of Code (SLOC) = 7620
Hits@level = [0]  92 [1]   5 [2]  55 [3]  41 [4]   2 [5]  18
Hits@level+ = [0+] 213 [1+] 121 [2+] 116 [3+]  61 [4+]  20 [5+]  18
Hits/KSLOC@level+ = [0+] 27.9528 [1+] 15.8793 [2+] 15.2231 [3+] 8.00525 [4+] 2.62467 [5+] 2.3622
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.