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/metacam-1.2/canontags.cc
Examining data/metacam-1.2/casiotags.cc
Examining data/metacam-1.2/dataifd.cc
Examining data/metacam-1.2/dpyfuncs.h
Examining data/metacam-1.2/editifd.cc
Examining data/metacam-1.2/exiftags.cc
Examining data/metacam-1.2/filetiff.h
Examining data/metacam-1.2/lookups.cc
Examining data/metacam-1.2/metacam.h
Examining data/metacam-1.2/metatiff.cc
Examining data/metacam-1.2/metatiff.h
Examining data/metacam-1.2/nikontags.cc
Examining data/metacam-1.2/odrivers.h
Examining data/metacam-1.2/olympustags.cc
Examining data/metacam-1.2/rationals.cc
Examining data/metacam-1.2/tiffdata.cc
Examining data/metacam-1.2/datatiff.h
Examining data/metacam-1.2/edittiff.h
Examining data/metacam-1.2/metacam.cc
Examining data/metacam-1.2/ocontext.cc
Examining data/metacam-1.2/filetiff.cc
Examining data/metacam-1.2/dataifdentry.cc
Examining data/metacam-1.2/dpyfuncs.cc

FINAL RESULTS:

data/metacam-1.2/metacam.cc:315:12:  [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 opt = getopt_long(argc, argv, "havx", opts, &oidx);
data/metacam-1.2/dataifdentry.cc:118: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 tmpbuf[1024];
data/metacam-1.2/dataifdentry.cc:135: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 tmpbuf[1024];
data/metacam-1.2/dpyfuncs.cc:449:6:  [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 tl[32];
data/metacam-1.2/dpyfuncs.cc:534:6:  [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 zoom[32];
data/metacam-1.2/dpyfuncs.cc:582:6:  [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 n[32];
data/metacam-1.2/dpyfuncs.cc:619: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 img[32];
data/metacam-1.2/dpyfuncs.cc:641: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 sn[32];
data/metacam-1.2/dpyfuncs.cc:825: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 typecode[9];
data/metacam-1.2/filetiff.cc:36: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[2];
data/metacam-1.2/metacam.cc:132: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[2];
data/metacam-1.2/metacam.cc:149: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 scanbuf[1024];
data/metacam-1.2/metacam.cc:268:12:  [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 nikontest[7];
data/metacam-1.2/metacam.cc:352: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).
	is.open((const char*)(argv[o]), ios::binary | ios::in);
data/metacam-1.2/ocontext.cc:319: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 tmphex[8];
data/metacam-1.2/filetiff.cc:74:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    is.read((char*)buf, bytes);
data/metacam-1.2/metacam.cc:133:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    is.read((char*)header, 2);
data/metacam-1.2/metacam.cc:162:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    is.read((char*)&scanbuf[startofs], 1024 - startofs);
data/metacam-1.2/ocontext.cc:47: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).
    static const int padl = strlen(static_pad);
data/metacam-1.2/ocontext.cc:51: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 hlen = strlen(hdr);
data/metacam-1.2/ocontext.cc:65: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).
    static const int padl = strlen(static_pad);
data/metacam-1.2/ocontext.cc:114:33:  [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).
    static const int DASH_LEN = strlen(DASH_LINE);
data/metacam-1.2/ocontext.cc:118: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 hlen = strlen(header);
data/metacam-1.2/ocontext.cc:132:33:  [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).
    static const int DASH_LEN = strlen(DASH_LINE);

ANALYSIS SUMMARY:

Hits = 24
Lines analyzed = 4321 in approximately 0.12 seconds (35280 lines/second)
Physical Source Lines of Code (SLOC) = 3025
Hits@level = [0]   6 [1]   9 [2]  14 [3]   1 [4]   0 [5]   0
Hits@level+ = [0+]  30 [1+]  24 [2+]  15 [3+]   1 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 9.91736 [1+] 7.93388 [2+] 4.95868 [3+] 0.330579 [4+]   0 [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.