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/dcm2niix-1.0.20201102/console/charls/charls.h
Examining data/dcm2niix-1.0.20201102/console/charls/colortransform.h
Examining data/dcm2niix-1.0.20201102/console/charls/constants.h
Examining data/dcm2niix-1.0.20201102/console/charls/context.h
Examining data/dcm2niix-1.0.20201102/console/charls/contextrunmode.h
Examining data/dcm2niix-1.0.20201102/console/charls/decoderstrategy.h
Examining data/dcm2niix-1.0.20201102/console/charls/defaulttraits.h
Examining data/dcm2niix-1.0.20201102/console/charls/encoderstrategy.h
Examining data/dcm2niix-1.0.20201102/console/charls/interface.cpp
Examining data/dcm2niix-1.0.20201102/console/charls/jlscodecfactory.h
Examining data/dcm2niix-1.0.20201102/console/charls/jpegimagedatasegment.h
Examining data/dcm2niix-1.0.20201102/console/charls/jpegls.cpp
Examining data/dcm2niix-1.0.20201102/console/charls/jpegmarkercode.h
Examining data/dcm2niix-1.0.20201102/console/charls/jpegmarkersegment.cpp
Examining data/dcm2niix-1.0.20201102/console/charls/jpegmarkersegment.h
Examining data/dcm2niix-1.0.20201102/console/charls/jpegsegment.h
Examining data/dcm2niix-1.0.20201102/console/charls/jpegstreamreader.cpp
Examining data/dcm2niix-1.0.20201102/console/charls/jpegstreamreader.h
Examining data/dcm2niix-1.0.20201102/console/charls/jpegstreamwriter.cpp
Examining data/dcm2niix-1.0.20201102/console/charls/jpegstreamwriter.h
Examining data/dcm2niix-1.0.20201102/console/charls/lookuptable.h
Examining data/dcm2niix-1.0.20201102/console/charls/losslesstraits.h
Examining data/dcm2niix-1.0.20201102/console/charls/processline.h
Examining data/dcm2niix-1.0.20201102/console/charls/publictypes.h
Examining data/dcm2niix-1.0.20201102/console/charls/scan.h
Examining data/dcm2niix-1.0.20201102/console/charls/util.h
Examining data/dcm2niix-1.0.20201102/console/jpg_0XC3.cpp
Examining data/dcm2niix-1.0.20201102/console/jpg_0XC3.h
Examining data/dcm2niix-1.0.20201102/console/main_console.cpp
Examining data/dcm2niix-1.0.20201102/console/main_console_batch.cpp
Examining data/dcm2niix-1.0.20201102/console/miniz.c
Examining data/dcm2niix-1.0.20201102/console/nifti1.h
Examining data/dcm2niix-1.0.20201102/console/nifti1_io_core.cpp
Examining data/dcm2niix-1.0.20201102/console/nifti1_io_core.h
Examining data/dcm2niix-1.0.20201102/console/nii_dicom.cpp
Examining data/dcm2niix-1.0.20201102/console/nii_dicom.h
Examining data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp
Examining data/dcm2niix-1.0.20201102/console/nii_dicom_batch.h
Examining data/dcm2niix-1.0.20201102/console/nii_foreign.cpp
Examining data/dcm2niix-1.0.20201102/console/nii_foreign.h
Examining data/dcm2niix-1.0.20201102/console/nii_ortho.cpp
Examining data/dcm2niix-1.0.20201102/console/nii_ortho.h
Examining data/dcm2niix-1.0.20201102/console/print.h
Examining data/dcm2niix-1.0.20201102/console/tinydir.h
Examining data/dcm2niix-1.0.20201102/console/ujpeg.cpp
Examining data/dcm2niix-1.0.20201102/console/ujpeg.h

FINAL RESULTS:

data/dcm2niix-1.0.20201102/console/charls/interface.cpp:82:13:  [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(errorMessage, error.what());
data/dcm2niix-1.0.20201102/console/main_console.cpp:196:18:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    FILE *pipe = popen(SHELLSCRIPT, "r");
data/dcm2niix-1.0.20201102/console/main_console.cpp:498:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(opts.filename,argv[i]);
data/dcm2niix-1.0.20201102/console/main_console.cpp:502:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(opts.outdir,argv[i]);
data/dcm2niix-1.0.20201102/console/main_console.cpp:560:6:  [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(opts.indir,argv[i]); // [argc-1]
data/dcm2niix-1.0.20201102/console/main_console_batch.cpp:97:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if( access( argv[1], F_OK ) == -1 ) {
data/dcm2niix-1.0.20201102/console/main_console_batch.cpp:122:9:  [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(opts.indir, indir.c_str());
data/dcm2niix-1.0.20201102/console/main_console_batch.cpp:124:9:  [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(opts.outdir, outdir.c_str());
data/dcm2niix-1.0.20201102/console/main_console_batch.cpp:126:9:  [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(opts.filename, filename.c_str());
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:654:9:  [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(txt,dtxt);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:664:9:  [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(txt,dtxt);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1584:9:  [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(++p_extension, ext);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1766:13:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
            sscanf(buff, "# %s %s %s %s %s %s V%s\n", Comment[0], Comment[1], Comment[2], Comment[3],Comment[4], Comment[5],Comment[6]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1820:13:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
            sscanf(buff, ". %s %s %s %s %s %s %s %s %s\n", Comment[0], Comment[1],Comment[2], Comment[3], Comment[4], Comment[5], Comment[6], Comment[7], Comment[8]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1845:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(d.patientName, Comment[3]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1846:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.patientName, Comment[4]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1847:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.patientName, Comment[5]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1848:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.patientName, Comment[6]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1849:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.patientName, Comment[7]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1854:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(d.patientID, Comment[2]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1855:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.patientID, Comment[3]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1856:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.patientID, Comment[4]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1857:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.patientID, Comment[5]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1858:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.patientID, Comment[6]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1859:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.patientID, Comment[7]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1863:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(d.protocolName, Comment[3]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1864:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.protocolName, Comment[4]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1865:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.protocolName, Comment[5]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1866:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.protocolName, Comment[6]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1867:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.protocolName, Comment[7]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1871:14:  [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(d.imageComments, Comment[3]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1872:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.imageComments, Comment[4]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1873:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.imageComments, Comment[5]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1874:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.imageComments, Comment[6]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1875:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.imageComments, Comment[7]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1879:14:  [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(d.seriesDescription, Comment[3]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1880:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.seriesDescription, Comment[4]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1881:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.seriesDescription, Comment[5]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1882:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.seriesDescription, Comment[6]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1883:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(d.seriesDescription, Comment[7]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:2435:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if( access( parname, F_OK ) != 0 ) changeExt (parname, "rec");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:3266:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if( access(imgname, F_OK ) == -1 ) {
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:3313:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if( access(imgname, F_OK ) == -1 ) {
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:3994:9:  [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(pathParent,path);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5065:15:  [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(imageType1st, d.imageType);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6657:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				sprintf(str, "%s%c%c ", str, vr[0], vr[1]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6658:39:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				if ((vr[0]=='F') && (vr[1]=='D')) sprintf(str, "%s%g ", str, dcmFloatDouble(lLength, &buffer[lPos], d.isLittleEndian));
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6659:39:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				if ((vr[0]=='F') && (vr[1]=='L')) sprintf(str, "%s%g ", str, dcmFloat(lLength, &buffer[lPos], d.isLittleEndian));
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6660:39:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				if ((vr[0]=='S') && (vr[1]=='S')) sprintf(str, "%s%d ", str, dcmInt(lLength, &buffer[lPos], d.isLittleEndian));
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6661:39:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				if ((vr[0]=='S') && (vr[1]=='L')) sprintf(str, "%s%d ", str, dcmInt(lLength,&buffer[lPos],d.isLittleEndian));
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6662:39:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				if ((vr[0]=='U') && (vr[1]=='S')) sprintf(str, "%s%d ", str, dcmInt(lLength, &buffer[lPos], d.isLittleEndian));
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6663:39:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				if ((vr[0]=='U') && (vr[1]=='L')) sprintf(str, "%s%d ", str, dcmInt(lLength, &buffer[lPos], d.isLittleEndian));
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6687:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        		sprintf(str, "%s<%d bytes> ", str, lLength);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6845:3:  [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(d.protocolName, d.seriesDescription);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6847:3:  [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(d.protocolName, d.seriesDescription);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6851:3:  [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(d.protocolName, d.sequenceName); //protocolName (0018,1030) optional, sequence name (0018,0024) is not a good substitute for Siemens as it can vary per volume: *ep_b0 *ep_b1000#1, *ep_b1000#2, etc https://www.nitrc.org/forum/forum.php?thread_id=8771&forum_id=4703
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6960:6:  [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(d.imageType, imageType1st); //for multi-frame datasets, return name of book, not name of last chapter
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:7115:3:  [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(d.seriesInstanceUID, d.studyInstanceUID);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:7127:3:  [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(d.seriesInstanceUID, seriesTimeTxt); // dest <- src
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:7136:4:  [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(txt, (char*)&d.imageComments[len]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:7165:3:  [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(d.seriesInstanceUID, d.studyDate);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:106:7:  [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,cwd);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:369:2:  [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 (txtname,pathoutname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:479:4:  [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 (str, tmpstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:498:4:  [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 (str, tmpstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:519:4:  [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 (outStr, tmpstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:691:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				sprintf(txt, "%s%d]", keyStrTiFree,k);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:704:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				sprintf(txt, "%s%d]", keyStrAlFree,k);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:723:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				sprintf(txt, "%s%d]", keyStrAdFree,k);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:938:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(fp, sLabel, sValEsc );
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:943:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(fp, sLabel, sVal );
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:958:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(fp, sLabel, sVal );
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:970:2:  [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(d->protocolName, protocolName);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:984:2:  [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 (txtname,pathoutname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1103:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(fp, (ayear >= 0 && ayear <= 9999) ? "\"%4d" : "\"%+4d", ayear);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1167:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
				fprintf(fp, (ayear >= 0 && ayear <= 9999) ? "\"%4d" : "\"%+4d", ayear);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1784:9:  [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 (txtname,pathoutname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1792:3:  [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 (txtname,pathoutname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1997:3:  [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(txtname,pathoutname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2052: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 (txtname,pathoutname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2073: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(txtname,pathoutname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2343: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 (niiname,outname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2344: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 (niiname,ext);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2363: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 (niiname,pathoutname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2367: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 (gzname,pathoutname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2370: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 (niiname,pathoutname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2373: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 (niiname,pathoutname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2434:9:  [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(pth, opts.outdir);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2435:16:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        int w =access(pth,W_OK);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2441:8:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
				w =access(pth,W_OK);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2455: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(inname, opts.filename);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2482:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat (outname,newstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2489:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat (outname,dcm.coilName);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2491:27:  [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).
            if (f == 'B') strcat (outname,dcm.imageBaseName);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2492:27:  [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).
            if (f == 'C') strcat (outname,dcm.imageComments);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2493:27:  [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).
            if (f == 'D') strcat (outname,dcm.seriesDescription);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2497:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat (outname,newstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2500:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat (outname,opts.indirParent);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2502:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(outname, dcm.accessionNumber);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2504:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat (outname,dcm.patientID);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2506:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat (outname,dcm.seriesInstanceUID);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2508:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat (outname,dcm.studyInstanceUID);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2510:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat (outname,dcm.procedureStepDescription);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2530:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat (outname,dcm.patientName);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2532:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat (outname,dcm.instanceUID);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2537:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat (outname,dcm.protocolName);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2543:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat (outname,newstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2547:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat (outname,dcm.scanningSequence);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2550:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat (outname,newstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2555:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat (outname,newstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2560:6:  [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 (outname,newstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2565:6:  [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 (outname,newstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2591: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 (outname,dcm.studyID);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2594:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat (outname,newstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2597:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat (outname,dcm.sequenceName);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2602:21:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                    sprintf(newstr, zeroPad, dcm.seriesNum);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2603:21:  [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 (outname,newstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2609:21:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                    sprintf(newstr, zeroPad, dcm.imageNum);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2611:21:  [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 (outname,newstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2617:21:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
                    sprintf(newstr, zeroPad, dcm.rawDataRunNumber); //GE (0019,10A2) else (0020,0100)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2618:21:  [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 (outname,newstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2629:9:  [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 (outname,newstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2635:9:  [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 (outname,dcm.coilName);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2644:9:  [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 (outname,newstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2649:9:  [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 (outname,newstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2654:9:  [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 (outname,newstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2673:9:  [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 (outname,newstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2712: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 (baseoutname,pth);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2716:9:  [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 (baseoutname,appendChar);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2727:6:  [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 (newdir,baseoutname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2741:7:  [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 (newdir,ch);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2756: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 (baseoutname,outname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2758: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 (pathoutname,baseoutname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2766:6:  [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(niiFilename,pathoutname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2771:9:  [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(pathoutname,baseoutname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2773:9:  [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 (pathoutname,appendChar);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2782: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(niiFilename,pathoutname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2810: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(niiFilename,niiFilenameBase);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2848: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 (fname,baseName);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3099:2:  [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(command, opts.pigzname );
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3102:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(newstr, "\"%s -n -f -%d \"", blockSize, opts.gzLevel);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3103:3:  [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(command, newstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3106:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(newstr, "\"%s -n \"", blockSize);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3107:3:  [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(command, newstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3109:2:  [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(command, fname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3125:12:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	int ret = system(command);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3145: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 (fname, niiFilename);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3215:6:  [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 (fname, niiFilename);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3363:2:  [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 (fname, niiFilename); //without gz
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3492: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 (fname,niiFilename);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3504:6:  [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(command, opts.pigzname );
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3508:10:  [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(command, newstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3511:6:  [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(command, fname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3517:20:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		if (( pigzPipe = popen(command, "w")) == NULL) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3574:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(zeroPad,"%%s_%%0%dd",zeroPadLen);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3576:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        sprintf(fname,zeroPad,niiFilename,i);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3629:3:  [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 (hdr->descrip,newstr);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3883: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(niiFilenameTilt,niiFilename);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3988: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(niiFilenameTilt,niiFilename);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:4121: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(niiFilenameEq,niiFilename);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:4407: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(niiFilenameCrop,niiFilename);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:5669:4:  [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(pathoutnameADC,pathoutname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:5683: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(pathoutnameROI,pathoutname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:5686: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(pathoutnameROI,append);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6158: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(nameList.str[nameList.numItems],fname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6217:6:  [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(nameList.str[nameList.numItems],dcmname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6257:9:  [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(filename, path);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6258:9:  [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(filename,kFileSep);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6259:9:  [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(filename, file.name);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6271:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(nameList->str[nameList->numItems],filename);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6337: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(nameList.str[0], fnm);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6494:9:  [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(filename, path);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6495:9:  [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(filename,kFileSep);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6496:9:  [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(filename, file.name);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6868:9:  [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(filename, path);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6869:9:  [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(filename,kFileSep);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6870:9:  [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(filename, file.name);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6889: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(indir,opts->indir);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6903:9:  [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(opts->outdir,opts->indir);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6909:3:  [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(opts->outdir,opts->indir);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6917:13:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    	int w =access(opts->outdir,W_OK);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6921:7:  [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(outdir,opts->outdir);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6922:4:  [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(opts->outdir,opts->indir);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6923:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
			w =access(opts->outdir,W_OK);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6945:9:  [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(pname,indir);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6946:9:  [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(rname,indir);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6950:10:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
   		if( access( rname, F_OK ) != 0 ) changeExt (rname, "rec");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6951:10:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
   		if( access( pname, F_OK ) != 0 ) changeExt (pname, "par");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6975:9:  [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(indir,opts->indir);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7033:3:  [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(pth,beg);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7087:4:  [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(opts->pigzname,str);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7099: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(exepth,argv[0]);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7103:53:  [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).
    if (exepth[strlen(exepth)-1] != kPathSeparator) strcat (exepth,appendChar);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7108:4:  [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(str, pths[p]);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7109:4:  [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(str, nams[n]);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7114:6:  [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(str, exepth);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7115:3:  [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(str, nams[n]);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7137:4:  [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(opts->pigzname,str);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7248:3:  [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(opts->filename,buffer);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7258:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(opts->optsname, "%s%s", getenv("HOME"), STATUSFILENAME);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7273:13:  [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(opts->filename,Value);
data/dcm2niix-1.0.20201102/console/print.h:28:24:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			  int length = std::snprintf( nullptr, 0, format, args... );
data/dcm2niix-1.0.20201102/console/print.h:31:11:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
			  std::snprintf( buf, length + 1, format, args... );
data/dcm2niix-1.0.20201102/console/print.h:39:25:  [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.
			#define printMessage printf
data/dcm2niix-1.0.20201102/console/print.h:45:62:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
				#define printError(...) do { fprintf (stderr,"Error: "); fprintf (stderr, __VA_ARGS__);} while(0)
data/dcm2niix-1.0.20201102/console/tinydir.h:135:2:  [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(dir->path, path);
data/dcm2niix-1.0.20201102/console/tinydir.h:341:2:  [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(file->path, dir->path);
data/dcm2niix-1.0.20201102/console/tinydir.h:343:2:  [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(file->name,
data/dcm2niix-1.0.20201102/console/tinydir.h:421:2:  [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(path, dir->_files[i].path);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3117:6:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
		if(CreateProcess(NULL, command, NULL,NULL,FALSE,NORMAL_PRIORITY_CLASS | CREATE_NO_WINDOW,NULL, NULL,&startupInfo,&ProcessInfo)) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3117:6:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
		if(CreateProcess(NULL, command, NULL,NULL,FALSE,NORMAL_PRIORITY_CLASS | CREATE_NO_WINDOW,NULL, NULL,&startupInfo,&ProcessInfo)) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7017:7:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
		if (realpath(exe, pth) == NULL) return 0;
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7020:15:  [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.
	searchpath = getenv("PATH");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7258:37:  [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.
    sprintf(opts->optsname, "%s%s", getenv("HOME"), STATUSFILENAME);
data/dcm2niix-1.0.20201102/console/charls/processline.h:55:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(dest, _rawData, pixelCount * _bytesPerPixel);
data/dcm2niix-1.0.20201102/console/charls/processline.h:61:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(_rawData, pSrc, pixelCount * _bytesPerPixel);
data/dcm2niix-1.0.20201102/console/charls/processline.h:276: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(_templine.data(), source, sizeof(Triplet<size_type>) * pixelCount);
data/dcm2niix-1.0.20201102/console/jpg_0XC3.cpp:111:20:  [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 *reader = fopen(fn, "rb");
data/dcm2niix-1.0.20201102/console/main_console.cpp:197: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 ch, gitvers[versionChars+1];
data/dcm2niix-1.0.20201102/console/main_console.cpp:219: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 myvers[versionChars+1];
data/dcm2niix-1.0.20201102/console/main_console.cpp:222:15:  [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 myv = atoi(myvers + 5); //skip "v1.0."
data/dcm2niix-1.0.20201102/console/main_console.cpp:223:13:  [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 gitv = atoi(gitvers + 5); //skip "v1.0."
data/dcm2niix-1.0.20201102/console/main_console.cpp:257:3:  [2] (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). Risk is low because the source is a constant string.
	 strcpy(opts.indir, "e:\\t1s");
data/dcm2niix-1.0.20201102/console/main_console.cpp:531:3:  [2] (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). Risk is low because the source is a constant string.
		strcpy(opts.filename,"%t\\%s_%p\\%4r_%o.dcm"); //nrrd or nhdr (windows folders)
data/dcm2niix-1.0.20201102/console/main_console.cpp:533:3:  [2] (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). Risk is low because the source is a constant string.
		strcpy(opts.filename,"%t/%s_%p/%4r_%o.dcm"); //nrrd or nhdr (unix folders)
data/dcm2niix-1.0.20201102/console/main_console.cpp:542: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 niiFilename[1024];
data/dcm2niix-1.0.20201102/console/miniz.c:523: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 m_filename[MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE];
data/dcm2niix-1.0.20201102/console/miniz.c:524: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 m_comment[MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE];
data/dcm2niix-1.0.20201102/console/miniz.c:938:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef unsigned char mz_validate_uint16[sizeof(mz_uint16)==2 ? 1 : -1];
data/dcm2niix-1.0.20201102/console/miniz.c:939:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef unsigned char mz_validate_uint32[sizeof(mz_uint32)==4 ? 1 : -1];
data/dcm2niix-1.0.20201102/console/miniz.c:940:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef unsigned char mz_validate_uint64[sizeof(mz_uint64)==8 ? 1 : -1];
data/dcm2niix-1.0.20201102/console/miniz.c:1266: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(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n);
data/dcm2niix-1.0.20201102/console/miniz.c:1286: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(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n);
data/dcm2niix-1.0.20201102/console/miniz.c:1366:31:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define TINFL_MEMCPY(d, s, l) memcpy(d, s, l)
data/dcm2niix-1.0.20201102/console/miniz.c:1955: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(code_sizes_to_pack, &d->m_huff_code_sizes[0][0], num_lit_codes);
data/dcm2niix-1.0.20201102/console/miniz.c:1956: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(code_sizes_to_pack + num_lit_codes, &d->m_huff_code_sizes[1][0], num_dist_codes);
data/dcm2niix-1.0.20201102/console/miniz.c:2252: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((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf, bytes_to_copy);
data/dcm2niix-1.0.20201102/console/miniz.c:2353: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(d->m_dict + dst_pos, d->m_pSrc, n);
data/dcm2niix-1.0.20201102/console/miniz.c:2355: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(d->m_dict + TDEFL_LZ_DICT_SIZE + dst_pos, d->m_pSrc, MZ_MIN(n, (TDEFL_MAX_MATCH_LEN - 1) - dst_pos));
data/dcm2niix-1.0.20201102/console/miniz.c:2631: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((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf + d->m_output_flush_ofs, n);
data/dcm2niix-1.0.20201102/console/miniz.c:2759: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((mz_uint8*)p->m_pBuf + p->m_size, pBuf, len); p->m_size = new_size;
data/dcm2niix-1.0.20201102/console/miniz.c:2829: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(out_buf.m_pBuf, pnghdr, 41);
data/dcm2niix-1.0.20201102/console/miniz.c:2891:28:  [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).
    #define MZ_FOPEN(f, m) fopen(f, m)
data/dcm2niix-1.0.20201102/console/miniz.c:2907:28:  [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).
    #define MZ_FOPEN(f, m) fopen(f, m)
data/dcm2niix-1.0.20201102/console/miniz.c:2939:28:  [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).
    #define MZ_FOPEN(f, m) fopen(f, m)
data/dcm2niix-1.0.20201102/console/miniz.c:3032: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((mz_uint8*)pArray->m_p + orig_size * pArray->m_element_size, pElements, n * pArray->m_element_size);
data/dcm2niix-1.0.20201102/console/miniz.c:3293: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(pBuf, (const mz_uint8 *)pZip->m_pState->m_pMem + file_ofs, s);
data/dcm2niix-1.0.20201102/console/miniz.c:3431: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(pStat->m_filename, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n); pStat->m_filename[n] = '\0';
data/dcm2niix-1.0.20201102/console/miniz.c:3435: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(pStat->m_comment, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS) + MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS), n); pStat->m_comment[n] = '\0';
data/dcm2niix-1.0.20201102/console/miniz.c:3449: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(pFilename, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n);
data/dcm2niix-1.0.20201102/console/miniz.c:4029: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((mz_uint8 *)pState->m_pMem + file_ofs, pBuf, n);
data/dcm2niix-1.0.20201102/console/miniz.c:4077:28:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    mz_uint64 cur_ofs = 0; char buf[4096]; MZ_CLEAR_OBJ(buf);
data/dcm2niix-1.0.20201102/console/miniz.c:4257: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[4096];
data/dcm2niix-1.0.20201102/console/miniz.c:4695: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(central_header, pSrc_central_header, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE);
data/dcm2niix-1.0.20201102/console/nifti1.h:153: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  data_type[10]; /*!< ++UNUSED++            */  /* char data_type[10];  */
data/dcm2niix-1.0.20201102/console/nifti1.h:154: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  db_name[18];   /*!< ++UNUSED++            */  /* char db_name[18];    */
data/dcm2niix-1.0.20201102/console/nifti1.h:187: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  descrip[80];   /*!< any text you like.    */  /* char descrip[80];    */
data/dcm2niix-1.0.20201102/console/nifti1.h:188: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  aux_file[24];  /*!< auxiliary filename.   */  /* char aux_file[24];   */
data/dcm2niix-1.0.20201102/console/nifti1.h:204: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 intent_name[16];/*!< 'name' or meaning of data.  */
data/dcm2niix-1.0.20201102/console/nifti1.h:206: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[4] ;      /*!< MUST be "ni1\0" or "n+1\0". */
data/dcm2niix-1.0.20201102/console/nifti1.h:291:26:  [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.
struct nifti1_extender { char extension[4] ; } ;
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp: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(p_buffer, p_file->cur, l_nb_read);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:159: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(p_file->cur,p_buffer, p_nb_bytes);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:218:20:  [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 *reader = fopen(imgname, "rb");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:644: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 txt[1024] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:648:6:  [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(txt, "TE=%.2g;Time=%.3f", d.TE,d.acquisitionTime);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:650:6:  [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(txt, "Time=%.3f", d.acquisitionTime);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:652: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 dtxt[1024] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:653:9:  [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(dtxt, ";phase=%d", d.CSA.phaseEncodingDirectionPositive);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:662: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 dtxt[1024] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:663:9:  [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(dtxt, ";mb=%d", d.CSA.multiBandFactor);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:668: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(h->descrip, txt, 79);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:933: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(cString, (char*)&lBuffer[0], lLength);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:976: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(lOut,cString,len-1);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:987: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(&retVal, (char*)&lBuffer[0], 4);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1006: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(&retVal, (char*)&lBuffer[0], 8);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1033: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(&i.i, (char*)&lBuffer[0], 4);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1054: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(&i.i, (char*)&lBuffer[0], 8);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1119: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(cString, (const unsigned char*)(&lBuffer[0]), lByteLength);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1121:15:  [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 ret = atoi(cString);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1137: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(cString, (char*)&lBuffer[0], lByteLength);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1180: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(cString, &buff[lPos], itemCSA.xx2_Len); //TPX memcpy(&cString, &buff[lPos], sizeof(cString));
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1210: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(cString, &buff[lPos], sizeof(itemCSA.xx2_Len)); //TPX memcpy(&cString, &buff[lPos], sizeof(cString));
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1398: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(&lShorts[0], (uint16_t *)&lBuffer[0], lByteLength);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1408: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(&lLongs[0], (uint32_t *)&lBuffer[0], lByteLength);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1422: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(cString, (char*)&lBuffer[0], lByteLength);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1454: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(cString, (char*)&lBuffer[0], lByteLength);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1593: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(cString, (char*)&lOut[0], lLength);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1638: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(lOut,cString,len-1);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1662:12:  [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 *fp = fopen(parname, "r");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1707: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 buff[LINESZ];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1765: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 Comment[7][50];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1817: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 Comment[9][50];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1822: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).
                d.acquNum = atoi( Comment[3]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1826:32:  [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).
                v3Xdim = (int) atoi(Comment[5]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1827:32:  [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).
                v3Ydim = (int) atoi(Comment[6]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1831:40:  [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).
                v3BitsPerVoxel = (int) atoi(Comment[8]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1923:31:  [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).
                d.xyzDim[3] = atoi(Comment[5]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1926:46:  [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).
                maxNumberOfDiffusionValues = atoi(Comment[6]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1930:46:  [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).
                maxNumberOfGradientOrients = atoi(Comment[6]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1934: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).
                maxNumberOfCardiacPhases = atoi(Comment[6]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1937:37:  [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).
                maxNumberOfEchoes = atoi(Comment[5]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1941:39:  [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).
                maxNumberOfDynamics = atoi(Comment[5]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1944:36:  [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).
                maxNumberOfMixes = atoi(Comment[5]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1949:37:  [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).
                maxNumberOfLabels = atoi(Comment[7]);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:2523: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(&outImg[lOutPos], &inImg[lPos], colBytes); // dest, src, bytes
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:2560: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(line, &bImg[slBottom], lineBytes);//memcpy(&line, &bImg[slBottom], lineBytes);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:2561: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(&bImg[slBottom], &bImg[slTop], lineBytes);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:2562: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(&bImg[slTop], line, lineBytes);//tpx memcpy(&bImg[slTop], &line, lineBytes);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:2588: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(slice, &bImg[slBottom], sliceBytes); //TPX memcpy(&slice, &bImg[slBottom], sliceBytes);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:2589: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(&bImg[slBottom], &bImg[slTop], sliceBytes);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:2590: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(&bImg[slTop], slice, sliceBytes); //TPX
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:2734: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 *file = fopen(imgname , "rb");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:2786: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(slice24, &bImg[sliceOffsetRGB], sliceBytes24);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:2812: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(slice24, &bImg[sliceOffsetR], sliceBytes24); //TPX memcpy(&slice24, &bImg[sliceOffsetR], sliceBytes24);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:2919: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( &outImg[0],&bImg[0], imgSz);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:2929: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( &bImg[outPos], &outImg[inPos], sliceBytes);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:3157:20:  [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 *reader = fopen(fn, "rb");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:3240: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(&bImg[pos], ret, slicesz); //dest, src, size
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:3271:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen(imgname, "rb");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:3318:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen(imgname, "rb");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:3339: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(bImg, njGetImage(), njGetImageSize()); //dest, src, size
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:3348: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(&retVal, (char*)&lBuffer[lIndex * 4], 4);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:3373: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 *file = fopen(imgname , "rb");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:3455: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 *file = fopen(imgname , "rb");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:3557: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 *file = fopen(imgname , "rb");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:3702: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 *fp = fopen(fname, "rb");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:3711:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char buffer[256];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:4084: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 *file = fopen(fname, "rb");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:4459: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 vr[2];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:4461: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 seriesTimeTxt[kDICOMStr] = "";
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:4462: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 acquisitionDateTimeTxt[kDICOMStr] = "";
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:4463: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 imageType1st[kDICOMStr] = "";
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:4884:4:  [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 privateCreator[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:4949: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.
         		char mediaUID[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:4972:17:  [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 transferSyntax[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5035:17:  [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 impTxt[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5045:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            	char saeTxt[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5134:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            	char acquisitionDateTxt[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5196:17:  [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 acqContrast[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5202:17:  [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 acquisitionTimeTxt[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5225:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            	char aotTxt[kDICOMStr]; //ftp://dicom.nema.org/MEDICAL/dicom/2015b/output/chtml/part03/sect_C.7.6.2.html#sect_C.7.6.2.1.1
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5232:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            	char anonTxt[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5276:17:  [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 derivationDescription[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5339:17:  [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 dir[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5459:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            	char epiStr[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5474:17:  [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 epiStr[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5598:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
 				char interp[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5636:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            	char accelStr[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5715:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            	char accelStr[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5906:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
					char matStr[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5934:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            	char accelStr[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6045:17:  [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 orientStr[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6653:10:  [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 str[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6654:10:  [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(str, "%*c%04x,%04x %u@%ld ", sqDepth+1, ' ',  groupElement & 65535,groupElement>>16, lLength, lFileOffset+lPos);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6690:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        		char tagStr[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6749:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    	char acquisitionDateTxt[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6750: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(acquisitionDateTxt, acquisitionDateTimeTxt, kYYYYMMDDlen);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6753: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 acquisitionTimeTxt[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6849:3:  [2] (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 string.
		strcat (d.protocolName,"_MoCo"); //disambiguate MoCo https://github.com/neurolabusc/MRIcroGL/issues/31
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:7131: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 txt[1024] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:7132:6:  [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(txt, "b=%d(", (int) round(B0Philips));
data/dcm2niix-1.0.20201102/console/nii_dicom.h:148: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 name[64]; //null-terminated
data/dcm2niix-1.0.20201102/console/nii_dicom.h:150: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 vr[4]; //  possibly nul-term string
data/dcm2niix-1.0.20201102/console/nii_dicom.h:161: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 name[64]; //null-terminated
data/dcm2niix-1.0.20201102/console/nii_dicom.h:163: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 vr[4]; //  possibly nul-term string
data/dcm2niix-1.0.20201102/console/nii_dicom.h:190: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 radiopharmaceutical[kDICOMStr], convolutionKernel[kDICOMStr], unitsPT[kDICOMStr], decayCorrection[kDICOMStr], attenuationCorrectionMethod[kDICOMStr],reconstructionMethod[kDICOMStr]; 
data/dcm2niix-1.0.20201102/console/nii_dicom.h:191: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 coilElements[kDICOMStr], coilName[kDICOMStr], phaseEncodingDirectionDisplayedUIH[kDICOMStr], imageBaseName[kDICOMStr], scanOptions[kDICOMStr], stationName[kDICOMStr], softwareVersions[kDICOMStr], deviceSerialNumber[kDICOMStr], institutionName[kDICOMStr], referringPhysicianName[kDICOMStr], instanceUID[kDICOMStr], seriesInstanceUID[kDICOMStr], studyInstanceUID[kDICOMStr], bodyPartExamined[kDICOMStr], procedureStepDescription[kDICOMStr], imageType[kDICOMStr], institutionalDepartmentName[kDICOMStr], manufacturersModelName[kDICOMStr], patientID[kDICOMStr], patientOrient[kDICOMStr], patientName[kDICOMStr], accessionNumber[kDICOMStr], seriesDescription[kDICOMStr], studyID[kDICOMStr], sequenceName[kDICOMStr], protocolName[kDICOMStr],sequenceVariant[kDICOMStr],scanningSequence[kDICOMStr], patientBirthDate[kDICOMStr], patientAge[kDICOMStr],  studyDate[kDICOMStr],studyTime[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom.h:192: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 institutionAddress[kDICOMStrLarge], imageComments[kDICOMStrLarge];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:62:8:  [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.
	const char kFileSep[2] = "\\";
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:66:8:  [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.
	const char kFileSep[2] = "/";
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:103:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    	char cwd[PATH_MAX];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:121:15:  [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).
    if ((fp = fopen(filename, "r"))) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:368: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 txtname[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:370:5:  [2] (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 string.
    strcat (txtname,".txt");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:372: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 *fp = fopen(txtname, "w");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:471: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 str[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:473: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 tmpstr[2];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:490: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 str[kDICOMStr];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:492: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 tmpstr[2];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:513: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 tmpstr[2];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:599: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).
	FILE * pFile = fopen ( filename, "rb" );
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:690: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 txt[1024] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:703: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 txt[1024] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:711: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 keyStrAdFree[50];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:712:3:  [2] (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). Risk is low because the source is a constant string.
		strcpy(keyStrAdFree, "sWipMemBlock.adFree[");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:717:4:  [2] (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). Risk is low because the source is a constant string.
			strcpy(keyStrAdFree, "sWiPMemBlock.adFree[");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:722: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 txt[1024] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:793: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).
	FILE * pFile = fopen ( filename, "rb" );
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:865: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 DELACQ[100];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:871: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 PHASEDELAYS1[10000];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:898:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char sValEsc[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:967: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 protocolName[kDICOMStrLarge], fmriExternalInfo[kDICOMStrLarge], coilID[kDICOMStrLarge], consistencyInfo[kDICOMStrLarge], coilElements[kDICOMStrLarge], pulseSequenceDetails[kDICOMStrLarge], wipMemBlock[kDICOMStrLarge];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:983: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 txtname[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:985:2:  [2] (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 string.
	strcat (txtname,".json");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:986: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).
	FILE *fp = fopen(txtname, "w");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1152: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 acqDateTimeBuf[64];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1268: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 protocolName[kDICOMStrLarge], fmriExternalInfo[kDICOMStrLarge], coilID[kDICOMStrLarge], consistencyInfo[kDICOMStrLarge], coilElements[kDICOMStrLarge], pulseSequenceDetails[kDICOMStrLarge], wipMemBlock[kDICOMStrLarge];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1374: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 newstr[256];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1375: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(newstr, "\t\"sWipMemBlock.AdFree%d\": %%g,\n", k);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1703: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(&outImg[outPos], &inImg[volOrderIndex[i] * numVolBytes], numVolBytes); // dest, src, bytes
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1727: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(&tempVol[0], &inImg[o * numVolBytes], numVolBytes); //make temp
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1728: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(&inImg[o * numVolBytes], &inImg[i * numVolBytes], numVolBytes); //copy volume to desire location dest, src, bytes
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1729: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(&inImg[i * numVolBytes], &tempVol[0], numVolBytes); //copy unsorted volume
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1783: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 txtname[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1785:3:  [2] (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 string.
		strcat (txtname,".bval");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1786: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).
		FILE *fp = fopen(txtname, "w");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1793:3:  [2] (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 string.
		strcat (txtname,".bvec");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1794:8:  [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(txtname, "w");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1996: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 txtname[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1998:3:  [2] (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 string.
		strcat (txtname,".rvec");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1999: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).
		FILE *fp = fopen(txtname, "w");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2051: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 txtname[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2053:5:  [2] (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 string.
    strcat (txtname,".bval");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2055: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 *fp = fopen(txtname, "w");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2075:6:  [2] (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 string.
    	strcat (txtname,".mvec");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2077:6:  [2] (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 string.
    	strcat (txtname,".bvec");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2079:10:  [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(txtname, "w");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2342: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 niiname[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2362: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 niiname[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2364:5:  [2] (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 string.
    strcat (niiname,".nii");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2366: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 gzname[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2368:5:  [2] (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 string.
    strcat (gzname,".nii.gz");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2371:5:  [2] (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 string.
    strcat (niiname,".nrrd");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2374:5:  [2] (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 string.
    strcat (niiname,".nhdr");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2432: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 pth[PATH_MAX] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2454: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 inname[PATH_MAX] = {""};//{"test%t_%av"}; //% a = acquisition, %n patient name, %t time
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2460: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 outname[PATH_MAX] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2461: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 newstr[256];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2463:9:  [2] (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). Risk is low because the source is a constant string.
        strcpy(inname, "T%t_N%n_S%s");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2496:17:  [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(newstr, "%d", dcm.echoNum);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2513:21:  [2] (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 string.
                    strcat (outname,"Br");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2515:21:  [2] (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 string.
                    strcat (outname,"GE");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2517:21:  [2] (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 string.
                    strcat (outname,"To");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2519:21:  [2] (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 string.
                    strcat (outname,"Ca");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2521:18:  [2] (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 string.
                	strcat (outname,"UI");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2523:21:  [2] (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 string.
                    strcat (outname,"Ph");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2525:21:  [2] (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 string.
                    strcat (outname,"Si");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2527:21:  [2] (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 string.
                    strcat (outname,"NA"); //manufacturer name not available
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2542:17:  [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(newstr, "%d", dcm.imageNum);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2549:14:  [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(newstr, "%ld", dcm.seriesNum);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2554:17:  [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(newstr, "%0.0f", dcm.dateTime);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2559:6:  [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(newstr, "%d", dcm.acquNum);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2564:6:  [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(newstr, "%d", dcm.acquNum);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2574:6:  [2] (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 string.
					strcat (outname,"Bruker");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2576:6:  [2] (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 string.
					strcat (outname,"GE");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2578:6:  [2] (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 string.
					strcat (outname,"Philips");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2580:6:  [2] (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 string.
					strcat (outname,"Siemens");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2582:6:  [2] (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 string.
					strcat (outname,"Toshiba");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2584:6:  [2] (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 string.
					strcat (outname,"Canon");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2586:6:  [2] (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 string.
					strcat (outname,"UIH");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2588:6:  [2] (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 string.
					strcat (outname,"NA");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2593:17:  [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(newstr, "%d", dcm.rawDataRunNumber); //GE (0019,10A2) else (0020,0100)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2600: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 zeroPad[12] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2601:21:  [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(zeroPad,"%%0%dd",f - '0');
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2607: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 zeroPad[12] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2608:21:  [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(zeroPad,"%%0%dd",f - '0');
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2615: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 zeroPad[12] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2616:21:  [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(zeroPad,"%%0%dd",f - '0');
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2634:9:  [2] (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 string.
        strcat (outname, "_c");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2643:9:  [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(newstr, "_e%d", dcm.echoNum);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2648:9:  [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(newstr, "_e%d", dcm.echoNum);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2653:6:  [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(newstr, "_i%05d", dcm.imageNum);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2661:6:  [2] (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 string.
    	strcat (outname,"_imaginary"); //has phase map
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2664:6:  [2] (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 string.
    	strcat (outname,"_real"); //has phase map
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2667:6:  [2] (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 string.
    	strcat (outname,"_ph"); //has phase map
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2669:7:  [2] (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 string.
    		strcat (outname,"Mag"); //Philips enhanced with BOTH phase and Magnitude in single file
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2672:6:  [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(newstr, "_t%d", (int)roundf(dcm.triggerDelayTime));
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2677:6:  [2] (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 string.
    	strcat (outname,"_Raw");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2679:6:  [2] (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 string.
    	strcat (outname,"_PS");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2681:6:  [2] (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 string.
    	strcat (outname,".dcm");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2682:30:  [2] (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). Risk is low because the source is a constant string.
    if (strlen(outname) < 1) strcpy(outname, "dcm2nii_invalidName");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2711: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 baseoutname[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2713: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 appendChar[2] = {"a"};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2726:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    	char newdir[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2739:4:  [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 ch[12] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2740:13:  [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(ch,"%c",outname[pos]);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2757: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 pathoutname[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2789:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(d.patientName, "John_Doe");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2790:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(d.patientID, "ID123");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2791:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(d.accessionNumber, "ID123");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2792:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(d.imageType,"ORIGINAL");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2793:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(d.imageComments, "imgComments");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2794:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(d.studyDate, "1/1/1977");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2795:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(d.studyTime, "11:11:11");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2796:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(d.protocolName, "MPRAGE");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2797:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(d.seriesDescription, "T1_mprage");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2798:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(d.sequenceName, "T1");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2799:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(d.scanningSequence, "tfl3d1_ns");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2800:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(d.sequenceVariant, "tfl3d1_ns");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2801:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(d.manufacturersModelName, "N/A");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2806:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(opts.indirParent,"myFolder");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2807: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 niiFilenameBase[PATH_MAX] = {"/usr/myFolder/dicom.dcm"};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2809:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(niiFilename,"Example output filename: '");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2813:4:  [2] (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 string.
			strcat(niiFilename,".nhdr'");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2815:4:  [2] (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 string.
			strcat(niiFilename,".nrrd'");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2818:4:  [2] (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 string.
			strcat(niiFilename,".nii.gz'");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2820:4:  [2] (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 string.
			strcat(niiFilename,".nii'");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2847: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 fname[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2849:24:  [2] (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 string.
    if (!isSkipHeader) strcat (fname,".nii.gz");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2877: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(pHdr,&hdr, sizeof(hdr));
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2897:20:  [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 *fileGz = fopen(fname, "wb");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3093: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 blockSize[768];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3096:23:  [2] (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). Risk is low because the source is a constant string.
	if (imgsz > 1000000) strcpy(blockSize, " -b 960");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3097: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 command[768];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3101: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 newstr[256];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3105: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 newstr[256];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3144: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 fname[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3147:6:  [2] (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 string.
    	strcat (fname,".nhdr"); //nrrd or nhdr
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3149:6:  [2] (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 string.
    	strcat (fname,".nrrd"); //nrrd or nhdr
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3150: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).
	FILE *fp = fopen(fname, "w");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3155: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 rgbNoneStr[10] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3160:10:  [2] (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). Risk is low because the source is a constant string.
        	strcpy (rgbNoneStr, " none");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3216:6:  [2] (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 string.
    	strcat (fname,".raw.gz");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3217:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    	char basefname[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3364:2:  [2] (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 string.
	strcat (fname,".raw");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3365:10:  [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(fname, "wb");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3491: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 fname[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3493:5:  [2] (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 string.
    strcat (fname,".nii");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3502:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    	char command[768];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3506:10:  [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 newstr[256];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3507:10:  [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(newstr, "\" -n -f -%d > \"", opts.gzLevel);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3510:10:  [2] (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 string.
        	strcat(command, "\" -n -f > \""); //current versions of pigz (2.3) built on Windows can hang if the filename is included, presumably because it is not finding the path characters ':\'
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3512:6:  [2] (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 string.
    	strcat(command, ".gz\""); //add quotes in case spaces in filename 'pigz "c:\my dir\img.nii"'
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3531: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 *fp = fopen(fname, "wb");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3570: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 fname[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3571: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 zeroPad[PATH_MAX] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3626: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 newstr[256];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3627:2:  [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(newstr, " is%d", scale);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3882: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 niiFilenameTilt[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3884:5:  [2] (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 string.
    strcat(niiFilenameTilt,"_Tilt");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3987: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 niiFilenameTilt[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3989:5:  [2] (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 string.
    strcat(niiFilenameTilt,"_Tilt");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:4057:17:  [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(&imX32[sliceXi], &im32[sHi], nVox2D* sizeof(float)); //memcpy( dest, src, bytes)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:4085:17:  [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(&imX16[sliceXi], &im16[sHi], nVox2D* sizeof(unsigned short)); //memcpy( dest, src, bytes)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:4111:17:  [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(&imX[sliceXi], &im[sHi], nVox2D); //memcpy( dest, src, bytes)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:4120: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 niiFilenameEq[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:4122:5:  [2] (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 string.
    strcat(niiFilenameEq,"_Eq");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:4333:2:  [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(&src[0], &im[0], num * sizeof(double)); //memcpy( dest, src, bytes)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:4404: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(&imX16[sOut], &im16[sIn], nVox2D* sizeof(unsigned short)); //memcpy( dest, src, bytes)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:4406: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 niiFilenameCrop[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:4408:5:  [2] (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 string.
    strcat(niiFilenameCrop,"_Crop");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:4416: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 acqTimeBuf[64];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:4654: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(versionString, sepStart, len);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:4659: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(geVersionPrefix, &c1, 1);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:4660: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(geVersionPrefix+1, &c2, 1);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:4711: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 geVersionPrefix[2] = " ";
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:4738: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 ioptGE[3000] = "";
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:4841: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 protocolName[kDICOMStrLarge], fmriExternalInfo[kDICOMStrLarge], coilID[kDICOMStrLarge], consistencyInfo[kDICOMStrLarge], coilElements[kDICOMStrLarge], pulseSequenceDetails[kDICOMStrLarge], wipMemBlock[kDICOMStrLarge];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:5043: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 *file = fopen(imgname , "rb");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:5141: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(&imgM[0], &img[0], imgsz);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:5472: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(&imgM[(uint64_t)i*imgsz], &img[0], imgsz);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:5491: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 pathoutname[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:5523:6:  [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(&img4D[0], &imgM[0], imgsz4D);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:5529: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(&imgM[outVol * imgsz3D], &img4D[v * imgsz3D], imgsz3D);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:5668:4:  [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 pathoutnameADC[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:5670:4:  [2] (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 string.
			strcat(pathoutnameADC,"_ADC");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:5682: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 pathoutnameROI[2048] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:5684: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 append[128] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:5685: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(append,"_ROI%d",j+1);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:5741:13:  [2] (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 string.
            strcat(pathoutname,"_Tilt");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6172: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 *fp = fopen(fname, "r");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6180: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 dcmname[2048];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6211:7:  [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(fname, "r");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6240: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 *fp = fopen(fname, "rb");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6256: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 filename[768] ="";
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6355:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char buffer[BUFFSIZE];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6356: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).
    FILE *fin = fopen(src_path, "rb");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6370: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).
	FILE *fou = fopen(dst_path, "wb");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6422: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 outname[PATH_MAX] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6493: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 filename[768] ="";
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6517:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
					char outname[PATH_MAX] = {""};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6681: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 firstSeriesName[2048] = "";
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6702:17:  [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 nextSeriesName[2048] = "";
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6867: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 filename[768] ="";
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6888: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 indir[512];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6920: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 outdir[512];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6944: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 pname[512], rname[512];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7055:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(opts->pigzname,"pigz.exe");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7075:6:  [2] (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). Risk is low because the source is a constant string.
    	strcpy(opts->pigzname,".\\pigz"); //drop
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7077: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 str[PATH_MAX];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7097:47:  [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 n_pth (sizeof (pths) / sizeof (const char *))
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7098: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 exepth[PATH_MAX];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7101: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 appendChar[2] = {"a"};
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7207:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(opts->filename,"%f_%p_%t_%s");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7246: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[512];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7259: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 *fp = fopen(opts->optsname, "r");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7261: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 Setting[20],Value[255];
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7267: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).
            opts->isGz = atoi(Value);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7269:42:  [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).
            opts->isMaximize16BitRange = atoi(Value);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7271:34:  [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).
            opts->isCreateBIDS = atoi(Value);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7279: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 *fp = fopen(opts.optsname, "w");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.h:40: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 filename[512], outdir[512], indir[512], pigzname[512], optsname[512], indirParent[512], imageComments[24];
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:86: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 magic[14],original_filename[32];
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:88: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 serial_number[10];
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:90: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 isotope_name[8];
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:92: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 radiopharmaceutical[32];
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:99: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 study_type[12], patient_id[16], accession_number[16], patient_name[32], patient_sex, patient_dexterity;
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:102: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 physician_name[32], operator_name[32], study_description[32];
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:104: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 facility_name[20];
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:110: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 user_process_code[10];
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:115: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 data_units[32];
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:117: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 fill[12];
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:131: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 annotation[40];
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:146: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(fname, "rb");
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:388:2:  [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(dcm->manufacturersModelName, "%d", mhdr.system_type);
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:426: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 niiFilename[1024];
data/dcm2niix-1.0.20201102/console/nii_ortho.cpp:206: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(&inbuf[0], &outbuf[vol*bytePerVol], bytePerVol); //copy source volume
data/dcm2niix-1.0.20201102/console/nii_ortho.cpp:210:21:  [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(&outbuf[o], &inbuf[xLUT[x]+yLUT[y]+zLUT[z]], bytePerVox);
data/dcm2niix-1.0.20201102/console/tinydir.h:60: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 path[_TINYDIR_PATH_MAX];
data/dcm2niix-1.0.20201102/console/tinydir.h:61: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 name[_TINYDIR_FILENAME_MAX];
data/dcm2niix-1.0.20201102/console/tinydir.h:73: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 path[_TINYDIR_PATH_MAX];
data/dcm2niix-1.0.20201102/console/tinydir.h:137:2:  [2] (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 string.
	strcat(dir->path, "\\*");
data/dcm2niix-1.0.20201102/console/tinydir.h:401:2:  [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(file, &dir->_files[i], sizeof(tinydir_file));
data/dcm2niix-1.0.20201102/console/tinydir.h:409: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 path[_TINYDIR_PATH_MAX];
data/dcm2niix-1.0.20201102/console/ujpeg.cpp:218: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(argv[1], "rb");
data/dcm2niix-1.0.20201102/console/ujpeg.cpp:238: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((argc > 2) ? argv[2] : (njIsColor() ? "nanojpeg_out.ppm" : "nanojpeg_out.pgm"), "wb");
data/dcm2niix-1.0.20201102/console/ujpeg.cpp:274:24:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    #define njCopyMem  memcpy
data/dcm2niix-1.0.20201102/console/ujpeg.cpp:324:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char qtab[4][64];
data/dcm2niix-1.0.20201102/console/ujpeg.cpp:334:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char njZZ[64] = { 0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18,
data/dcm2niix-1.0.20201102/console/ujpeg.cpp:592: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.
    static unsigned char counts[16];
data/dcm2niix-1.0.20201102/console/charls/interface.cpp:81:20:  [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(error.what()) < ErrorMessageSize);
data/dcm2niix-1.0.20201102/console/charls/processline.h:263:89:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                message << "No more bytes available in input buffer, still needing " << read;
data/dcm2niix-1.0.20201102/console/charls/processline.h:267:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            bytesToRead -= read;
data/dcm2niix-1.0.20201102/console/main_console.cpp:120:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(opts.pigzname) > 0)
data/dcm2niix-1.0.20201102/console/main_console.cpp:145:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(opts.pigzname) > 0)
data/dcm2niix-1.0.20201102/console/main_console.cpp:200:18:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((ch = fgetc(pipe)) != EOF) {
data/dcm2niix-1.0.20201102/console/main_console.cpp:275:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if ((strlen(argv[i]) > 1) && (argv[i][0] == '-')) { //command
data/dcm2niix-1.0.20201102/console/main_console.cpp:315: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).
                if (strlen(argv[i]) < 3) { //"-b y"
data/dcm2niix-1.0.20201102/console/main_console.cpp:474:18:  [1] (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). Risk is low because the source is a constant character.
                	strcpy(opts.pigzname,"");
data/dcm2niix-1.0.20201102/console/main_console.cpp:488:18:  [1] (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). Risk is low because the source is a constant character.
                	strcpy(opts.pigzname,""); //force use of internal compression instead of pigz
data/dcm2niix-1.0.20201102/console/main_console.cpp:522:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ((opts.isGz) && (opts.dirSearchDepth < 1) && (strlen(opts.pigzname)>0)) {
data/dcm2niix-1.0.20201102/console/main_console.cpp:523:6:  [1] (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). Risk is low because the source is a constant character.
    	strcpy(opts.pigzname,"");
data/dcm2niix-1.0.20201102/console/main_console.cpp:543:9:  [1] (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). Risk is low because the source is a constant character.
        strcpy(opts.outdir,"");//no input supplied
data/dcm2niix-1.0.20201102/console/miniz.c:3489:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  const mz_uint filename_len = (mz_uint)strlen(pFilename);
data/dcm2niix-1.0.20201102/console/miniz.c:3511:14:  [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).
  name_len = strlen(pName); if (name_len > 0xFFFF) return -1;
data/dcm2niix-1.0.20201102/console/miniz.c:3512:28:  [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).
  comment_len = pComment ? strlen(pComment) : 0; if (comment_len > 0xFFFF) return -1;
data/dcm2niix-1.0.20201102/console/miniz.c:4305:23:  [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).
  archive_name_size = strlen(pArchive_name);
data/dcm2niix-1.0.20201102/console/miniz.c:4440:23:  [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).
  archive_name_size = strlen(pArchive_name);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:671:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(d.imageComments) > 0)
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:709:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.patientName, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:710:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.patientID, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:711:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.accessionNumber, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:712:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.imageType,"");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:713:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.imageComments, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:714:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.imageBaseName, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:715:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.phaseEncodingDirectionDisplayedUIH, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:716:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.studyDate, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:717:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.studyTime, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:718:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.protocolName, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:719:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.seriesDescription, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:720:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.sequenceName, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:721:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.scanningSequence, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:722:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.sequenceVariant, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:723:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.manufacturersModelName, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:724:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.institutionalDepartmentName, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:725:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.procedureStepDescription, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:726:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.institutionName, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:727:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.referringPhysicianName, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:728:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.institutionAddress, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:729:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.deviceSerialNumber, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:730:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.softwareVersions, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:731:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.stationName, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:732:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.scanOptions, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:734:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.seriesInstanceUID, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:735:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.instanceUID, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:736:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.studyID, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:737:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.studyInstanceUID, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:738:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.bodyPartExamined,"");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:739:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.coilName, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:740:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.coilElements, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:741:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.radiopharmaceutical, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:855:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.patientBirthDate, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:856:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.patientAge, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:881:18:  [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 len = strlen(lStr);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:896:18:  [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 len = strlen(lStr);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:911:18:  [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 len = strlen(lStr);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1589:19:  [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 lLength = strlen(lOut);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1658:1:  [1] (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). Risk is low because the source is a constant character.
strcpy(d.protocolName, ""); //erase dummy with empty
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1659:1:  [1] (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). Risk is low because the source is a constant character.
strcpy(d.seriesDescription, ""); //erase dummy with empty
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1660:1:  [1] (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). Risk is low because the source is a constant character.
strcpy(d.sequenceName, ""); //erase dummy with empty
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1661:1:  [1] (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). Risk is low because the source is a constant character.
strcpy(d.scanningSequence, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1762:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(buff) < 1)
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1819:14:  [1] (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). Risk is low because the source is a constant character.
            	strcpy(Comment[i], "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1887:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            	if ((strlen(Comment[3]) >= 10) && (strlen(Comment[5]) >= 8)) {
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1887:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            	if ((strlen(Comment[3]) >= 10) && (strlen(Comment[5]) >= 8)) {
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:1955:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(buff) < 24) { //empty line
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:3998:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(pathParent,filename, maxLen-1);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:4057:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.protocolName, ""); //erase dummy with empty
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:4058:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.protocolName, ""); //erase dummy with empty
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:4059:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.seriesDescription, ""); //erase dummy with empty
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:4060:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.sequenceName, ""); //erase dummy with empty
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:4968:76:  [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).
            	d.instanceUidCrc = mz_crc32X((unsigned char*) &d.instanceUID, strlen(d.instanceUID));
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:4973:17:  [1] (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). Risk is low because the source is a constant character.
                strcpy(transferSyntax, "");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5037: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).
                int slen = (int) strlen(impTxt);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5047: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).
                int slen = (int) strlen(saeTxt);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5056:27:  [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).
            	bool is1st = strlen(d.imageType) == 0;
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5059:30:  [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).
                slen = (int) strlen(d.imageType);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5198:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                if (((int) strlen(acqContrast) > 8) && (strstr(acqContrast, "DIFFUSION") != NULL))
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5227: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).
                int slen = (int) strlen(aotTxt);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5234: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).
                int slen = (int) strlen(anonTxt);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5240: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).
                if (strlen(d.patientID) > 1) break;
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5287:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            	int slen = (int) strlen(d.softwareVersions);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5496:80:  [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).
            	d.seriesUidCrc = mz_crc32X((unsigned char*) &d.seriesInstanceUID, strlen(d.seriesInstanceUID));
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5871: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).
                if (strlen(d.coilName) < 1) break;
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5872:69:  [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).
                d.coilCrc = mz_crc32X((unsigned char*) &d.coilName, strlen(d.coilName));
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5919:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    if (strlen(d.coilName) < 1) break;
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:5926:73:  [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).
                    d.coilCrc = mz_crc32X((unsigned char*) &d.coilName, strlen(d.coilName));
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6692:17:  [1] (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). Risk is low because the source is a constant character.
                strcpy(tagStr,"");
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6695: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).
                if (strlen(tagStr) > 1) {
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6696:43:  [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).
                	for (size_t pos = 0; pos<strlen(tagStr); pos ++)
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6746: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).
    if ((strlen(acquisitionDateTimeTxt) > (kYYYYMMDDlen+5)) && (!isFloatDiff(d.acquisitionTime, 0.0f)) && (!isFloatDiff(d.acquisitionDate, 0.0f)) ) {
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6754:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		int timeLen = (int)strlen(acquisitionDateTimeTxt) - kYYYYMMDDlen;
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6755:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(acquisitionTimeTxt, &acquisitionDateTimeTxt[kYYYYMMDDlen], timeLen);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6844:82:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ((d.manufacturer == kMANUFACTURER_GE) && (d.modality == kMODALITY_MR) && (strlen(d.seriesDescription) > 1)) //GE uses a generic session name here: do not overwrite kProtocolNameGE
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6846: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).
    if ((strlen(d.protocolName) < 1) && (strlen(d.seriesDescription) > 1))
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6846: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).
    if ((strlen(d.protocolName) < 1) && (strlen(d.seriesDescription) > 1))
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6848:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((strlen(d.protocolName) > 1) && (isMoCo))
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6850: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).
    if ((strlen(d.protocolName) < 1) && (strlen(d.sequenceName) > 1) && (d.manufacturer != kMANUFACTURER_SIEMENS))
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:6850: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).
    if ((strlen(d.protocolName) < 1) && (strlen(d.sequenceName) > 1) && (d.manufacturer != kMANUFACTURER_SIEMENS))
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:7116:64:  [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).
		d.seriesUidCrc = mz_crc32X((unsigned char*) &d.protocolName, strlen(d.protocolName));
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:7123:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ((d.manufacturer == kMANUFACTURER_SIEMENS) && (strlen(seriesTimeTxt) > 1) && (d.isXA10A) && (d.xyzDim[3] == 1) && (d.xyzDim[4] < 2)) {
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:7128:63:  [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).
		d.seriesUidCrc = mz_crc32X((unsigned char*) &seriesTimeTxt, strlen(seriesTimeTxt));
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:7135:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			int len = strlen(txt);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:7137: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).
			len = strlen(txt);
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:7167:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(d.studyDate) < kDICOMStr) {
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:7168:7:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    		strncat(d.seriesInstanceUID, d.studyTime, kDICOMStr-strlen(d.studyDate));
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:7168:59:  [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).
    		strncat(d.seriesInstanceUID, d.studyTime, kDICOMStr-strlen(d.studyDate));
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:7170:69:  [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).
		d.seriesUidCrc = mz_crc32X((unsigned char*) &d.seriesInstanceUID, strlen(d.seriesInstanceUID));
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:7190:108:  [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).
    	d.dimensionIndexValues[MAX_NUMBER_OF_DIMENSIONS-1] = mz_crc32X((unsigned char*) &d.seriesInstanceUID, strlen(d.seriesInstanceUID));
data/dcm2niix-1.0.20201102/console/nii_dicom.cpp:7198:66:  [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).
		d.seriesNum = mz_crc32X((unsigned char*) &d.seriesInstanceUID, strlen(d.seriesInstanceUID));
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:98:9:  [1] (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). Risk is low because the source is a constant character.
        strcpy(path,"");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:101:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(path) == 0) { //file name did not specify path, assume relative path and return current working directory
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:111:17:  [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 len = strlen(path) - 1;
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:154: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).
		if ((NULL == pathname) || (0 == strlen(pathname)))
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:172: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).
		if ((NULL == pathname) || (0 == strlen(pathname)))
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:443:56:  [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).
	char *keyPos = (char *)memmem(buffer, remLength, key, strlen(key));
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:446:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int i = (int)strlen(key);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:457:56:  [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).
	char *keyPos = (char *)memmem(buffer, remLength, key, strlen(key));
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:459:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int i = (int)strlen(key);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:469:56:  [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).
	char *keyPos = (char *)memmem(buffer, remLength, key, strlen(key));
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:472:2:  [1] (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). Risk is low because the source is a constant character.
	strcpy(str, "");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:475:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int i = (int)strlen(key);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:483:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(str) < 1) return NAN;
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:488:56:  [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).
	char *keyPos = (char *)memmem(buffer, remLength, key, strlen(key));
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:491:2:  [1] (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). Risk is low because the source is a constant character.
	strcpy(str, "");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:494:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int i = (int)strlen(key);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:502:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(str) < 1) return 0.0;
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:508:2:  [1] (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). Risk is low because the source is a constant character.
	strcpy(outStr, "");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:509:56:  [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).
	char *keyPos = (char *)memmem(buffer, remLength, key, strlen(key));
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:511:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int i = (int)strlen(key);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:591:3:  [1] (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). Risk is low because the source is a constant character.
 	strcpy(coilID, "");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:592:3:  [1] (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). Risk is low because the source is a constant character.
 	strcpy(consistencyInfo, "");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:593:3:  [1] (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). Risk is low because the source is a constant character.
 	strcpy(coilElements, "");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:594:3:  [1] (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). Risk is low because the source is a constant character.
 	strcpy(pulseSequenceDetails, "");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:595:3:  [1] (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). Risk is low because the source is a constant character.
 	strcpy(fmriExternalInfo, "");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:596:3:  [1] (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). Risk is low because the source is a constant character.
 	strcpy(wipMemBlock, "");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:597:3:  [1] (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). Risk is low because the source is a constant character.
 	strcpy(protocolName, "");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:621:67:  [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).
	char *keyPos = (char *)memmem(bufferTrim, csaLengthTrim, keyStr, strlen(keyStr));
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:631:70:  [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).
		char *keyPosEnd = (char *)memmem(keyPos, csaLengthTrim, keyStrEnd, strlen(keyStrEnd));
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:687:72:  [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).
		char *keyPosTi = (char *)memmem(keyPos, csaLengthTrim, keyStrTiFree, strlen(keyStrTiFree));
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:700:74:  [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).
		char *keyPosFree = (char *)memmem(keyPos, csaLengthTrim, keyStrAlFree, strlen(keyStrAlFree));
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:715:68:  [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).
		keyPosFree = (char *)memmem(keyPos, csaLengthTrim, keyStrAdFree, strlen(keyStrAdFree));
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:718:69:  [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).
			keyPosFree = (char *)memmem(keyPos, csaLengthTrim, keyStrAdFree, strlen(keyStrAdFree));
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:897:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(sVal) < 1) return;
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:901:22:  [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).
	for (int i = 0; i < strlen(sVal); i ++) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:964:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(d->protocolName) > 0) return;
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1099:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(d.patientBirthDate) == 8) { //DICOM DA YYYYMMDD -> ISO 8601 "YYYY-MM-DD"
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1124:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(d.imageType) > 0) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1127: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).
		for (size_t i = 0; i < strlen(d.imageType); i++) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1465:3:  [1] (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). Risk is low because the source is a constant character.
		strcpy(d.coilName, "");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:1469:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(d.protocolName) < 1)  //insert protocol name if it exists in CSA but not DICOM header: https://github.com/nipy/heudiconv/issues/80
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2401:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int len = strlen(cString);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2433:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(opts.outdir) > 0) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2458: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).
		inname[strlen(inname) - 4] = '\0';
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2462:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(inname) < 1) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2466:30:  [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).
    for (size_t pos = 0; pos<strlen(inname); pos ++)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2477:18:  [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).
    while (pos < strlen(inname)) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2480:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(&newstr[0], &inname[0] + start, pos - start);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2486:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if (pos < strlen(inname)) f = toupper(inname[pos]);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2533: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).
                if (strlen(dcm.instanceUID) > 0)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2538: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).
                if (strlen(dcm.protocolName) < 1)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2599: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).
                if ((pos<strlen(inname)) && (toupper(inname[pos+1]) == 'S')) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2606: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).
                if ((pos<strlen(inname)) && (toupper(inname[pos+1]) == 'R')) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2614: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).
                if ((pos<strlen(inname)) && (toupper(inname[pos+1]) == 'Y') && (dcm.rawDataRunNumber >= 0)) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2627:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(&newstr[0], &inname[0] + start, pos - start);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2682:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(outname) < 1) strcpy(outname, "dcm2nii_invalidName");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2692:30:  [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).
    for (size_t pos = 0; pos<strlen(outname); pos ++)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2699:30:  [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).
    for (size_t pos = 0; pos<strlen(outname); pos ++)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2705: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).
	for (int pos = 0; pos<strlen(outname); pos ++) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2715: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).
    if ((strlen(pth) > 0) && (pth[strlen(pth)-1] != kPathSeparator) && (outname[0] != kPathSeparator))
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2715: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).
    if ((strlen(pth) > 0) && (pth[strlen(pth)-1] != kPathSeparator) && (outname[0] != kPathSeparator))
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2729:32:  [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).
    	for (size_t pos = 0; pos< strlen(outname); pos ++) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2745:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len = strlen(outname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2802:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.procedureStepDescription, "");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2803:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.seriesInstanceUID, "");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2804:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.studyInstanceUID, "");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2805:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(d.bodyPartExamined,"");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2938:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *start = niiFilename + strlen(niiFilename);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2972:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(data.manufacturersModelName) > 0)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2974:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(data.imageType) > 0)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2978:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(data.seriesDescription) > 0)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2980:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(data.sequenceName) > 0)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2982:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(data.protocolName) > 0)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2984:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(data.studyDate) >= 8 && strcmp(data.studyDate,"00000000") != 0)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:2986:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(data.studyTime) > 0 && strncmp(data.studyTime,"000000",6) != 0)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3071:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(data.patientID) > 0)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3073:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(data.patientName) > 0)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3075:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(data.patientBirthDate) >= 8 && strcmp(data.patientBirthDate,"00000000") != 0)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3077:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(data.patientAge) > 0 && strcmp(data.patientAge,"000Y") != 0)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3085:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(data.imageComments) > 0)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3094:2:  [1] (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). Risk is low because the source is a constant character.
	strcpy(blockSize, "");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3098:2:  [1] (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). Risk is low because the source is a constant character.
	strcpy(command, "\"" );
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3110:2:  [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(command, "\""); //add quotes in case spaces in filename 'pigz "c:\my dir\img.nii"'
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3272:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(d.manufacturersModelName) > 0)  fprintf(fp,"DICOM_0008_1090_ManufacturerModelName:=%s\n",d.manufacturersModelName);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3273:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(d.scanOptions) > 0)  fprintf(fp,"DICOM_0018_0022_ScanOptions:=%s\n",d.scanOptions);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3282:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(d.softwareVersions) > 0)  fprintf(fp,"DICOM_0018_1020_SoftwareVersions:=%s\n",d.softwareVersions);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3352:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if  (strlen(opts.pigzname)  < 1) { //internal compression
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3357: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).
    if  (strlen(opts.pigzname)  < 1) { //internal compression
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3479:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if  ((opts.isGz) &&  (strlen(opts.pigzname)  < 1) &&  ((imgsz+hdr.vox_offset) >=  kMaxGz) ) { //use internal compressor
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3483:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		} else if  ((opts.isGz) &&  (strlen(opts.pigzname)  < 1) &&  ((imgsz+hdr.vox_offset) <  kMaxGz) ) { //use internal compressor
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3498: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).
	if ((opts.isGz) && (opts.isPipedGz) && (strlen(opts.pigzname)  > 0) ) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3503:6:  [1] (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). Risk is low because the source is a constant character.
    	strcpy(command, "\"" );
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3540: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).
    if ((opts.isGz) &&  (strlen(opts.pigzname)  > 0) ) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3628:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((strlen(newstr)+strlen(hdr->descrip)) < 80)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:3628:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((strlen(newstr)+strlen(hdr->descrip)) < 80)
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:4499:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((strlen(d->seriesDescription) > 0) && (strstr(d->seriesDescription, "SBRef") != NULL))  return; //fine: single-band calibration data, the slice timing WILL exceed the TR
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:5132:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(opts.imageComments) > 0) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:5496:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(pathoutname) <1) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:5538:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(dcmList[dcmSort[0].indx].protocolName) < 1) //beware: tProtocolName can vary within a series "t1+AF8-mpr+AF8-ns+AF8-sag+AF8-p2+AF8-iso" vs "T1_mprage_ns_sag_p2_iso 1.0mm_192"
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6024:104:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((d1.manufacturer == kMANUFACTURER_SIEMENS) && (strcmp(d1.protocolName, d2.protocolName) == 0) && (strlen(d1.softwareVersions) > 4) && (strlen(d1.sequenceName) > 4) && (strlen(d2.sequenceName) > 4))  {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6024:141:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((d1.manufacturer == kMANUFACTURER_SIEMENS) && (strcmp(d1.protocolName, d2.protocolName) == 0) && (strlen(d1.softwareVersions) > 4) && (strlen(d1.sequenceName) > 4) && (strlen(d2.sequenceName) > 4))  {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6024:174:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((d1.manufacturer == kMANUFACTURER_SIEMENS) && (strcmp(d1.protocolName, d2.protocolName) == 0) && (strlen(d1.softwareVersions) > 4) && (strlen(d1.sequenceName) > 4) && (strlen(d2.sequenceName) > 4))  {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6044: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).
    if ((strlen(d1.studyInstanceUID)> 1) && (strlen(d2.studyInstanceUID)> 1)) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6044:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ((strlen(d1.studyInstanceUID)> 1) && (strlen(d2.studyInstanceUID)> 1)) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6102: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).
    if ((strlen(d1.protocolName) < 1) && (strlen(d2.protocolName) < 1)) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6102:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ((strlen(d1.protocolName) < 1) && (strlen(d2.protocolName) < 1)) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6157:55:  [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).
    nameList.str[nameList.numItems]  = (char *)malloc(strlen(fname)+1);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6182:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		int sz = strlen(dcmname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6213:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		int sz = strlen(dcmname);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6216:53:  [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).
		nameList.str[nameList.numItems]  = (char *)malloc(strlen(dcmname)+1);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6264:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        else if ((strlen(file.name) < 1) || (file.name[0]=='.'))
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6266:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        else if ((strlen(file.name) == 8) && (strcicmp(file.name, "DICOMDIR") == 0))
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6270:69:  [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).
                nameList->str[nameList->numItems]  = (char *)malloc(strlen(filename)+1);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6336: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).
    nameList.str[0]  = (char *)malloc(strlen(fnm)+1);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6411: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).
        } else if (file.is_reg && strlen(file.name) > 0 && file.name[0] != '.' && strcicmp(file.name,"DICOMDIR") != 0 && isDICOMfile(sourcePathPtr)) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6503:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        else if ((strlen(file.name) < 1) || (file.name[0]=='.'))
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6505:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        else if ((strlen(file.name) == 8) && (strcicmp(file.name, "DICOMDIR") == 0))
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6636:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (isDcmExt) opts->filename[strlen(opts->filename) - 4] = 0; // "%s_%r.dcm" -> "%s_%r"
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6884:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(opts->indir) < 1) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:6902:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(opts->outdir) < 1) {
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7022:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(searchpath) <= 0) return 0;
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7028:9:  [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(beg);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7036:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	   strncpy(pth, beg, end - beg);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7042:27:  [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.
	if (pth[len - 1] != '/') strcat(pth, "/");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7043:2:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
	strncat(pth, exe, PATH_MAX - len);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7047:14:  [1] (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). Risk is low because the source is a constant character.
	if (!found) strcpy(pth,"");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7064:9:  [1] (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). Risk is low because the source is a constant character.
        strcpy(opts->pigzname,"");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7072:9:  [1] (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). Risk is low because the source is a constant character.
        strcpy(opts->pigzname,"");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7103:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (exepth[strlen(exepth)-1] != kPathSeparator) strcat (exepth,appendChar);
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7144:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(opts->pigzname,"");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7158:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(opts->indir,"");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7159:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(opts->outdir,"");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7160:5:  [1] (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). Risk is low because the source is a constant character.
    strcpy(opts->imageComments,"");
data/dcm2niix-1.0.20201102/console/nii_dicom_batch.cpp:7223:66:  [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).
	RegSetValueExA(hKey,"filename",0, REG_SZ,(LPBYTE)opts.filename, strlen(opts.filename)+1);
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:51:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int len = (int)strlen(cString);
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:349:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(dcm->patientName, mhdr.patient_name, 32);
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:350:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(dcm->patientID, mhdr.patient_id, 16);
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:351:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(dcm->accessionNumber, mhdr.accession_number, 16);
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:352:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(dcm->seriesDescription, mhdr.study_description, 32);
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:353:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(dcm->protocolName, mhdr.study_type, 12);
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:354:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(dcm->imageComments, mhdr.isotope_name, 8);
data/dcm2niix-1.0.20201102/console/nii_foreign.cpp:355:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(dcm->procedureStepDescription, mhdr.radiopharmaceutical, 32);
data/dcm2niix-1.0.20201102/console/tinydir.h:115: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).
	if (dir == NULL || path == NULL || strlen(path) == 0)
data/dcm2niix-1.0.20201102/console/tinydir.h:120:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(path) + _TINYDIR_PATH_EXTRA >= _TINYDIR_PATH_MAX)
data/dcm2niix-1.0.20201102/console/tinydir.h:139:12:  [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).
	dir->path[strlen(dir->path) - 2] = '\0';
data/dcm2niix-1.0.20201102/console/tinydir.h:315:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(dir->path) +
data/dcm2niix-1.0.20201102/console/tinydir.h:316:3:  [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).
		strlen(
data/dcm2niix-1.0.20201102/console/tinydir.h:329:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(
data/dcm2niix-1.0.20201102/console/tinydir.h:342:2:  [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(file->path, "/");
data/dcm2niix-1.0.20201102/console/tinydir.h:352:2:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
	strncat(file->path, file->name, _TINYDIR_FILENAME_MAX);

ANALYSIS SUMMARY:

Hits = 881
Lines analyzed = 30356 in approximately 1.04 seconds (29276 lines/second)
Physical Source Lines of Code (SLOC) = 22675
Hits@level = [0] 378 [1] 260 [2] 407 [3]   5 [4] 209 [5]   0
Hits@level+ = [0+] 1259 [1+] 881 [2+] 621 [3+] 214 [4+] 209 [5+]   0
Hits/KSLOC@level+ = [0+] 55.5237 [1+] 38.8534 [2+] 27.387 [3+] 9.43771 [4+] 9.2172 [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.