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/austin-1.0.1/src/mac/py_proc.h
Examining data/austin-1.0.1/src/logging.h
Examining data/austin-1.0.1/src/logging.c
Examining data/austin-1.0.1/src/mem.c
Examining data/austin-1.0.1/src/version.c
Examining data/austin-1.0.1/src/mem.h
Examining data/austin-1.0.1/src/py_code.c
Examining data/austin-1.0.1/src/error.h
Examining data/austin-1.0.1/src/py_proc.h
Examining data/austin-1.0.1/src/py_code.h
Examining data/austin-1.0.1/src/py_proc.c
Examining data/austin-1.0.1/src/argparse.h
Examining data/austin-1.0.1/src/linux/py_proc.h
Examining data/austin-1.0.1/src/stats.c
Examining data/austin-1.0.1/src/dict.c
Examining data/austin-1.0.1/src/stats.h
Examining data/austin-1.0.1/src/python.h
Examining data/austin-1.0.1/src/py_frame.c
Examining data/austin-1.0.1/src/version.h
Examining data/austin-1.0.1/src/austin.h
Examining data/austin-1.0.1/src/py_proc_list.h
Examining data/austin-1.0.1/src/win/py_proc.h
Examining data/austin-1.0.1/src/py_thread.h
Examining data/austin-1.0.1/src/error.c
Examining data/austin-1.0.1/src/py_proc_list.c
Examining data/austin-1.0.1/src/py_thread.c
Examining data/austin-1.0.1/src/dict.h
Examining data/austin-1.0.1/src/py_frame.h
Examining data/austin-1.0.1/src/argparse.c
Examining data/austin-1.0.1/src/austin.c
Examining data/austin-1.0.1/src/platform.h

FINAL RESULTS:

data/austin-1.0.1/src/linux/py_proc.h:320:25:  [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.
      int field_count = sscanf(line, "%lx-%lx %4c %lx %x:%x %x %s\n",
data/austin-1.0.1/src/logging.c:60: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.
    vfprintf(stderr, fmt, ap); fputc('\n', stderr);
data/austin-1.0.1/src/logging.c:63: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.
    vfprintf(logfile, fmt, ap); fputc('\n', logfile);
data/austin-1.0.1/src/logging.c:96: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.
    vfprintf(stderr, fmt, args); fputc('\n', stderr);
data/austin-1.0.1/src/logging.c:139: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.
    vfprintf(stderr, fmt, args); fputc('\n', stderr);
data/austin-1.0.1/src/py_proc.c:128:17:  [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.
#define _popen  popen
data/austin-1.0.1/src/py_proc.c:175:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(cmd, "%s -V 2>&1", self->bin_path);
data/austin-1.0.1/src/py_proc.c:687: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(cmd_line, exec);
data/austin-1.0.1/src/py_proc.c:693:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(cmd_line+pos, argv[i]);
data/austin-1.0.1/src/py_proc.c:724: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.
    execvp(exec, argv);
data/austin-1.0.1/src/py_proc_list.c:226:9:  [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 (fscanf(
data/austin-1.0.1/src/py_thread.c:174: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.
    fprintf(pargs.output_file, pargs.format, code->scope, code->filename, code->lineno);
data/austin-1.0.1/src/py_proc.c:699:26:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
  BOOL process_created = CreateProcess(
data/austin-1.0.1/src/py_proc.c:699:26:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
  BOOL process_created = CreateProcess(
data/austin-1.0.1/src/argparse.c:218:25:  [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).
    pargs.output_file = fopen(arg, "w");
data/austin-1.0.1/src/argparse.c:482:25:  [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).
    pargs.output_file = fopen(arg, "w");
data/austin-1.0.1/src/error.c:32:7:  [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.
const char * _error_msg_tab[MAXERROR] = {
data/austin-1.0.1/src/linux/py_proc.h:60: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         statm_file[24];
data/austin-1.0.1/src/linux/py_proc.h:103:33:  [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           fd            = open(object_file, O_RDONLY);
data/austin-1.0.1/src/linux/py_proc.h:192:33:  [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           fd            = open(object_file, O_RDONLY);
data/austin-1.0.1/src/linux/py_proc.h:286: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_name[32];
data/austin-1.0.1/src/linux/py_proc.h:292:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf(file_name, "/proc/%d/maps", self->pid);
data/austin-1.0.1/src/linux/py_proc.h:293:8:  [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).
  fp = fopen(file_name, "r");
data/austin-1.0.1/src/linux/py_proc.h:317:7:  [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    pathname[1024];
data/austin-1.0.1/src/linux/py_proc.h:318:7:  [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    m[sizeof(void *)]; // We don't care about these values.
data/austin-1.0.1/src/linux/py_proc.h:402:18:  [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 * statm = fopen(self->extra->statm_file, "rb");
data/austin-1.0.1/src/linux/py_proc.h:430:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf(self->extra->statm_file, "/proc/%d/statm", self->pid);
data/austin-1.0.1/src/logging.c:79: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 path[MAX_PATH];
data/austin-1.0.1/src/logging.c:81:15:  [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).
    logfile = fopen(path, "a");
data/austin-1.0.1/src/mac/py_proc.h:241:12:  [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 fd = open(path, O_RDONLY);
data/austin-1.0.1/src/py_proc.c:98:14:  [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 const char * _dynsym_array[DYNSYM_COUNT] = {
data/austin-1.0.1/src/py_proc.c:172: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 version[64];
data/austin-1.0.1/src/py_proc.c:173: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 cmd[128];
data/austin-1.0.1/src/py_proc.c:621:44:  [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.
      _dynsym_hash_array[i] = string_hash((char *) _dynsym_array[i]);
data/austin-1.0.1/src/py_proc_list.c:116:25:  [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 * pid_max_file = fopen("/proc/sys/kernel/pid_max", "rb");
data/austin-1.0.1/src/py_proc_list.c:205: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 stat_path[32];
data/austin-1.0.1/src/py_proc_list.c:206: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 buffer[1024];
data/austin-1.0.1/src/py_proc_list.c:220:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(stat_path, "/proc/%ld/stat", pid);
data/austin-1.0.1/src/py_proc_list.c:222:24:  [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 * stat_file = fopen(stat_path, "rb");
data/austin-1.0.1/src/python.h:398: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 ob_sval[1];
data/austin-1.0.1/src/python.h:408: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 ob_sval[1];
data/austin-1.0.1/src/win/py_proc.h:80:34:  [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.
      if (strcmp(".data", (const char *) s_hdr[i].Name) == 0) {
data/austin-1.0.1/src/win/py_proc.h:102:28:  [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 * sym_name = (char *) map_addr_from_rva(pMapping, names[i]);
data/austin-1.0.1/src/argparse.c:268:11:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      if (equal) *equal = 0;
data/austin-1.0.1/src/argparse.c:272:11:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      if (equal) *equal = '=';
data/austin-1.0.1/src/argparse.c:309:17:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      opt_arg = equal ? equal + 1 : argv[argi+1];
data/austin-1.0.1/src/argparse.c:310:15:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    } else if(equal != NULL)
data/austin-1.0.1/src/argparse.c:338:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int          n_opts   = strlen(opt_str);
data/austin-1.0.1/src/austin.c:64:5:  [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(pargs.t_sampling_interval - delta);
data/austin-1.0.1/src/dict.c:39: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).
  x ^= strlen(string);
data/austin-1.0.1/src/linux/py_proc.h:355:48:  [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).
            self->bin_path = strndup(pathname, strlen(pathname));
data/austin-1.0.1/src/linux/py_proc.h:366:46:  [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).
          self->lib_path = strndup(pathname, strlen(pathname));
data/austin-1.0.1/src/mac/py_proc.h:308: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(100000);
data/austin-1.0.1/src/mac/py_proc.h:333: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).
    int path_len = strlen(path);
data/austin-1.0.1/src/py_proc.c:59:64:  [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.
#define TIMER_START                     while (--try_cnt>=0) { usleep(INIT_RETRY_SLEEP);
data/austin-1.0.1/src/py_proc.c:152: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).
    int n = strlen(self->lib_path);
data/austin-1.0.1/src/py_proc.c:682:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  register int cmd_line_size = strlen(exec) + 1;
data/austin-1.0.1/src/py_proc.c:684:36:  [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).
  while (argv[i]) cmd_line_size += strlen(argv[i++]) + 1;
data/austin-1.0.1/src/py_proc.c:689:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  register int pos = strlen(exec);
data/austin-1.0.1/src/py_proc.c:694:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    pos += strlen(argv[i++]);

ANALYSIS SUMMARY:

Hits = 60
Lines analyzed = 6101 in approximately 0.14 seconds (42941 lines/second)
Physical Source Lines of Code (SLOC) = 3600
Hits@level = [0]  12 [1]  17 [2]  29 [3]   2 [4]  12 [5]   0
Hits@level+ = [0+]  72 [1+]  60 [2+]  43 [3+]  14 [4+]  12 [5+]   0
Hits/KSLOC@level+ = [0+]  20 [1+] 16.6667 [2+] 11.9444 [3+] 3.88889 [4+] 3.33333 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.