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/libopenraw-0.1.2/include/libopenraw/cfapattern.h
Examining data/libopenraw-0.1.2/include/libopenraw/io.h
Examining data/libopenraw-0.1.2/include/libopenraw/rawdata.h
Examining data/libopenraw-0.1.2/include/libopenraw/exif.h
Examining data/libopenraw-0.1.2/include/libopenraw/cameraids.h
Examining data/libopenraw-0.1.2/include/libopenraw/types.h
Examining data/libopenraw-0.1.2/include/libopenraw/libopenraw.h
Examining data/libopenraw-0.1.2/include/libopenraw/consts.h
Examining data/libopenraw-0.1.2/include/libopenraw/thumbnails.h
Examining data/libopenraw-0.1.2/include/libopenraw/rawfile.h
Examining data/libopenraw-0.1.2/include/libopenraw/prefix.h
Examining data/libopenraw-0.1.2/include/libopenraw/metadata.h
Examining data/libopenraw-0.1.2/include/libopenraw/demosaic.h
Examining data/libopenraw-0.1.2/include/libopenraw/bitmapdata.h
Examining data/libopenraw-0.1.2/include/libopenraw/debug.h
Examining data/libopenraw-0.1.2/gnome/include/libopenraw-gnome/gdkpixbuf.h
Examining data/libopenraw-0.1.2/gnome/gdkpixbuf.c
Examining data/libopenraw-0.1.2/gnome/pixbuf-loader.c
Examining data/libopenraw-0.1.2/testsuite/testsuitetags.h
Examining data/libopenraw-0.1.2/testsuite/xmlhandler.cpp
Examining data/libopenraw-0.1.2/testsuite/testsuite.h
Examining data/libopenraw-0.1.2/testsuite/testsuitehandler.h
Examining data/libopenraw-0.1.2/testsuite/xmlhandler.h
Examining data/libopenraw-0.1.2/testsuite/testsuitetags.cpp
Examining data/libopenraw-0.1.2/testsuite/testsuitehandler.cpp
Examining data/libopenraw-0.1.2/testsuite/testsuite.cpp
Examining data/libopenraw-0.1.2/testsuite/test_xmlhandler.cpp
Examining data/libopenraw-0.1.2/demo/cfa.cpp
Examining data/libopenraw-0.1.2/demo/ppmload.c
Examining data/libopenraw-0.1.2/demo/gdk.c
Examining data/libopenraw-0.1.2/demo/extensions.cpp
Examining data/libopenraw-0.1.2/demo/pixbufload.c
Examining data/libopenraw-0.1.2/demo/thumb.cpp
Examining data/libopenraw-0.1.2/demo/ccfa.c
Examining data/libopenraw-0.1.2/demo/thumbc.c
Examining data/libopenraw-0.1.2/lib/orffile.hpp
Examining data/libopenraw-0.1.2/lib/arwfile.cpp
Examining data/libopenraw-0.1.2/lib/ljpegdecompressor_priv.hpp
Examining data/libopenraw-0.1.2/lib/ifdentry.hpp
Examining data/libopenraw-0.1.2/lib/jfifcontainer.hpp
Examining data/libopenraw-0.1.2/lib/peffile.cpp
Examining data/libopenraw-0.1.2/lib/olympusdecompressor.hpp
Examining data/libopenraw-0.1.2/lib/raffile.hpp
Examining data/libopenraw-0.1.2/lib/mrwcontainer.cpp
Examining data/libopenraw-0.1.2/lib/rafmetacontainer.hpp
Examining data/libopenraw-0.1.2/lib/crwdecompressor.hpp
Examining data/libopenraw-0.1.2/lib/erffile.hpp
Examining data/libopenraw-0.1.2/lib/rawcontainer.hpp
Examining data/libopenraw-0.1.2/lib/mrwfile.hpp
Examining data/libopenraw-0.1.2/lib/dngfile.cpp
Examining data/libopenraw-0.1.2/lib/xtranspattern.cpp
Examining data/libopenraw-0.1.2/lib/erffile.cpp
Examining data/libopenraw-0.1.2/lib/peffile.hpp
Examining data/libopenraw-0.1.2/lib/makernotedir.hpp
Examining data/libopenraw-0.1.2/lib/nefcfaiterator.hpp
Examining data/libopenraw-0.1.2/lib/rawfile.cpp
Examining data/libopenraw-0.1.2/lib/rawfile_private.hpp
Examining data/libopenraw-0.1.2/lib/dngfile.hpp
Examining data/libopenraw-0.1.2/lib/ifddir.hpp
Examining data/libopenraw-0.1.2/lib/ifdentry.cpp
Examining data/libopenraw-0.1.2/lib/mrwcontainer.hpp
Examining data/libopenraw-0.1.2/lib/ifdfile.cpp
Examining data/libopenraw-0.1.2/lib/nefdiffiterator.cpp
Examining data/libopenraw-0.1.2/lib/trace.cpp
Examining data/libopenraw-0.1.2/lib/rw2container.cpp
Examining data/libopenraw-0.1.2/lib/exception.hpp
Examining data/libopenraw-0.1.2/lib/bititerator.hpp
Examining data/libopenraw-0.1.2/lib/bitmapdata.cpp
Examining data/libopenraw-0.1.2/lib/ifd.hpp
Examining data/libopenraw-0.1.2/lib/ifdfilecontainer.hpp
Examining data/libopenraw-0.1.2/lib/olympusdecompressor.cpp
Examining data/libopenraw-0.1.2/lib/arwfile.hpp
Examining data/libopenraw-0.1.2/lib/tiffepfile.hpp
Examining data/libopenraw-0.1.2/lib/neffile.cpp
Examining data/libopenraw-0.1.2/lib/orfcontainer.cpp
Examining data/libopenraw-0.1.2/lib/rawfilefactory.cpp
Examining data/libopenraw-0.1.2/lib/bititerator.cpp
Examining data/libopenraw-0.1.2/lib/io/teststream.cpp
Examining data/libopenraw-0.1.2/lib/io/stream.cpp
Examining data/libopenraw-0.1.2/lib/io/file.hpp
Examining data/libopenraw-0.1.2/lib/io/memstream.cpp
Examining data/libopenraw-0.1.2/lib/io/streamclone.hpp
Examining data/libopenraw-0.1.2/lib/io/posix_io.h
Examining data/libopenraw-0.1.2/lib/io/memstream.hpp
Examining data/libopenraw-0.1.2/lib/io/streamclone.cpp
Examining data/libopenraw-0.1.2/lib/io/io.c
Examining data/libopenraw-0.1.2/lib/io/io_private.h
Examining data/libopenraw-0.1.2/lib/io/posix_io.c
Examining data/libopenraw-0.1.2/lib/io/file.cpp
Examining data/libopenraw-0.1.2/lib/io/stream.hpp
Examining data/libopenraw-0.1.2/lib/ciffcontainer.cpp
Examining data/libopenraw-0.1.2/lib/cr2file.hpp
Examining data/libopenraw-0.1.2/lib/cr2file.cpp
Examining data/libopenraw-0.1.2/lib/ifdfilecontainer.cpp
Examining data/libopenraw-0.1.2/lib/rw2file.cpp
Examining data/libopenraw-0.1.2/lib/rawdata.hpp
Examining data/libopenraw-0.1.2/lib/thumbnail.cpp
Examining data/libopenraw-0.1.2/lib/ifddir.cpp
Examining data/libopenraw-0.1.2/lib/ifdfile.hpp
Examining data/libopenraw-0.1.2/lib/rafcontainer.hpp
Examining data/libopenraw-0.1.2/lib/orffile.cpp
Examining data/libopenraw-0.1.2/lib/unpack.cpp
Examining data/libopenraw-0.1.2/lib/capi/capi.cpp
Examining data/libopenraw-0.1.2/lib/capi/rawfile.cpp
Examining data/libopenraw-0.1.2/lib/capi/bitmapdata.cpp
Examining data/libopenraw-0.1.2/lib/capi/metadata.cpp
Examining data/libopenraw-0.1.2/lib/capi/debug.cpp
Examining data/libopenraw-0.1.2/lib/capi/cfapattern.cpp
Examining data/libopenraw-0.1.2/lib/capi/rawdata.cpp
Examining data/libopenraw-0.1.2/lib/huffman.hpp
Examining data/libopenraw-0.1.2/lib/rawfile.hpp
Examining data/libopenraw-0.1.2/lib/thumbnail.hpp
Examining data/libopenraw-0.1.2/lib/tiffepfile.cpp
Examining data/libopenraw-0.1.2/lib/rw2file.hpp
Examining data/libopenraw-0.1.2/lib/metavalue.hpp
Examining data/libopenraw-0.1.2/lib/makernotedir.cpp
Examining data/libopenraw-0.1.2/lib/ljpegdecompressor.cpp
Examining data/libopenraw-0.1.2/lib/ljpegdecompressor.hpp
Examining data/libopenraw-0.1.2/lib/orfcontainer.hpp
Examining data/libopenraw-0.1.2/lib/bitmapdata.hpp
Examining data/libopenraw-0.1.2/lib/huffman.cpp
Examining data/libopenraw-0.1.2/lib/rafcontainer.cpp
Examining data/libopenraw-0.1.2/lib/mrwfile.cpp
Examining data/libopenraw-0.1.2/lib/trace.hpp
Examining data/libopenraw-0.1.2/lib/decompressor.cpp
Examining data/libopenraw-0.1.2/lib/neffile.hpp
Examining data/libopenraw-0.1.2/lib/cfapattern.cpp
Examining data/libopenraw-0.1.2/lib/rw2container.hpp
Examining data/libopenraw-0.1.2/lib/rafmetacontainer.cpp
Examining data/libopenraw-0.1.2/lib/rawcontainer.cpp
Examining data/libopenraw-0.1.2/lib/option.hpp
Examining data/libopenraw-0.1.2/lib/metavalue.cpp
Examining data/libopenraw-0.1.2/lib/nefdiffiterator.hpp
Examining data/libopenraw-0.1.2/lib/unpack.hpp
Examining data/libopenraw-0.1.2/lib/xtranspattern.hpp
Examining data/libopenraw-0.1.2/lib/nefcfaiterator.cpp
Examining data/libopenraw-0.1.2/lib/render/grayscale.hpp
Examining data/libopenraw-0.1.2/lib/render/bimedian_demosaic.cpp
Examining data/libopenraw-0.1.2/lib/render/grayscale.cpp
Examining data/libopenraw-0.1.2/lib/render/bimedian_demosaic.hpp
Examining data/libopenraw-0.1.2/lib/raffile.cpp
Examining data/libopenraw-0.1.2/lib/cfapattern.hpp
Examining data/libopenraw-0.1.2/lib/rawdata.cpp
Examining data/libopenraw-0.1.2/lib/endianutils.hpp
Examining data/libopenraw-0.1.2/lib/ciffcontainer.hpp
Examining data/libopenraw-0.1.2/lib/crwfile.hpp
Examining data/libopenraw-0.1.2/lib/jfifcontainer.cpp
Examining data/libopenraw-0.1.2/lib/crwfile.cpp
Examining data/libopenraw-0.1.2/lib/decompressor.hpp
Examining data/libopenraw-0.1.2/lib/crwdecompressor.cpp
Examining data/libopenraw-0.1.2/lib/rawfilefactory.hpp
Examining data/libopenraw-0.1.2/test/option.t.cpp
Examining data/libopenraw-0.1.2/test/extensions.cpp
Examining data/libopenraw-0.1.2/test/testunpack.cpp
Examining data/libopenraw-0.1.2/test/ciffcontainertest.cpp
Examining data/libopenraw-0.1.2/test/ljpegtest.cpp
Examining data/libopenraw-0.1.2/test/fileio.t.c
Examining data/libopenraw-0.1.2/tools/ordiag.cpp

FINAL RESULTS:

data/libopenraw-0.1.2/lib/trace.cpp:43:3:  [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, marker);
data/libopenraw-0.1.2/lib/trace.hpp:38:29:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__ ((format (printf, 2, 3)));
data/libopenraw-0.1.2/demo/ccfa.c:49:13:  [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.
        c = getopt(argc, argv, "r");
data/libopenraw-0.1.2/demo/cfa.cpp:48:13:  [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.
        c = getopt(argc, argv, "r");
data/libopenraw-0.1.2/demo/thumbc.c:46:19:  [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 ((opt = getopt(argc, argv, "s:")) != -1) {
data/libopenraw-0.1.2/lib/io/teststream.cpp:43:31:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        const char * srcdir = getenv("srcdir");
data/libopenraw-0.1.2/test/ljpegtest.cpp:44:25:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		const char * srcdir = getenv("srcdir");
data/libopenraw-0.1.2/testsuite/test_xmlhandler.cpp:86:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	const char * pdir = getenv("srcdir");
data/libopenraw-0.1.2/testsuite/testsuite.cpp:1037:27:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const char * srcdir = getenv("srcdir");
data/libopenraw-0.1.2/testsuite/testsuite.cpp:1043:19:  [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 ((opt = getopt(argc, argv, "bd:")) != -1) {
data/libopenraw-0.1.2/tools/ordiag.cpp:469:16:  [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((o = getopt(argc, argv, "hvdt:")) != -1) {
data/libopenraw-0.1.2/demo/ccfa.c:70:13:  [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).
        f = fopen("image.pgm", "wb");
data/libopenraw-0.1.2/demo/ccfa.c:76:13:  [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).
        f = fopen("image.cfa", "wb");
data/libopenraw-0.1.2/demo/cfa.cpp:74:13:  [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).
        f = fopen("image.pgm", "wb");
data/libopenraw-0.1.2/demo/cfa.cpp:80:13:  [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).
        f = fopen("image.cfa", "wb");
data/libopenraw-0.1.2/demo/ppmload.c:69:21:  [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).
                f = fopen("image.ppm", "wb");
data/libopenraw-0.1.2/demo/thumb.cpp:58:9:  [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).
    f = fopen(filename.c_str(), "wb");
data/libopenraw-0.1.2/demo/thumbc.c:49:26:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            thumb_size = atoi(optarg);
data/libopenraw-0.1.2/demo/thumbc.c:96: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).
    output = fopen(outfname, "wb");
data/libopenraw-0.1.2/gnome/gdkpixbuf.c:107:3:  [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(data, buf, buf_size);
data/libopenraw-0.1.2/gnome/pixbuf-loader.c:112:13:  [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 orientation_str[16];
data/libopenraw-0.1.2/include/libopenraw/io.h:42: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).
	IOFileRef (*open)(const char *path, int mode);
data/libopenraw-0.1.2/lib/ciffcontainer.hpp:224: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       byteOrder[2];/* 'MM' for Motorola,'II' for Intel */
data/libopenraw-0.1.2/lib/ciffcontainer.hpp:226: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       type[4];
data/libopenraw-0.1.2/lib/ciffcontainer.hpp:227: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       subType[4];
data/libopenraw-0.1.2/lib/cr2file.cpp:486:10:  [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).
      s->open(); // TODO check success
data/libopenraw-0.1.2/lib/crwdecompressor.cpp:347: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(rawbuf, outbuf, 2 * 64);
data/libopenraw-0.1.2/lib/crwfile.cpp:245:16:  [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).
            s->open(); // TODO check success
data/libopenraw-0.1.2/lib/crwfile.cpp:305:21:  [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[256];
data/libopenraw-0.1.2/lib/dngfile.cpp:178:16:  [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).
            s->open(); // TODO check success
data/libopenraw-0.1.2/lib/ifdfilecontainer.cpp:146: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/libopenraw-0.1.2/lib/io/file.cpp:47:21:  [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).
		File::Error File::open()
data/libopenraw-0.1.2/lib/io/file.hpp:49:19:  [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 Error open() override;
data/libopenraw-0.1.2/lib/io/io.c:54:18:  [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 methods->open(path, mode);
data/libopenraw-0.1.2/lib/io/memstream.cpp:44:21:  [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).
or_error MemStream::open()
data/libopenraw-0.1.2/lib/io/memstream.cpp:100:3:  [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(buf, m_current, count);
data/libopenraw-0.1.2/lib/io/memstream.hpp:47:20:  [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 or_error open() override;
data/libopenraw-0.1.2/lib/io/posix_io.c:74:13:  [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).
	data->fd = open(path, mode);
data/libopenraw-0.1.2/lib/io/stream.hpp:58:17:  [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 Error open() = 0;
data/libopenraw-0.1.2/lib/io/streamclone.cpp:48:28:  [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).
Stream::Error StreamClone::open()
data/libopenraw-0.1.2/lib/io/streamclone.hpp:46:17:  [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 Error open() override;
data/libopenraw-0.1.2/lib/io/teststream.cpp:53: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 buf1[128];
data/libopenraw-0.1.2/lib/io/teststream.cpp:54:21:  [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 ret = file->open();
data/libopenraw-0.1.2/lib/io/teststream.cpp:69:18:  [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).
    ret = clone->open();
data/libopenraw-0.1.2/lib/io/teststream.cpp:74: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 buf2[128];
data/libopenraw-0.1.2/lib/jfifcontainer.cpp:151: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(currentPtr, buffer, row_size);
data/libopenraw-0.1.2/lib/jfifcontainer.cpp:238: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 delim[7];
data/libopenraw-0.1.2/lib/ljpegdecompressor.cpp:169: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 huffsize[257];
data/libopenraw-0.1.2/lib/ljpegdecompressor_priv.hpp:85: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 ehufsi[256];
data/libopenraw-0.1.2/lib/makernotedir.cpp:43: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[18];
data/libopenraw-0.1.2/lib/mrwcontainer.cpp:85: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 buf[9];
data/libopenraw-0.1.2/lib/mrwcontainer.cpp:128: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 version[9];
data/libopenraw-0.1.2/lib/mrwcontainer.hpp:71: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 id[4];
data/libopenraw-0.1.2/lib/mrwcontainer.hpp:104: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 m_name[4];
data/libopenraw-0.1.2/lib/mrwfile.cpp:210:16:  [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 *)p)[0] = 0xFF;
data/libopenraw-0.1.2/lib/olympusdecompressor.cpp:49: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 bittable[4096];
data/libopenraw-0.1.2/lib/rafcontainer.cpp:110: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 magic[29];
data/libopenraw-0.1.2/lib/rafcontainer.cpp:111: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 model[33];
data/libopenraw-0.1.2/lib/rawcontainer.cpp:42:11:  [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).
  m_file->open();
data/libopenraw-0.1.2/lib/rawcontainer.cpp:89: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 buf[2];
data/libopenraw-0.1.2/lib/rawcontainer.cpp:144: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 buf[4];
data/libopenraw-0.1.2/lib/rawcontainer.cpp:168: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 buf[2];
data/libopenraw-0.1.2/lib/rawcontainer.cpp:189: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 buf[4];
data/libopenraw-0.1.2/test/fileio.t.c:32: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 buf[128];
data/libopenraw-0.1.2/testsuite/testsuite.cpp:223:24:  [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).
    ::or_error err = f.open();
data/libopenraw-0.1.2/testsuite/testsuite.cpp:877:18:  [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(dest.c_str(), "wb");
data/libopenraw-0.1.2/tools/ordiag.cpp:225:17:  [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).
            f = fopen(name.c_str(), "wb");
data/libopenraw-0.1.2/include/libopenraw/io.h:48:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int (*read) (IOFileRef f, void *buf, size_t count);
data/libopenraw-0.1.2/lib/ciffcontainer.cpp:194:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int s = file->read(byteOrder, 2);
data/libopenraw-0.1.2/lib/ciffcontainer.cpp:209:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            ret = (file->read(type, 4) == 4);
data/libopenraw-0.1.2/lib/ciffcontainer.cpp:212:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            ret = (file->read(subType, 4) == 4);
data/libopenraw-0.1.2/lib/crwdecompressor.cpp:251:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    s->read (test, sizeof(test));
data/libopenraw-0.1.2/lib/ifddir.cpp:75:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        size_t sz = file->read(&data, 4);
data/libopenraw-0.1.2/lib/ifdfilecontainer.cpp:148:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        m_file->read(buf, 4);
data/libopenraw-0.1.2/lib/io/file.cpp:68:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		int File::read(void *buf, size_t count)
data/libopenraw-0.1.2/lib/io/file.hpp:55:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    virtual int read(void *buf, size_t count) override;
data/libopenraw-0.1.2/lib/io/io.c:100:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return f->methods->read(f, buf, count);
data/libopenraw-0.1.2/lib/io/memstream.cpp:88:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int MemStream::read(void *buf, size_t count)
data/libopenraw-0.1.2/lib/io/memstream.hpp:50:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  virtual int read(void *buf, size_t count) override;
data/libopenraw-0.1.2/lib/io/posix_io.c:123:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	retval = read(data->fd, buf, count);
data/libopenraw-0.1.2/lib/io/stream.cpp:43:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int r = read(&theByte, 1);
data/libopenraw-0.1.2/lib/io/stream.hpp:64:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  virtual int read(void *buf, size_t count) = 0;
data/libopenraw-0.1.2/lib/io/streamclone.cpp:83:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int StreamClone::read(void *buf, size_t count)
data/libopenraw-0.1.2/lib/io/streamclone.cpp:89:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return m_cloned->read(buf, count);
data/libopenraw-0.1.2/lib/io/streamclone.hpp:49:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  virtual int read(void *buf, size_t count) override;
data/libopenraw-0.1.2/lib/io/teststream.cpp:57:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    size_t r = file->read(buf1, 6);
data/libopenraw-0.1.2/lib/io/teststream.cpp:75:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    r = clone->read(buf2, 4);
data/libopenraw-0.1.2/lib/jfifcontainer.cpp:194:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int n = self->file()->read(src->buf, BUF_SIZE * sizeof(*src->buf));
data/libopenraw-0.1.2/lib/jfifcontainer.cpp:240:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    m_file->read(delim, 6);
data/libopenraw-0.1.2/lib/makernotedir.cpp:46:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    file->read(&data, 18);
data/libopenraw-0.1.2/lib/rafcontainer.cpp:116:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	m_file->read(magic, 28);
data/libopenraw-0.1.2/lib/rafcontainer.cpp:125:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	m_file->read(model, 32);
data/libopenraw-0.1.2/lib/rafmetacontainer.cpp:107:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			m_file->read(content, size);
data/libopenraw-0.1.2/lib/rawcontainer.cpp:62:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int s = f->read(&buf, 1);
data/libopenraw-0.1.2/lib/rawcontainer.cpp:73:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int s = f->read(&buf, 1);
data/libopenraw-0.1.2/lib/rawcontainer.cpp:90:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int s = f->read(buf, 2);
data/libopenraw-0.1.2/lib/rawcontainer.cpp:119:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int s = f->read(buf, 2);
data/libopenraw-0.1.2/lib/rawcontainer.cpp:145:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int s = f->read(buf, 4);
data/libopenraw-0.1.2/lib/rawcontainer.cpp:169:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int s = f->read(buf, 2);
data/libopenraw-0.1.2/lib/rawcontainer.cpp:190:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int s = f->read(buf, 4);
data/libopenraw-0.1.2/lib/rawcontainer.cpp:208:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  s = m_file->read(buf, buf_size);
data/libopenraw-0.1.2/testsuite/testsuite.cpp:200:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    return equal;
data/libopenraw-0.1.2/testsuite/testsuite.cpp:230:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int res = f.read(buff.get(), len);
data/libopenraw-0.1.2/testsuite/testsuite.cpp:328:22:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    RETURN_TEST(std::equal(thumbs.cbegin(), thumbs.cend(), v2.cbegin()), result);

ANALYSIS SUMMARY:

Hits = 104
Lines analyzed = 24686 in approximately 0.62 seconds (39784 lines/second)
Physical Source Lines of Code (SLOC) = 15829
Hits@level = [0]  71 [1]  37 [2]  56 [3]   9 [4]   2 [5]   0
Hits@level+ = [0+] 175 [1+] 104 [2+]  67 [3+]  11 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 11.0557 [1+] 6.57022 [2+] 4.23274 [3+] 0.694927 [4+] 0.12635 [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.