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/jshon-20131010/jshon.c

FINAL RESULTS:

data/jshon-20131010/jshon.c:100:17:  [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 count = vsnprintf(NULL, 0, format, ap);
data/jshon-20131010/jshon.c:110:17:  [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.
        count = vsnprintf(buffer, count + 1, format, ap);
data/jshon-20131010/jshon.c:862:23:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((optchar = getopt(argc, argv, ALL_OPTIONS)) != -1)
data/jshon-20131010/jshon.c:972:27:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
        while ((optchar = getopt(argc, argv, ALL_OPTIONS)) != -1)
data/jshon-20131010/jshon.c:280: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 buffer[BUFSIZ];
data/jshon-20131010/jshon.c:319: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.
        memcpy(&content[content_size], buffer, bytes_r);
data/jshon-20131010/jshon.c:375:10:  [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(path, "r");
data/jshon-20131010/jshon.c:1059:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fp = fopen(file_path, "w");
data/jshon-20131010/jshon.c:294:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ssize_t bytes_r = read(fd, buffer, sizeof(buffer));
data/jshon-20131010/jshon.c:403:23:  [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).
    char* last = in + strlen(in) - 1;
data/jshon-20131010/jshon.c:481:50:  [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).
            i = asprintf(&temp2, "%.*s", (signed)strlen(temp)-2, &temp[1]);
data/jshon-20131010/jshon.c:609: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).
            return strlen(json_string_value(json));
data/jshon-20131010/jshon.c:916: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).
    if (in_place && strlen(file_path)==0)
data/jshon-20131010/jshon.c:921:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    else if (strlen(file_path) > 0)
data/jshon-20131010/jshon.c:1057: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).
    if (in_place && strlen(file_path) > 0)

ANALYSIS SUMMARY:

Hits = 15
Lines analyzed = 1066 in approximately 0.08 seconds (14092 lines/second)
Physical Source Lines of Code (SLOC) = 857
Hits@level = [0]  26 [1]   7 [2]   4 [3]   2 [4]   2 [5]   0
Hits@level+ = [0+]  41 [1+]  15 [2+]   8 [3+]   4 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 47.8413 [1+] 17.5029 [2+] 9.33489 [3+] 4.66744 [4+] 2.33372 [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.