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/unarr-1.0.1/_7z/_7z.c
Examining data/unarr-1.0.1/_7z/_7z.h
Examining data/unarr-1.0.1/common/allocator.h
Examining data/unarr-1.0.1/common/conv.c
Examining data/unarr-1.0.1/common/crc32.c
Examining data/unarr-1.0.1/common/custalloc.c
Examining data/unarr-1.0.1/common/stream.c
Examining data/unarr-1.0.1/common/unarr-imp.h
Examining data/unarr-1.0.1/common/unarr.c
Examining data/unarr-1.0.1/lzmasdk/7zTypes.h
Examining data/unarr-1.0.1/lzmasdk/CpuArch.c
Examining data/unarr-1.0.1/lzmasdk/CpuArch.h
Examining data/unarr-1.0.1/lzmasdk/LzmaDec.c
Examining data/unarr-1.0.1/lzmasdk/LzmaDec.h
Examining data/unarr-1.0.1/lzmasdk/Ppmd.h
Examining data/unarr-1.0.1/lzmasdk/Ppmd7.c
Examining data/unarr-1.0.1/lzmasdk/Ppmd7.h
Examining data/unarr-1.0.1/lzmasdk/Ppmd7Dec.c
Examining data/unarr-1.0.1/lzmasdk/Ppmd8.c
Examining data/unarr-1.0.1/lzmasdk/Ppmd8.h
Examining data/unarr-1.0.1/lzmasdk/Ppmd8Dec.c
Examining data/unarr-1.0.1/lzmasdk/Precomp.h
Examining data/unarr-1.0.1/rar/huffman-rar.c
Examining data/unarr-1.0.1/rar/lzss.h
Examining data/unarr-1.0.1/rar/parse-rar.c
Examining data/unarr-1.0.1/rar/rar.c
Examining data/unarr-1.0.1/rar/rar.h
Examining data/unarr-1.0.1/rar/rarvm.c
Examining data/unarr-1.0.1/rar/rarvm.h
Examining data/unarr-1.0.1/rar/uncompress-rar.c
Examining data/unarr-1.0.1/rar/filter-rar.c
Examining data/unarr-1.0.1/tar/parse-tar.c
Examining data/unarr-1.0.1/tar/tar.c
Examining data/unarr-1.0.1/tar/tar.h
Examining data/unarr-1.0.1/test/main.c
Examining data/unarr-1.0.1/zip/inflate.c
Examining data/unarr-1.0.1/zip/inflate.h
Examining data/unarr-1.0.1/zip/parse-zip.c
Examining data/unarr-1.0.1/zip/uncompress-zip.c
Examining data/unarr-1.0.1/zip/zip.c
Examining data/unarr-1.0.1/zip/zip.h
Examining data/unarr-1.0.1/unarr.h

FINAL RESULTS:

data/unarr-1.0.1/common/unarr.c:106: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, msg, args);
data/unarr-1.0.1/tar/parse-tar.c:160:17:  [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(ptr, value);
data/unarr-1.0.1/tar/parse-tar.c:250:17:  [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(prefixed, name);
data/unarr-1.0.1/test/main.c:29:44:  [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.
#define FailIf(cond, msg, ...) if (cond) { fprintf(stderr, msg "\n", __VA_ARGS__); goto CleanUp; } error_step++
data/unarr-1.0.1/_7z/_7z.c:145:5:  [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(buffer, uncomp->buffer + uncomp->offset + ar->entry_size_uncompressed - uncomp->bytes_left, buffer_size);
data/unarr-1.0.1/common/conv.c:9:14:  [2] (buffer) wchar_t:
  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 wchar_t gCp437[256] = {
data/unarr-1.0.1/common/conv.c:61: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.
        char buf[4];
data/unarr-1.0.1/common/stream.c:88:22:  [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 *f = path ? fopen(path, "rb") : NULL;
data/unarr-1.0.1/common/stream.c:123:5:  [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(buffer, stm->data + stm->offset, count);
data/unarr-1.0.1/lzmasdk/LzmaDec.c:870:13:  [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(p->tempBuf, src, inSize);
data/unarr-1.0.1/lzmasdk/LzmaDec.c:967:5:  [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(dest, p->dic + dicPos, outSizeCur);
data/unarr-1.0.1/lzmasdk/Ppmd7Dec.c:81: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.
#define MASK(sym) ((signed char *)charMask)[sym]
data/unarr-1.0.1/lzmasdk/Ppmd8Dec.c:46: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.
#define MASK(sym) ((signed char *)charMask)[sym]
data/unarr-1.0.1/rar/filter-rar.c:231:5:  [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(&vm->memory[RARProgramSystemGlobalAddress], filter->globaldata, globallength);
data/unarr-1.0.1/rar/filter-rar.c:236: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(&vm->memory[RARProgramUserGlobalAddress], filter->prog->staticdata, staticlength);
data/unarr-1.0.1/rar/filter-rar.c:258: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(filter->globaldata, &vm->memory[RARProgramSystemGlobalAddress], filter->globaldatalen);
data/unarr-1.0.1/rar/filter-rar.c:279: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(filter->globaldata, globaldata, globaldatalen);
data/unarr-1.0.1/rar/filter-rar.c:466:13:  [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(filter->globaldata, filter->prog->globalbackup, filter->prog->globalbackuplen);
data/unarr-1.0.1/rar/filter-rar.c:490:13:  [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(filter->prog->globalbackup, filter->globaldata, filter->globaldatalen);
data/unarr-1.0.1/rar/huffman-rar.c:22: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(new_tree, code->tree, code->capacity * sizeof(*code->tree));
data/unarr-1.0.1/rar/lzss.h:66: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(buffer, &self->window[windowoffs], length);
data/unarr-1.0.1/rar/lzss.h:70: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(buffer, &self->window[windowoffs], firstpart);
data/unarr-1.0.1/rar/lzss.h:71: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(buffer + firstpart, &self->window[0], length - firstpart);
data/unarr-1.0.1/rar/parse-rar.c:14: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.
    unsigned char header_data[7];
data/unarr-1.0.1/rar/parse-rar.c:30: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.
        unsigned char size_data[4];
data/unarr-1.0.1/rar/parse-rar.c:49: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.
    unsigned char buffer[256];
data/unarr-1.0.1/rar/parse-rar.c:76: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.
    unsigned char data[21];
data/unarr-1.0.1/rar/parse-rar.c:89: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.
        unsigned char more_data[8];
data/unarr-1.0.1/rar/parse-rar.c:128: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(str, data, len);
data/unarr-1.0.1/rar/parse-rar.c:191: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.
        unsigned char data[21];
data/unarr-1.0.1/rar/rar.c:148:22:  [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 buffer[1024];
data/unarr-1.0.1/rar/rar.c:207: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 signature[FILE_SIGNATURE_SIZE];
data/unarr-1.0.1/rar/rarvm.c:55: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(newCodes, prog->opcodes, prog->capacity * sizeof(*prog->opcodes));
data/unarr-1.0.1/rar/rarvm.c:591: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 const char *instructionNames[RARNumberOfInstructions] = {
data/unarr-1.0.1/rar/uncompress-rar.c:992:13:  [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(buffer, uncomp_v3->filters.bytes, count);
data/unarr-1.0.1/tar/parse-tar.c:65: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 data[TAR_BLOCK_SIZE];
data/unarr-1.0.1/test/main.c:60:22:  [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 buffer[1024];
data/unarr-1.0.1/zip/inflate.c:474:50:  [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.
int inflate_flush(inflate_state *state, unsigned char data_in[8])
data/unarr-1.0.1/zip/inflate.h:16:50:  [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.
int inflate_flush(inflate_state *state, unsigned char data_in[8]);
data/unarr-1.0.1/common/stream.c:6:83:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
ar_stream *ar_open_stream(void *data, ar_stream_close_fn close, ar_stream_read_fn read, ar_stream_seek_fn seek, ar_stream_tell_fn tell)
data/unarr-1.0.1/common/stream.c:15:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    stream->read = read;
data/unarr-1.0.1/common/stream.c:30:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return stream->read(stream->data, buffer, count);
data/unarr-1.0.1/common/stream.c:178:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            return read;
data/unarr-1.0.1/common/stream.c:187:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return read;
data/unarr-1.0.1/common/unarr-imp.h:37:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ar_stream_read_fn read;
data/unarr-1.0.1/common/unarr-imp.h:43:83:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
ar_stream *ar_open_stream(void *data, ar_stream_close_fn close, ar_stream_read_fn read, ar_stream_seek_fn seek, ar_stream_tell_fn tell);
data/unarr-1.0.1/rar/parse-rar.c:20:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read < sizeof(header_data))
data/unarr-1.0.1/rar/parse-rar.c:34:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read < sizeof(header_data) + sizeof(size_data))
data/unarr-1.0.1/rar/parse-rar.c:39:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (header->size < read) {
data/unarr-1.0.1/rar/parse-rar.c:119:49:  [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).
    const uint8_t *in = (const uint8_t *)data + strlen(data) + 1;
data/unarr-1.0.1/rar/parse-rar.c:217:29:  [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 (namelen == strlen(name)) {
data/unarr-1.0.1/tar/parse-tar.c:158:26:  [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).
            ptr = malloc(strlen(value) + 1);
data/unarr-1.0.1/tar/parse-tar.c:249:17:  [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(prefixed, "/");
data/unarr-1.0.1/zip/zip.c:55:93:  [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 (entry.datasize == 0 && ar_entry_get_name(ar) && *zip->entry.name && zip->entry.name[strlen(zip->entry.name) - 1] == '/') {

ANALYSIS SUMMARY:

Hits = 54
Lines analyzed = 11444 in approximately 0.32 seconds (35451 lines/second)
Physical Source Lines of Code (SLOC) = 9433
Hits@level = [0]  17 [1]  15 [2]  35 [3]   0 [4]   4 [5]   0
Hits@level+ = [0+]  71 [1+]  54 [2+]  39 [3+]   4 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 7.52677 [1+] 5.72458 [2+] 4.13442 [3+] 0.424043 [4+] 0.424043 [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.