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/ismrmrd-1.4.2.1/examples/c/main.c
Examining data/ismrmrd-1.4.2.1/include/ismrmrd/dataset.h
Examining data/ismrmrd-1.4.2.1/include/ismrmrd/export.h
Examining data/ismrmrd-1.4.2.1/include/ismrmrd/ismrmrd.h
Examining data/ismrmrd-1.4.2.1/include/ismrmrd/meta.h
Examining data/ismrmrd-1.4.2.1/include/ismrmrd/waveform.h
Examining data/ismrmrd-1.4.2.1/include/ismrmrd/xml.h
Examining data/ismrmrd-1.4.2.1/libsrc/dataset.c
Examining data/ismrmrd-1.4.2.1/libsrc/dataset.cpp
Examining data/ismrmrd-1.4.2.1/libsrc/ismrmrd.c
Examining data/ismrmrd-1.4.2.1/libsrc/ismrmrd.cpp
Examining data/ismrmrd-1.4.2.1/libsrc/meta.cpp
Examining data/ismrmrd-1.4.2.1/libsrc/pugiconfig.hpp
Examining data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp
Examining data/ismrmrd-1.4.2.1/libsrc/pugixml.hpp
Examining data/ismrmrd-1.4.2.1/libsrc/waveform.c
Examining data/ismrmrd-1.4.2.1/libsrc/waveform.cpp
Examining data/ismrmrd-1.4.2.1/libsrc/xml.cpp
Examining data/ismrmrd-1.4.2.1/tests/test_acquisitions.cpp
Examining data/ismrmrd-1.4.2.1/tests/test_flags.cpp
Examining data/ismrmrd-1.4.2.1/tests/test_images.cpp
Examining data/ismrmrd-1.4.2.1/tests/test_ismrmrd.h
Examining data/ismrmrd-1.4.2.1/tests/test_main.cpp
Examining data/ismrmrd-1.4.2.1/tests/test_ndarray.cpp
Examining data/ismrmrd-1.4.2.1/tests/test_quaternions.cpp
Examining data/ismrmrd-1.4.2.1/tests/test_channels.cpp
Examining data/ismrmrd-1.4.2.1/utilities/generate_cartesian_shepp_logan.cpp
Examining data/ismrmrd-1.4.2.1/utilities/ismrmrd_fftw.h
Examining data/ismrmrd-1.4.2.1/utilities/ismrmrd_info.cpp
Examining data/ismrmrd-1.4.2.1/utilities/ismrmrd_phantom.cpp
Examining data/ismrmrd-1.4.2.1/utilities/ismrmrd_phantom.h
Examining data/ismrmrd-1.4.2.1/utilities/ismrmrd_test_xml.cpp
Examining data/ismrmrd-1.4.2.1/utilities/read_timing_test.cpp
Examining data/ismrmrd-1.4.2.1/utilities/recon_cartesian_2d.cpp

FINAL RESULTS:

data/ismrmrd-1.4.2.1/libsrc/dataset.c:94:5:  [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(path, dset->groupname);
data/ismrmrd-1.4.2.1/libsrc/dataset.c:96:5:  [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(path, var);
data/ismrmrd-1.4.2.1/libsrc/dataset.c:126:5:  [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(newpath, path);
data/ismrmrd-1.4.2.1/libsrc/dataset.c:128:5:  [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(newpath, var);
data/ismrmrd-1.4.2.1/libsrc/dataset.c:932:5:  [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(dset->filename, filename);
data/ismrmrd-1.4.2.1/libsrc/dataset.c:938:5:  [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(dset->groupname, groupname);
data/ismrmrd-1.4.2.1/examples/c/main.c:152: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(im.attribute_string, attr_string, im.head.attribute_string_len);
data/ismrmrd-1.4.2.1/libsrc/dataset.c:767:68:  [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 int get_array_properties(const ISMRMRD_Dataset *dset, const char *path,
data/ismrmrd-1.4.2.1/libsrc/dataset.c:1220: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(&acq->head, &hdf5acq.head, sizeof(ISMRMRD_AcquisitionHeader));
data/ismrmrd-1.4.2.1/libsrc/dataset.c:1222: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(acq->traj, hdf5acq.traj.p, ismrmrd_size_of_acquisition_traj(acq));
data/ismrmrd-1.4.2.1/libsrc/dataset.c:1223: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(acq->data, hdf5acq.data.p, ismrmrd_size_of_acquisition_data(acq));
data/ismrmrd-1.4.2.1/libsrc/dataset.c:1383: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(im->attribute_string, attr_string, ismrmrd_size_of_image_attribute_string(im));
data/ismrmrd-1.4.2.1/libsrc/dataset.c:1470: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(&wav->head, &hdf5wav.head, sizeof(ISMRMRD_WaveformHeader));
data/ismrmrd-1.4.2.1/libsrc/dataset.c:1472: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(wav->data, hdf5wav.data.p, ismrmrd_size_of_waveform_data(wav));
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.c:113: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(&acqdest->head, &acqsource->head, sizeof(ISMRMRD_AcquisitionHeader));
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.c:117: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(acqdest->traj, acqsource->traj, ismrmrd_size_of_acquisition_traj(acqsource));
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.c:118: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(acqdest->data, acqsource->data, ismrmrd_size_of_acquisition_data(acqsource));
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.c:255: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(&imdest->head, &imsource->head, sizeof(ISMRMRD_ImageHeader));
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.c:259: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(imdest->attribute_string, imsource->attribute_string,
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.c:261: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(imdest->data, imsource->data, ismrmrd_size_of_image_data(imdest));
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.c:399: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(arrdest->data, arrsource->data, ismrmrd_size_of_ndarray_data(arrdest));
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.cpp:273: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(&acq.head, &other, sizeof(AcquisitionHeader));
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.cpp:297: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(acq.data,data,this->getNumberOfDataElements()*sizeof(complex_float_t));
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.cpp:314:8:  [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(acq.traj,traj,this->getNumberOfTrajElements()*sizeof(float));
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.cpp:959: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(&im.head, &other, sizeof(ImageHeader));
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:88: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.
#define PUGI__STATIC_ASSERT(cond) { static const char condition_failed[(cond) ? 1 : -1] = {0}; (void)condition_failed[0]; }
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:99:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
using std::memcpy;
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:298:3:  [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[1];
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:1056:24:  [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 unsigned char chartype_table[256] =
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:1086:24:  [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 unsigned char chartypex_table[256] =
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:1197:4:  [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, contents, length * sizeof(char_t));
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:1466: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(buffer, data, prefix_length);
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:1609:4:  [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, source, (source_length + 1) * sizeof(char_t));
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:1622:4:  [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, source, (source_length + 1) * sizeof(char_t));
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:3019:4:  [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 + bufsize, data, length * sizeof(char_t));
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:3551:3:  [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/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:3552:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buf, "%d", value);
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:3559:3:  [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/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:3560:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buf, "%u", value);
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:3567:3:  [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/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:3568:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buf, "%g", value);
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:3581:3:  [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/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:3582:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buf, "%lld", value);
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:3589:3:  [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/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:3590:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buf, "%llu", value);
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:3774:4:  [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(write, chunk->data, chunk->size);
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:3880:3:  [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 mode_ascii[4] = {0};
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:3884: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).
		FILE* result = fopen(path_utf8, mode_ascii);
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:5653:16:  [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* file = fopen(path_, "rb");
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:5732:16:  [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* file = fopen(path_, (flags & format_save_file_text) ? "w" : "wb");
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:6073:3:  [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[
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:6169: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(result, ptr, old_size);
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:6290:4:  [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(result, string, length * sizeof(char_t));
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:6350:22:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				if (!_uses_heap) memcpy(result, _buffer, target_length * sizeof(char_t));
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:6353: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(result + target_length, o._buffer, source_length * sizeof(char_t));
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:6721:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buffer, "%.*e", DBL_DIG, value);
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:6729:18:  [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).
		int exponent = atoi(exponent_string + 1);
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:6756:3:  [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 mantissa_buffer[32];
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:6872: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(scratch, begin, length * sizeof(char_t));
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:7096: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(result->name, name, (length + 1) * sizeof(char_t));
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:7166: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(scratch, begin, length * sizeof(char_t));
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:7295:4:  [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(_end, begin_, count * sizeof(xpath_node));
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:9192: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(c, value.begin, length * sizeof(char_t));
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:10127:4:  [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(storage, begin_, size_ * sizeof(xpath_node));
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:10302: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(copy, value, size);
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:10500:4:  [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, r.c_str(), (size - 1) * sizeof(char_t));
data/ismrmrd-1.4.2.1/libsrc/pugixml.hpp:923:3:  [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 _memory[192];
data/ismrmrd-1.4.2.1/libsrc/waveform.c:84: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->head, &src->head, sizeof(ISMRMRD_WaveformHeader));
data/ismrmrd-1.4.2.1/libsrc/waveform.c:87: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->data, src->data, ismrmrd_size_of_waveform_data(src));
data/ismrmrd-1.4.2.1/libsrc/waveform.cpp:53: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(this->data, other.data, other.size() * sizeof(uint32_t));
data/ismrmrd-1.4.2.1/libsrc/waveform.cpp:90: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(this->data, other.data, other.size() * sizeof(uint32_t));
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:19:29:  [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).
      e.matrixSize.x = std::atoi(matrixSize.child_value("x"));
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:20:29:  [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).
      e.matrixSize.y = std::atoi(matrixSize.child_value("y"));
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:21:29:  [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).
      e.matrixSize.z = std::atoi(matrixSize.child_value("z"));
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:42:24:  [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).
      l.minimum = std::atoi(nc.child_value("minimum"));
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:43:24:  [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).
      l.maximum = std::atoi(nc.child_value("maximum"));
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:44:23:  [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).
      l.center = std::atoi(nc.child_value("center"));
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:80:16:  [2] (integer) atol:
  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).
      r = std::atol(nc.child_value());
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:89:44:  [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).
      r = static_cast<unsigned short>(std::atoi(nc.child_value()));
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:135:22:  [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).
      v.value = std::atoi(value.child_value());
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:157:7:  [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[10000];
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:158:7:  [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,name.child_value(),strlen(name.child_value())+1);
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:261:35:  [2] (integer) atol:
  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).
	e.H1resonanceFrequency_Hz = std::atol(experimentalConditions.child_value("H1resonanceFrequency_Hz"));
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:331:90:  [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).
	      info.accelerationFactor.kspace_encoding_step_1 = static_cast<unsigned short>(std::atoi(accelerationFactor.child_value("kspace_encoding_step_1")));
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:332:90:  [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).
	      info.accelerationFactor.kspace_encoding_step_2 = static_cast<unsigned short>(std::atoi(accelerationFactor.child_value("kspace_encoding_step_2")));
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:422:24:  [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).
	  l.coilNumber = std::atoi(coilLabel.child_value("coilNumber"));
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:498: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[256];
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:499:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(buffer,"%f",v);
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:505: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[256];
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:506:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(buffer,"%f",v);
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:512: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[256];
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:513:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(buffer,"%d",v);
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:519: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[256];
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:520:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(buffer,"%ld",v);
data/ismrmrd-1.4.2.1/utilities/recon_cartesian_2d.cpp:107: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(0,acq.idx().kspace_encode_step_1,c), &acq.data(0, c), sizeof(complex_float_t)*nX);
data/ismrmrd-1.4.2.1/examples/c/main.c:150:36:  [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).
    im.head.attribute_string_len = strlen(attr_string);
data/ismrmrd-1.4.2.1/libsrc/dataset.c:87:11:  [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).
    len = strlen(dset->groupname) + strlen(var) + 2;
data/ismrmrd-1.4.2.1/libsrc/dataset.c:87:37:  [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).
    len = strlen(dset->groupname) + strlen(var) + 2;
data/ismrmrd-1.4.2.1/libsrc/dataset.c:95:5:  [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(path, "/");
data/ismrmrd-1.4.2.1/libsrc/dataset.c:119:11:  [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).
    len = strlen(path) + strlen(var) + 2;
data/ismrmrd-1.4.2.1/libsrc/dataset.c:119: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).
    len = strlen(path) + strlen(var) + 2;
data/ismrmrd-1.4.2.1/libsrc/dataset.c:127:5:  [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(newpath, "/");
data/ismrmrd-1.4.2.1/libsrc/dataset.c:928:38:  [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).
    dset->filename = (char *) malloc(strlen(filename) + 1);
data/ismrmrd-1.4.2.1/libsrc/dataset.c:934:39:  [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).
    dset->groupname = (char *) malloc(strlen(groupname) + 1);
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.cpp:22:14:  [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.
        std::equal(std::begin(ec1.user),std::end(ec1.user),std::begin(ec2.user));
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.cpp:74:17:  [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.
           std::equal(std::begin(physiology_time_stamp), std::end(physiology_time_stamp), std::begin(hdr.physiology_time_stamp)) &&
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.cpp:78:17:  [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.
           std::equal(std::begin(channel_mask), std::end(channel_mask), std::begin(hdr.channel_mask)) &&
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.cpp:85:17:  [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.
           std::equal(std::begin(position), std::end(position), std::begin(hdr.position)) &&
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.cpp:86:17:  [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.
           std::equal(std::begin(read_dir), std::end(read_dir), std::begin(hdr.read_dir)) &&
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.cpp:87:17:  [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.
           std::equal(std::begin(phase_dir), std::end(phase_dir), std::begin(hdr.phase_dir)) &&
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.cpp:88:17:  [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.
           std::equal(std::begin(slice_dir), std::end(slice_dir), std::begin(hdr.slice_dir)) &&
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.cpp:89:17:  [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.
           std::equal(std::begin(patient_table_position), std::end(patient_table_position), std::begin(hdr.patient_table_position)) &&
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.cpp:91:17:  [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.
           std::equal(std::begin(user_int), std::end(user_int), std::begin(hdr.user_int)) &&
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.cpp:92:17:  [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.
           std::equal(std::begin(user_int), std::end(user_int), std::begin(hdr.user_int));
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.cpp:987: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).
    size_t length = strlen(attr);
data/ismrmrd-1.4.2.1/libsrc/ismrmrd.cpp:1001:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(im.attribute_string, attr, length+1);
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:174:10:  [1] (buffer) wcslen:
  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 wcslen(s);
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:176:10:  [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(s);
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:208:10:  [1] (buffer) wcslen:
  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 wcslen(s);
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:3752:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			stream.read(chunk->data, static_cast<std::streamsize>(sizeof(chunk->data) / sizeof(T)));
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:3808:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		stream.read(static_cast<T*>(buffer.data), static_cast<std::streamsize>(read_length));
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:5770:34:  [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 impl::as_wide_impl(str, strlen(str));
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:6711:35:  [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).
		truncate_zeros(buffer, buffer + strlen(buffer));
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:6722:10:  [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).
		assert(strlen(buffer) < buffer_size);
data/ismrmrd-1.4.2.1/libsrc/pugixml.cpp:6763:24:  [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).
		size_t result_size = strlen(mantissa_buffer) + (exponent > 0 ? exponent : -exponent) + 4;
data/ismrmrd-1.4.2.1/libsrc/xml.cpp:158:40:  [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).
      memcpy(buffer,name.child_value(),strlen(name.child_value())+1);

ANALYSIS SUMMARY:

Hits = 126
Lines analyzed = 20454 in approximately 0.46 seconds (44275 lines/second)
Physical Source Lines of Code (SLOC) = 14746
Hits@level = [0]  28 [1]  31 [2]  89 [3]   0 [4]   6 [5]   0
Hits@level+ = [0+] 154 [1+] 126 [2+]  95 [3+]   6 [4+]   6 [5+]   0
Hits/KSLOC@level+ = [0+] 10.4435 [1+] 8.54469 [2+] 6.44243 [3+] 0.40689 [4+] 0.40689 [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.