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/globus-gram-job-manager-lsf-3.0/seg/seg_lsf_module.c

FINAL RESULTS:

data/globus-gram-job-manager-lsf-3.0/seg/seg_lsf_module.c:89: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);
data/globus-gram-job-manager-lsf-3.0/seg/seg_lsf_module.c:658:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(state->event_idx_path, "%s/%s", state->log_dir, lsf_idx_name);
data/globus-gram-job-manager-lsf-3.0/seg/seg_lsf_module.c:675:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(state->path, "%s/lsb.events.%d", state->log_dir, i+1);
data/globus-gram-job-manager-lsf-3.0/seg/seg_lsf_module.c:701:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(state->path, "%s/lsb.events", state->log_dir);
data/globus-gram-job-manager-lsf-3.0/seg/seg_lsf_module.c:706:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(state->path, "%s/lsb.events.%d", state->log_dir, i-1);
data/globus-gram-job-manager-lsf-3.0/seg/seg_lsf_module.c:855:9:  [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.
        sscanf(state->buffer + state->buffer_point,
data/globus-gram-job-manager-lsf-3.0/seg/seg_lsf_module.c:348:29:  [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_state->fp = fopen(logfile_state->path, "r");
data/globus-gram-job-manager-lsf-3.0/seg/seg_lsf_module.c:497: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).
            state->fp = fopen(state->path, "r");
data/globus-gram-job-manager-lsf-3.0/seg/seg_lsf_module.c:567: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).
            state->fp = fopen(state->path, "r");
data/globus-gram-job-manager-lsf-3.0/seg/seg_lsf_module.c:677: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).
            state->fp = fopen(state->path, "r");
data/globus-gram-job-manager-lsf-3.0/seg/seg_lsf_module.c:808: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                                event_type_buffer[64];
data/globus-gram-job-manager-lsf-3.0/seg/seg_lsf_module.c:809:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char                                job_id_buffer[32];
data/globus-gram-job-manager-lsf-3.0/seg/seg_lsf_module.c:638:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        state->path = malloc(strlen(state->log_dir) + sizeof(lsf_log_prefix)
data/globus-gram-job-manager-lsf-3.0/seg/seg_lsf_module.c:650:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        state->event_idx_path = malloc(strlen(state->log_dir)

ANALYSIS SUMMARY:

Hits = 14
Lines analyzed = 1055 in approximately 0.05 seconds (23399 lines/second)
Physical Source Lines of Code (SLOC) = 741
Hits@level = [0]   9 [1]   2 [2]   6 [3]   0 [4]   6 [5]   0
Hits@level+ = [0+]  23 [1+]  14 [2+]  12 [3+]   6 [4+]   6 [5+]   0
Hits/KSLOC@level+ = [0+] 31.0391 [1+] 18.8934 [2+] 16.1943 [3+] 8.09717 [4+] 8.09717 [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.