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/gexiv2-0.12.1/gexiv2/gexiv2-log-private.h
Examining data/gexiv2-0.12.1/gexiv2/gexiv2-log.cpp
Examining data/gexiv2-0.12.1/gexiv2/gexiv2-log.h
Examining data/gexiv2-0.12.1/gexiv2/gexiv2-managed-stream.h
Examining data/gexiv2-0.12.1/gexiv2/gexiv2-metadata-exif.cpp
Examining data/gexiv2-0.12.1/gexiv2/gexiv2-metadata-gps.cpp
Examining data/gexiv2-0.12.1/gexiv2/gexiv2-metadata-iptc.cpp
Examining data/gexiv2-0.12.1/gexiv2/gexiv2-metadata-private.h
Examining data/gexiv2-0.12.1/gexiv2/gexiv2-metadata-xmp.cpp
Examining data/gexiv2-0.12.1/gexiv2/gexiv2-metadata.cpp
Examining data/gexiv2-0.12.1/gexiv2/gexiv2-metadata.h
Examining data/gexiv2-0.12.1/gexiv2/gexiv2-preview-image-private.h
Examining data/gexiv2-0.12.1/gexiv2/gexiv2-preview-image.cpp
Examining data/gexiv2-0.12.1/gexiv2/gexiv2-preview-image.h
Examining data/gexiv2-0.12.1/gexiv2/gexiv2-preview-properties-private.h
Examining data/gexiv2-0.12.1/gexiv2/gexiv2-preview-properties.cpp
Examining data/gexiv2-0.12.1/gexiv2/gexiv2-preview-properties.h
Examining data/gexiv2-0.12.1/gexiv2/gexiv2-startup.cpp
Examining data/gexiv2-0.12.1/gexiv2/gexiv2-startup.h
Examining data/gexiv2-0.12.1/gexiv2/gexiv2-stream-io.cpp
Examining data/gexiv2-0.12.1/gexiv2/gexiv2-stream-io.h
Examining data/gexiv2-0.12.1/gexiv2/gexiv2.h
Examining data/gexiv2-0.12.1/test/gexiv2-regression.c

FINAL RESULTS:

data/gexiv2-0.12.1/gexiv2/gexiv2-metadata.cpp:65:9:  [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 open() {
data/gexiv2-0.12.1/gexiv2/gexiv2-metadata.cpp:383:50:  [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).
        self->priv->image = Exiv2::ImageFactory::open (path);
data/gexiv2-0.12.1/gexiv2/gexiv2-metadata.cpp:398:50:  [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).
        self->priv->image = Exiv2::ImageFactory::open (data, n_data);
data/gexiv2-0.12.1/gexiv2/gexiv2-metadata.cpp:414:50:  [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).
        self->priv->image = Exiv2::ImageFactory::open (std::move(stream_ptr));
data/gexiv2-0.12.1/gexiv2/gexiv2-metadata.cpp:416:50:  [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).
        self->priv->image = Exiv2::ImageFactory::open (stream_ptr);
data/gexiv2-0.12.1/gexiv2/gexiv2-metadata.cpp:433:50:  [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).
        self->priv->image = Exiv2::ImageFactory::open (std::move(gio_ptr));
data/gexiv2-0.12.1/gexiv2/gexiv2-metadata.cpp:435:50:  [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).
        self->priv->image = Exiv2::ImageFactory::open (gio_ptr);
data/gexiv2-0.12.1/gexiv2/gexiv2-metadata.cpp:567:74:  [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).
        return gexiv2_metadata_save_internal (self, Exiv2::ImageFactory::open (path), error);
data/gexiv2-0.12.1/gexiv2/gexiv2-metadata.cpp:582:74:  [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).
        return gexiv2_metadata_save_internal (self, Exiv2::ImageFactory::open (std::move(stream_ptr)), error);
data/gexiv2-0.12.1/gexiv2/gexiv2-metadata.cpp:584:74:  [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).
        return gexiv2_metadata_save_internal (self, Exiv2::ImageFactory::open (stream_ptr), error);
data/gexiv2-0.12.1/gexiv2/gexiv2-metadata.cpp:1077: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, data.pData_, data.size_);
data/gexiv2-0.12.1/gexiv2/gexiv2-stream-io.cpp:108: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).
    open ();
data/gexiv2-0.12.1/gexiv2/gexiv2-stream-io.cpp:110:9:  [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).
    src.open ();
data/gexiv2-0.12.1/gexiv2/gexiv2-stream-io.cpp:149:15:  [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 StreamIo::open () {
data/gexiv2-0.12.1/gexiv2/gexiv2-stream-io.h:36:14:  [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).
	virtual int open ();
data/gexiv2-0.12.1/test/gexiv2-regression.c:299:20:  [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 main(int argc, char *argv[static argc + 1])
data/gexiv2-0.12.1/gexiv2/gexiv2-metadata-iptc.cpp:227:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            iptc_value->read (static_cast<const std::string>(*it));
data/gexiv2-0.12.1/gexiv2/gexiv2-metadata-xmp.cpp:185:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        tv.read("");  // Clear the value
data/gexiv2-0.12.1/gexiv2/gexiv2-metadata-xmp.cpp:189:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        tv.read("");
data/gexiv2-0.12.1/gexiv2/gexiv2-metadata-xmp.cpp:193:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        tv.read("");
data/gexiv2-0.12.1/gexiv2/gexiv2-metadata-xmp.cpp:197:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        tv.read("");
data/gexiv2-0.12.1/gexiv2/gexiv2-metadata.cpp:90:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    Exiv2::DataBuf read(size_t rcount) noexcept {
data/gexiv2-0.12.1/gexiv2/gexiv2-metadata.cpp:92:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    Exiv2::DataBuf read(long rcount) override {
data/gexiv2-0.12.1/gexiv2/gexiv2-metadata.cpp:96:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        auto bytes_read = this->read(b.pData_, rcount);
data/gexiv2-0.12.1/gexiv2/gexiv2-metadata.cpp:104:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    size_type read(Exiv2::byte *buf, size_type rcount) {
data/gexiv2-0.12.1/gexiv2/gexiv2-metadata.cpp:133:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        return this->read (&b, 1) == 1 ? b : EOF;
data/gexiv2-0.12.1/gexiv2/gexiv2-preview-image.cpp:97:42:  [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).
    g_return_val_if_fail(path != NULL && strlen(path) > 0, -1);
data/gexiv2-0.12.1/gexiv2/gexiv2-stream-io.cpp:98:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while ((read_count = src.read (buffer, sizeof(buffer)))) {
data/gexiv2-0.12.1/gexiv2/gexiv2-stream-io.cpp:168:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
Exiv2::DataBuf StreamIo::read (size_t read_count) noexcept {
data/gexiv2-0.12.1/gexiv2/gexiv2-stream-io.cpp:171:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    long read_bytes = read (buffer.pData_, buffer.size_);
data/gexiv2-0.12.1/gexiv2/gexiv2-stream-io.cpp:178:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
Exiv2::DataBuf StreamIo::read (long read_count) {
data/gexiv2-0.12.1/gexiv2/gexiv2-stream-io.cpp:181:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    long read_bytes = read (buffer.pData_, buffer.size_);
data/gexiv2-0.12.1/gexiv2/gexiv2-stream-io.cpp:189:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
StreamIo::size_type StreamIo::read (Exiv2::byte* buf, StreamIo::size_type read_count) {
data/gexiv2-0.12.1/gexiv2/gexiv2-stream-io.cpp:209:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    StreamIo::read (&b, 1);
data/gexiv2-0.12.1/gexiv2/gexiv2-stream-io.h:42:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	Exiv2::DataBuf read (size_t rcount) noexcept override;
data/gexiv2-0.12.1/gexiv2/gexiv2-stream-io.h:44:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	Exiv2::DataBuf read (long rcount) override;
data/gexiv2-0.12.1/gexiv2/gexiv2-stream-io.h:46:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	virtual size_type read (Exiv2::byte* buf, size_type rcount);

ANALYSIS SUMMARY:

Hits = 37
Lines analyzed = 5397 in approximately 0.28 seconds (19505 lines/second)
Physical Source Lines of Code (SLOC) = 2932
Hits@level = [0]   2 [1]  21 [2]  16 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  39 [1+]  37 [2+]  16 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 13.3015 [1+] 12.6194 [2+] 5.45703 [3+]   0 [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.