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/latrace-0.5.11/test/lib-test-libsym3.c
Examining data/latrace-0.5.11/test/lib-test-args.c
Examining data/latrace-0.5.11/test/test1.c
Examining data/latrace-0.5.11/test/test-lib.h
Examining data/latrace-0.5.11/test/test-args.h
Examining data/latrace-0.5.11/test/test-common.c
Examining data/latrace-0.5.11/test/test-lib.c
Examining data/latrace-0.5.11/test/test-args.c
Examining data/latrace-0.5.11/test/sysdeps/arm/test-args.c
Examining data/latrace-0.5.11/test/sysdeps/x86_64/test-args.c
Examining data/latrace-0.5.11/test/sysdeps/i686/test-args.c
Examining data/latrace-0.5.11/test/lib-test-args.h
Examining data/latrace-0.5.11/test/lib-test-common.c
Examining data/latrace-0.5.11/test/lib-test-libsym2.c
Examining data/latrace-0.5.11/test/test-args-long-32.c
Examining data/latrace-0.5.11/test/test-libsym.c
Examining data/latrace-0.5.11/test/lib-test-libsym1.c
Examining data/latrace-0.5.11/test/test-args-long-64.c
Examining data/latrace-0.5.11/test/test-kill.c
Examining data/latrace-0.5.11/src/config.c
Examining data/latrace-0.5.11/src/latrace.c
Examining data/latrace-0.5.11/src/autoconf.h
Examining data/latrace-0.5.11/src/stats.c
Examining data/latrace-0.5.11/src/audit-init.c
Examining data/latrace-0.5.11/src/stack.c
Examining data/latrace-0.5.11/src/lib-include.h
Examining data/latrace-0.5.11/src/tty.c
Examining data/latrace-0.5.11/src/objsearch.c
Examining data/latrace-0.5.11/src/ctl.c
Examining data/latrace-0.5.11/src/run.c
Examining data/latrace-0.5.11/src/lib-include.c
Examining data/latrace-0.5.11/src/sysdeps/arm/stack.c
Examining data/latrace-0.5.11/src/sysdeps/x86_64/stack.c
Examining data/latrace-0.5.11/src/sysdeps/x86_64/stack.h
Examining data/latrace-0.5.11/src/sysdeps/x86_64/args.h
Examining data/latrace-0.5.11/src/sysdeps/i686/stack.c
Examining data/latrace-0.5.11/src/sysdeps/i686/stack.h
Examining data/latrace-0.5.11/src/audit.h
Examining data/latrace-0.5.11/src/symbol.c
Examining data/latrace-0.5.11/src/list.h
Examining data/latrace-0.5.11/src/config.h
Examining data/latrace-0.5.11/src/output.c
Examining data/latrace-0.5.11/src/fifo.c
Examining data/latrace-0.5.11/src/args.h
Examining data/latrace-0.5.11/src/args.c
Examining data/latrace-0.5.11/src/audit.c
Examining data/latrace-0.5.11/src/thread.c
Examining data/latrace-0.5.11/etc/latrace.d/headers/typedefs.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/term.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/signal.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/inet.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/netdb.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/stat.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/locale.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/dirent.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/sysdeps/x86_64/latrace.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/sysdeps/x86_64/syscall.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/resource.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/utmp.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/termios.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/libintl.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/ctype.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/mman.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/ioctl.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/unistd.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/time.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/misc.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/latrace.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/stdio.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/pwd.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/socket.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/libio.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/string.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/fcntl.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/getopt.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/ncurses.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/stdlib.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/pthread.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/syslog.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/wait.h
Examining data/latrace-0.5.11/etc/latrace.d/headers/dlfcn.h

FINAL RESULTS:

data/latrace-0.5.11/etc/latrace.d/headers/stat.h:18:5:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
int chmod(char *file, __mode_t mode);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:75:7:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
char* gets(char *s);
data/latrace-0.5.11/etc/latrace.d/headers/unistd.h:32:7:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
int   chown(char *file, __uid_t owner, __gid_t group);
data/latrace-0.5.11/etc/latrace.d/headers/unistd.h:108:9:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
size_t  readlink(char *path, char *buf, size_t len);
data/latrace-0.5.11/etc/latrace.d/headers/ncurses.h:308:9:  [4] (buffer) vsscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
int     vsscanf(char *s, char *s1);
data/latrace-0.5.11/etc/latrace.d/headers/pwd.h:29:5:  [4] (buffer) getpw:
  This function is dangerous; it may overflow the provided buffer. It
  extracts data from a 'protected' area, but most systems have many commands
  to let users modify the protected area, and it's not always clear what
  their limits are. Best to avoid using this function altogether (CWE-676,
  CWE-120). Use getpwuid() instead.
int getpw(__uid_t uid, char *buffer);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:40:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
int fprintf(FILE *stream, char *format);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:41:5:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
int printf(char *format);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:42:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
int sprintf(void *s, char *format);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:43:5:  [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.
int vfprintf(FILE *s, char *format);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:44:5:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
int vprintf(char *format);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:45:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
int vsprintf(void *s, char *format);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:46:5:  [4] (format) snprintf:
  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.
int snprintf(void *s, size_t maxlen, char *format);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:47:5:  [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.
int vsnprintf(void *s, size_t maxlen, char *format);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:53:5:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
int fscanf(FILE *stream, char *format);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:54:5:  [4] (buffer) scanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
int scanf(char *format);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:55:5:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
int sscanf(char *s, char *format);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:56:5:  [4] (buffer) vfscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
int vfscanf(FILE *s, char *format);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:57:5:  [4] (buffer) vscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
int vscanf(char *format);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:58:5:  [4] (buffer) vsscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
int vsscanf(char *s, char *format);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:126:9:  [4] (shell) popen:
  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.
FILE*   popen(char *command, char *modes);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:129:9:  [4] (misc) cuserid:
  Exactly what cuserid() does is poorly defined (e.g., some systems use the
  effective uid, like Linux, while others like System V use the real uid).
  Thus, you can't trust what it does. It's certainly not portable (The
  cuserid function was included in the 1988 version of POSIX, but removed
  from the 1990 version). Also, if passed a non-null parameter, there's a
  risk of a buffer overflow if the passed-in buffer is not at least L_cuserid
  characters long (CWE-120). Use getpwuid(geteuid()) and extract the desired
  information instead.
char*   cuserid(char *s);
data/latrace-0.5.11/etc/latrace.d/headers/stdlib.h:130:9:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
char*   mktemp(char *template);
data/latrace-0.5.11/etc/latrace.d/headers/stdlib.h:138:9:  [4] (shell) system:
  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.
int     system(char *command);
data/latrace-0.5.11/etc/latrace.d/headers/string.h:15: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).
char*   strcpy(void *dest, char *src);
data/latrace-0.5.11/etc/latrace.d/headers/string.h:17:9:  [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).
char*   strcat(void *dest, char *src);
data/latrace-0.5.11/etc/latrace.d/headers/syslog.h:7: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.
void syslog(int pri, char *fmt);
data/latrace-0.5.11/etc/latrace.d/headers/unistd.h:5:5:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
int access(char *name, int type);
data/latrace-0.5.11/etc/latrace.d/headers/unistd.h:51:5:  [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.
int execv(char *path, void *argv);
data/latrace-0.5.11/etc/latrace.d/headers/unistd.h:52:5:  [4] (shell) execle:
  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.
int execle(char *path, char *arg);
data/latrace-0.5.11/etc/latrace.d/headers/unistd.h:53:5:  [4] (shell) execl:
  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.
int execl(char *path, char *arg);
data/latrace-0.5.11/etc/latrace.d/headers/unistd.h:54:5:  [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.
int execvp(char *file, void *argv);
data/latrace-0.5.11/etc/latrace.d/headers/unistd.h:55:5:  [4] (shell) execlp:
  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.
int execlp(char *file, char *arg);
data/latrace-0.5.11/etc/latrace.d/headers/unistd.h:118:9:  [4] (misc) getlogin:
  It's often easy to fool getlogin. Sometimes it does not work at all,
  because some program messed up the utmp file. Often, it gives only the
  first 8 characters of the login name. The user currently logged in on the
  controlling tty of our program need not be the user who started it. Avoid
  getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid())
  and extract the desired information instead.
char*   getlogin();
data/latrace-0.5.11/etc/latrace.d/headers/unistd.h:143:7:  [4] (misc) getpass:
  This function is obsolete and not portable. It was in SUSv2 but removed by
  POSIX.2. What it does exactly varies considerably between systems,
  particularly in where its prompt is displayed and where it gets its data
  (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations
  overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do
  exactly what you want. If you continue to use it, or write your own, be
  sure to zero the password as soon as possible to avoid leaving the
  cleartext password visible in the process' address space.
char* getpass(char *prompt);
data/latrace-0.5.11/etc/latrace.d/headers/unistd.h:166:7:  [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.
char* crypt(char *key, char *salt);
data/latrace-0.5.11/src/args.c:785:14:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		*arglen  = sprintf(argbuf, "%s"LT_EQUAL, arg->name);
data/latrace-0.5.11/src/args.c:817:9:  [4] (format) snprintf:
  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 = snprintf(argbuf, alen, FMT, *((TYPE*) pval));  \
data/latrace-0.5.11/src/args.c:853: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(argbuf, s);
data/latrace-0.5.11/src/args.c:920:25:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		data->argsd_totlen += sprintf(data->argsd_buf + data->argsd_totlen, 
data/latrace-0.5.11/src/args.c:1044: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(buf, LT_EQUAL);
data/latrace-0.5.11/src/audit-init.c:79:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(file, "%s/config", dir);
data/latrace-0.5.11/src/config.c:177: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(lt_sh(cfg, args_def), sval);
data/latrace-0.5.11/src/config.c:281: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(cfg->output_tty_file, sval);
data/latrace-0.5.11/src/config.c:288: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(lt_sh(cfg, libs_both), sval);
data/latrace-0.5.11/src/config.c:294: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(lt_sh(cfg, libs_to), sval);
data/latrace-0.5.11/src/config.c:300: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(lt_sh(cfg, libs_from), sval);
data/latrace-0.5.11/src/config.c:306: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(lt_sh(cfg, symbols), sval);
data/latrace-0.5.11/src/config.c:312: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(lt_sh(cfg, symbols_omit), sval);
data/latrace-0.5.11/src/config.c:318: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(lt_sh(cfg, flow_below), sval);
data/latrace-0.5.11/src/config.c:324: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(lt_sh(cfg, symbols_noexit), sval);
data/latrace-0.5.11/src/config.c:632: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(lt_sh(cfg, output), optarg);
data/latrace-0.5.11/src/config.h:390:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(lpbuf, "[%d %s:%05d] %s", \
data/latrace-0.5.11/src/config.h:395:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(lpbuf, ## args); \
data/latrace-0.5.11/src/fifo.c:58:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fifo, "%s/fifo-%d", get_notify_dir(dir),
data/latrace-0.5.11/src/fifo.c:194:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	len_data = sprintf(m->data, "%s %s %s %s", symname, libto, arg, argd);
data/latrace-0.5.11/src/lib-include.c:52:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s/%s", dir, file);
data/latrace-0.5.11/src/objsearch.c:124: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(r, s->dst);
data/latrace-0.5.11/src/objsearch.c:125: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(r, pat + strlen(s->src));
data/latrace-0.5.11/src/run.c:288:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(file, "%s/%s", name, d->d_name);
data/latrace-0.5.11/src/run.c:337:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(str_cfg, "%s/config", pa->dir);
data/latrace-0.5.11/src/run.c:373:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(str_audit, "%s/libltaudit.so.%s", CONFIG_LIBDIR,
data/latrace-0.5.11/src/run.c:385:13:  [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.
		if (-1 == execvp(cfg->prog, cfg->arg)) {
data/latrace-0.5.11/src/stats.c:142:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(buf, "%s%s", m->data + m->sym, m->data + m->lib);
data/latrace-0.5.11/src/sysdeps/x86_64/args.h:33:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(buf, "%s/%s",
data/latrace-0.5.11/test/test-lib.h:46:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(lpbuf, "%s:%d failed - %s", \
data/latrace-0.5.11/test/test-lib.h:50:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(lpbuf, ## args); \
data/latrace-0.5.11/etc/latrace.d/headers/getopt.h:4:5:  [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.
int getopt (int argc, void *argv, char *shortopts);
data/latrace-0.5.11/etc/latrace.d/headers/getopt.h:5:5:  [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.
int getopt();
data/latrace-0.5.11/etc/latrace.d/headers/getopt.h:6:5:  [3] (buffer) getopt_long:
  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.
int getopt_long(int argc, void *argv, char *shortopts, void *longopts, int *longind);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:11:7:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
char *tmpnam(char *s);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:13:7:  [3] (tmpfile) tempnam:
  Temporary file race condition (CWE-377).
char *tempnam(char *dir, char *pfx);
data/latrace-0.5.11/etc/latrace.d/headers/stdlib.h:38:9:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
long    random(void);
data/latrace-0.5.11/etc/latrace.d/headers/stdlib.h:39:9:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
void    srandom(u_int seed);
data/latrace-0.5.11/etc/latrace.d/headers/stdlib.h:41:9:  [3] (random) setstate:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
char*   setstate(char *statebuf);
data/latrace-0.5.11/etc/latrace.d/headers/stdlib.h:60:9:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
void    srand(u_int seed);
data/latrace-0.5.11/etc/latrace.d/headers/stdlib.h:72:9:  [3] (random) lrand48:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
long    lrand48(void);
data/latrace-0.5.11/etc/latrace.d/headers/stdlib.h:73:9:  [3] (random) nrand48:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
long    nrand48(void *xsubi);
data/latrace-0.5.11/etc/latrace.d/headers/stdlib.h:75:9:  [3] (random) mrand48:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
long    mrand48(void);
data/latrace-0.5.11/etc/latrace.d/headers/stdlib.h:76:9:  [3] (random) jrand48:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
long    jrand48(void *xsubi);
data/latrace-0.5.11/etc/latrace.d/headers/stdlib.h:79:9:  [3] (random) seed48:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
u_int*  seed48 (void *seed16v);
data/latrace-0.5.11/etc/latrace.d/headers/stdlib.h:81:9:  [3] (random) lcong48:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
void    lcong48(void *param);
data/latrace-0.5.11/etc/latrace.d/headers/stdlib.h:122:9:  [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.
char*   getenv(char *name);
data/latrace-0.5.11/etc/latrace.d/headers/stdlib.h:140:9:  [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(char *name, char *resolved);
data/latrace-0.5.11/etc/latrace.d/headers/string.h:83:9:  [3] (random) strfry:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
char*   strfry(char *string);
data/latrace-0.5.11/etc/latrace.d/headers/unistd.h:42:7:  [3] (buffer) getwd:
  This does not protect against buffer overflows by itself, so use with
  caution (CWE-120, CWE-20). Use getcwd instead.
char* getwd(char *buf);
data/latrace-0.5.11/etc/latrace.d/headers/unistd.h:142:7:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
int   chroot(char *path);
data/latrace-0.5.11/src/audit-init.c:158:24:  [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 (-1 == read_config(getenv("LT_DIR")))
data/latrace-0.5.11/src/config.c:485:7:  [3] (buffer) getopt_long:
  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.
		c = getopt_long(argc, argv, "+s:n:l:t:f:vhi:BdISb:cC:y:YL:po:a:N:ADVTFERq",
data/latrace-0.5.11/src/ctl.c:86:7:  [3] (buffer) getopt_long:
  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.
		c = getopt_long(argc, argv, "+d:",
data/latrace-0.5.11/test/test-lib.c:85:15:  [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.
	config_dir = getenv("LT_DIR");
data/latrace-0.5.11/etc/latrace.d/headers/fcntl.h:5:5:  [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).
int open(char *file, int oflag);
data/latrace-0.5.11/etc/latrace.d/headers/signal.h:60:9:  [2] (obsolete) ssignal:
  These functions are considered obsolete on most systems, and very
  non-portable (Linux-based systems handle them radically different,
  basically if gsignal/ssignal were the same as raise/signal respectively,
  while System V considers them a separate set and obsolete) (CWE-676).
  Switch to raise/signal, or some other signalling approach.
void*   ssignal(int sig = SIGNALS, void *handler = SIGNAL_HANDLER);
data/latrace-0.5.11/etc/latrace.d/headers/signal.h:61:9:  [2] (obsolete) gsignal:
  These functions are considered obsolete on most systems, and very
  non-portable (Linux-based systems handle them radically different,
  basically if gsignal/ssignal were the same as raise/signal respectively,
  while System V considers them a separate set and obsolete) (CWE-676).
  Switch to raise/signal, or some other signalling approach.
int     gsignal(int sig = SIGNALS);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:9:7:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
FILE *tmpfile(void);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:22: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).
FILE* fopen(char *filename, char *modes);
data/latrace-0.5.11/etc/latrace.d/headers/stdlib.h:6:7:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
int   atoi(char *nptr);
data/latrace-0.5.11/etc/latrace.d/headers/stdlib.h:7:7:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
long  atol(char *nptr);
data/latrace-0.5.11/etc/latrace.d/headers/stdlib.h:131:9:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
int     mkstemp(char *template);
data/latrace-0.5.11/etc/latrace.d/headers/string.h:5: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.
void*   memcpy(void *dest, void *src, size_t n);
data/latrace-0.5.11/etc/latrace.d/headers/string.h:56:9:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
void    bcopy(void *src, void *dest, size_t n);
data/latrace-0.5.11/etc/latrace.d/headers/unistd.h:96:9:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
__pid_t vfork();
data/latrace-0.5.11/src/args.c:903:3:  [2] (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). Risk is low because the
  source is a constant string.
		strcat(data->args_buf, ", ");
data/latrace-0.5.11/src/args.c:934:4:  [2] (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). Risk is low because the
  source is a constant string.
			strcat(data->argsd_buf, ", ");
data/latrace-0.5.11/src/args.c:937:26:  [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.
			data->argsd_totlen += sprintf(data->argsd_buf + 
data/latrace-0.5.11/src/audit-init.c:43:18:  [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 (-1 == (fd = open(file, O_RDWR))) {
data/latrace-0.5.11/src/audit-init.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 file[LT_MAXFILE];
data/latrace-0.5.11/src/audit-init.c:81:18:  [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 (-1 == (fd = open(file, O_RDONLY))) {
data/latrace-0.5.11/src/audit-init.c:226:3:  [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 *ptr[LT_NAMES_MAX];
data/latrace-0.5.11/src/audit-init.c:243:36:  [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).
	    (NULL == (lt_sh(&cfg, fout) = fopen(lt_sh(&cfg, output), "w")))) {
data/latrace-0.5.11/src/audit.c:108:3:  [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[FIFO_MSG_MAXLEN];
data/latrace-0.5.11/src/audit.c:159:3:  [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[FIFO_MSG_MAXLEN];
data/latrace-0.5.11/src/config.c:164:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		val = atoi(sval);  \
data/latrace-0.5.11/src/config.c:555:30:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			lt_sh(cfg, indent_size) = atoi(optarg);
data/latrace-0.5.11/src/config.c:673:35:  [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).
	    (NULL == (lt_sh(cfg, fout) = fopen(lt_sh(cfg, output), "w")))) {
data/latrace-0.5.11/src/config.h:110: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 libs_to[LT_LIBS_MAXSIZE];
data/latrace-0.5.11/src/config.h:111: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 libs_both[LT_LIBS_MAXSIZE];
data/latrace-0.5.11/src/config.h:112: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 libs_from[LT_LIBS_MAXSIZE];
data/latrace-0.5.11/src/config.h:114: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 libs_subst[LT_LIBS_MAXSIZE];
data/latrace-0.5.11/src/config.h:117: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 symbols[LT_SYMBOLS_MAXSIZE];
data/latrace-0.5.11/src/config.h:118: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 symbols_omit[LT_SYMBOLS_MAXSIZE];
data/latrace-0.5.11/src/config.h:119: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 symbols_noexit[LT_SYMBOLS_MAXSIZE];
data/latrace-0.5.11/src/config.h:121: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 flow_below[LT_SYMBOLS_MAXSIZE];
data/latrace-0.5.11/src/config.h:124: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 output[LT_MAXFILE];
data/latrace-0.5.11/src/config.h: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 args_def[LT_MAXFILE];
data/latrace-0.5.11/src/config.h:173: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 *arg[LT_NUM_ARG];
data/latrace-0.5.11/src/config.h:180: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 output_tty_file[LT_MAXFILE];
data/latrace-0.5.11/src/config.h:216: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 *libs_to[LT_NAMES_MAX];
data/latrace-0.5.11/src/config.h:219: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 *libs_from[LT_NAMES_MAX];
data/latrace-0.5.11/src/config.h:222: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 *libs_both[LT_NAMES_MAX];
data/latrace-0.5.11/src/config.h:225: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 *symbols[LT_NAMES_MAX];
data/latrace-0.5.11/src/config.h:228: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 *symbols_omit[LT_NAMES_MAX];
data/latrace-0.5.11/src/config.h:231: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 *symbols_noexit[LT_NAMES_MAX];
data/latrace-0.5.11/src/config.h:234: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 *flow_below[LT_NAMES_MAX];
data/latrace-0.5.11/src/config.h:272: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 data[0];
data/latrace-0.5.11/src/config.h:389: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 lpbuf[1024]; \
data/latrace-0.5.11/src/ctl.c:50:18:  [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 (-1 == (fd = open(cfg->config, O_RDWR))) {
data/latrace-0.5.11/src/ctl.c:95:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			cfg->disabled = atoi(optarg);
data/latrace-0.5.11/src/fifo.c:38: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 notify_dir[LT_MAXFILE];
data/latrace-0.5.11/src/fifo.c:56: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 fifo[100];
data/latrace-0.5.11/src/fifo.c:66:18:  [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 (-1 == (fd = open(fifo, O_WRONLY))) {
data/latrace-0.5.11/src/fifo.c:77: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_fifo[LT_MAXFILE];
data/latrace-0.5.11/src/fifo.c:82:18:  [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 (-1 == (fd = open(str_fifo, O_RDONLY)))
data/latrace-0.5.11/src/lib-include.c:40: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 fn[LT_MAXFILE];
data/latrace-0.5.11/src/lib-include.c:54: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).
	f = fopen(fn, "r");
data/latrace-0.5.11/src/lib-include.c:70:20:  [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 ((NULL != (f = fopen(file, "r")))) {
data/latrace-0.5.11/src/run.c:63:18:  [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 (-1 == (fd = open(file, O_CREAT | O_TRUNC | O_RDWR, mode))) {
data/latrace-0.5.11/src/run.c:92:11:  [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.
	unsigned char buf[1000];
data/latrace-0.5.11/src/run.c:110: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 buf[FIFO_MSG_MAXLEN];
data/latrace-0.5.11/src/run.c:281:3:  [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 file[LT_MAXFILE];
data/latrace-0.5.11/src/run.c:335: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_cfg[LT_MAXFILE];
data/latrace-0.5.11/src/run.c:371:3:  [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_audit[100];
data/latrace-0.5.11/src/run.c:431: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_dir[LT_MAXFILE];
data/latrace-0.5.11/src/stack.c:29: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[128];
data/latrace-0.5.11/src/stack.c:34:9:  [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).
	maps = fopen("/proc/self/maps", "r");
data/latrace-0.5.11/src/stats.c:137: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[1000];
data/latrace-0.5.11/src/sysdeps/arm/stack.c:86:18:  [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 __thread char buf[64];
data/latrace-0.5.11/src/sysdeps/x86_64/args.h:31: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 buf[LT_MAXFILE];
data/latrace-0.5.11/src/tty.c:70: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).
	slave = open(sname, O_RDWR);
data/latrace-0.5.11/src/tty.c:100:2:  [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).
	open("/dev/tty", O_RDWR);
data/latrace-0.5.11/src/tty.c:110: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[BUFSIZE];
data/latrace-0.5.11/src/tty.c:115: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).
		fd = open(cfg->output_tty_file, O_RDWR | O_CREAT | O_TRUNC,
data/latrace-0.5.11/test/test-common.c:14: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[BUFSIZE];
data/latrace-0.5.11/test/test-common.c:42: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[BUFSIZE];
data/latrace-0.5.11/test/test-lib.c:22: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 config_file[LT_MAXFILE];
data/latrace-0.5.11/test/test-lib.c:26:18:  [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 (-1 == (fd = open(config_file, O_RDWR))) {
data/latrace-0.5.11/test/test-lib.c:50: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 output_file[LT_MAXFILE];
data/latrace-0.5.11/test/test-lib.c:55:9:  [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).
	file = fopen(output_file, "w+");
data/latrace-0.5.11/test/test-lib.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 ebuf[BUFSIZE];
data/latrace-0.5.11/test/test-lib.h:45: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 lpbuf[1024]; \
data/latrace-0.5.11/test/test-lib.h:67: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[BUFSIZE]; \
data/latrace-0.5.11/etc/latrace.d/headers/stat.h:24:10:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
__mode_t umask(__mode_t mask);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:60:5:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int fgetc(FILE *stream);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:61:5:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int getc(FILE *stream);
data/latrace-0.5.11/etc/latrace.d/headers/stdio.h:62:5:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int getchar();
data/latrace-0.5.11/etc/latrace.d/headers/string.h:16:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
char*   strncpy(void *dest, char *src, size_t n);
data/latrace-0.5.11/etc/latrace.d/headers/string.h:18:9:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
char*   strncat(void *dest, char *src, size_t n);
data/latrace-0.5.11/etc/latrace.d/headers/string.h:47: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).
size_t  strlen(char *s);
data/latrace-0.5.11/etc/latrace.d/headers/unistd.h:16:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
size_t read(int fd, void *buf, size_t nbytes);
data/latrace-0.5.11/etc/latrace.d/headers/unistd.h:28:7:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
int   usleep(u_int useconds);
data/latrace-0.5.11/src/args.c:773: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).
	int namelen = strlen(arg->name);
data/latrace-0.5.11/src/args.c:839: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).
				int slen = strlen(s);
data/latrace-0.5.11/src/args.c:844: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).
					info_len = snprintf(argbuf, left, "(%p, %zu) ", s, strlen(s));
data/latrace-0.5.11/src/args.c:850:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
					strncpy(argbuf + left - sizeof("...\"") + 1, "...\"", sizeof("...\""));
data/latrace-0.5.11/src/args.c:852:6:  [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(argbuf + info_len, "\"");
data/latrace-0.5.11/src/args.c:854:6:  [1] (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). Risk is low because the
  source is a constant character.
					strcat(argbuf, "\"");
data/latrace-0.5.11/src/args.c:883: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).
	*arglen += strlen(argbuf);
data/latrace-0.5.11/src/audit-init.c:86:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (-1 == read(fd, &cfg.sh_storage, sizeof(cfg.sh_storage))) {
data/latrace-0.5.11/src/config.c:493: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).
			if (strlen(optarg) >= LT_LIBS_MAXSIZE)
data/latrace-0.5.11/src/config.c:500: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).
			if (strlen(optarg) >= LT_LIBS_MAXSIZE)
data/latrace-0.5.11/src/config.c:507: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).
			if (strlen(optarg) >= LT_LIBS_MAXSIZE)
data/latrace-0.5.11/src/config.c:514: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).
			if (strlen(optarg) >= LT_SYMBOLS_MAXSIZE)
data/latrace-0.5.11/src/config.c:521: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).
			if (strlen(optarg) >= LT_SYMBOLS_MAXSIZE)
data/latrace-0.5.11/src/config.c:528: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).
			if (strlen(optarg) >= LT_SYMBOLS_MAXSIZE)
data/latrace-0.5.11/src/config.c:585: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).
			if (strlen(optarg) > LT_SYMBOLS_MAXSIZE)
data/latrace-0.5.11/src/config.c:588:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(lt_sh(cfg, libs_subst), optarg, strlen(optarg));
data/latrace-0.5.11/src/config.c:588:44:  [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).
			strncpy(lt_sh(cfg, libs_subst), optarg, strlen(optarg));
data/latrace-0.5.11/src/fifo.c:148:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (-1 == (size = read(t->fifo_fd, h, sizeof(struct lt_fifo_mbase)))) {
data/latrace-0.5.11/src/fifo.c:165:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (-1 == (size = read(t->fifo_fd, buf + sizeof(*h), h->len))) {
data/latrace-0.5.11/src/fifo.c:190: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).
	m->lib = strlen(symname);
data/latrace-0.5.11/src/fifo.c:191: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).
	m->arg = m->lib + strlen(libto) + 1;
data/latrace-0.5.11/src/fifo.c:192: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).
	m->argd = m->arg + strlen(arg) + 1;
data/latrace-0.5.11/src/lib-include.c:43: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_file = strlen(file);
data/latrace-0.5.11/src/lib-include.c:44: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_dir  = strlen(dir);
data/latrace-0.5.11/src/objsearch.c:116: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).
	r = *ret = malloc(strlen(name) + strlen(s->dst));
data/latrace-0.5.11/src/objsearch.c:116:35:  [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).
	r = *ret = malloc(strlen(name) + strlen(s->dst));
data/latrace-0.5.11/src/objsearch.c:122:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(r, name, pat - name);
data/latrace-0.5.11/src/objsearch.c:125: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).
	strcat(r, pat + strlen(s->src));
data/latrace-0.5.11/src/run.c:95:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (-1 == read(fd_notify, event, 1000)) {
data/latrace-0.5.11/src/run.c:417:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(1000);
data/latrace-0.5.11/src/tty.c:128:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(master, buf, BUFSIZE);
data/latrace-0.5.11/test/test-kill.c:41:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(100);
data/latrace-0.5.11/test/test-lib.c:77: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).
	return strlen(buf);

ANALYSIS SUMMARY:

Hits = 213
Lines analyzed = 10604 in approximately 0.52 seconds (20296 lines/second)
Physical Source Lines of Code (SLOC) = 7555
Hits@level = [0] 139 [1]  42 [2]  80 [3]  24 [4]  63 [5]   4
Hits@level+ = [0+] 352 [1+] 213 [2+] 171 [3+]  91 [4+]  67 [5+]   4
Hits/KSLOC@level+ = [0+] 46.5917 [1+] 28.1932 [2+] 22.634 [3+] 12.045 [4+] 8.8683 [5+] 0.529451
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.