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/ctsim-6.0.2/include/ctndicom.h Examining data/ctsim-6.0.2/include/mpiworld.h Examining data/ctsim-6.0.2/include/backprojectors.h Examining data/ctsim-6.0.2/include/fourier.h Examining data/ctsim-6.0.2/include/phantom.h Examining data/ctsim-6.0.2/include/transformmatrix.h Examining data/ctsim-6.0.2/include/plotfile.h Examining data/ctsim-6.0.2/include/ct.h Examining data/ctsim-6.0.2/include/pol.h Examining data/ctsim-6.0.2/include/sgp.h Examining data/ctsim-6.0.2/include/filter.h Examining data/ctsim-6.0.2/include/hashtable.h Examining data/ctsim-6.0.2/include/ctglobals.h Examining data/ctsim-6.0.2/include/imagefile.h Examining data/ctsim-6.0.2/include/array2d.h Examining data/ctsim-6.0.2/include/fnetorderstream.h Examining data/ctsim-6.0.2/include/reconstruct.h Examining data/ctsim-6.0.2/include/scanner.h Examining data/ctsim-6.0.2/include/array2dfile.h Examining data/ctsim-6.0.2/include/interpolator.h Examining data/ctsim-6.0.2/include/trace.h Examining data/ctsim-6.0.2/include/ezplot.h Examining data/ctsim-6.0.2/include/procsignal.h Examining data/ctsim-6.0.2/include/msvc_compat.h Examining data/ctsim-6.0.2/include/nographics.h Examining data/ctsim-6.0.2/include/timer.h Examining data/ctsim-6.0.2/include/ctsupport.h Examining data/ctsim-6.0.2/include/projections.h Examining data/ctsim-6.0.2/libctsim/ctndicom.cpp Examining data/ctsim-6.0.2/libctsim/phantom.cpp Examining data/ctsim-6.0.2/libctsim/fourier.cpp Examining data/ctsim-6.0.2/libctsim/backprojectors.cpp Examining data/ctsim-6.0.2/libctsim/reconstruct.cpp Examining data/ctsim-6.0.2/libctsim/imagefile.cpp Examining data/ctsim-6.0.2/libctsim/array2dfile.cpp Examining data/ctsim-6.0.2/libctsim/procsignal.cpp Examining data/ctsim-6.0.2/libctsim/projections.cpp Examining data/ctsim-6.0.2/libctsim/scanner.cpp Examining data/ctsim-6.0.2/libctsim/trace.cpp Examining data/ctsim-6.0.2/libctsim/filter.cpp Examining data/ctsim-6.0.2/helical/dynphm.c Examining data/ctsim-6.0.2/libctsupport/plotfile.cpp Examining data/ctsim-6.0.2/libctsupport/strfuncs.cpp Examining data/ctsim-6.0.2/libctsupport/interpolator.cpp Examining data/ctsim-6.0.2/libctsupport/hashtable.cpp Examining data/ctsim-6.0.2/libctsupport/syserror.cpp Examining data/ctsim-6.0.2/libctsupport/clip.cpp Examining data/ctsim-6.0.2/libctsupport/globalvars.cpp Examining data/ctsim-6.0.2/libctsupport/consoleio.cpp Examining data/ctsim-6.0.2/libctsupport/mathfuncs.cpp Examining data/ctsim-6.0.2/libctsupport/xform.cpp Examining data/ctsim-6.0.2/libctsupport/fnetorderstream.cpp Examining data/ctsim-6.0.2/libctsupport/msvc.cpp Examining data/ctsim-6.0.2/libctgraphics/ezset.cpp Examining data/ctsim-6.0.2/libctgraphics/ezplot.cpp Examining data/ctsim-6.0.2/libctgraphics/sgp.cpp Examining data/ctsim-6.0.2/libctgraphics/pol.cpp Examining data/ctsim-6.0.2/libctgraphics/ezsupport.cpp Examining data/ctsim-6.0.2/libctgraphics/bresenham.cpp Examining data/ctsim-6.0.2/libctgraphics/transformmatrix.cpp Examining data/ctsim-6.0.2/tools/if1.cpp Examining data/ctsim-6.0.2/tools/phm2if.cpp Examining data/ctsim-6.0.2/tools/nographics.cpp Examining data/ctsim-6.0.2/tools/ifinfo.cpp Examining data/ctsim-6.0.2/tools/pjHinterp.cpp Examining data/ctsim-6.0.2/tools/pjrec.cpp Examining data/ctsim-6.0.2/tools/phm2helix.cpp Examining data/ctsim-6.0.2/tools/pj2if.cpp Examining data/ctsim-6.0.2/tools/ctsimtext.cpp Examining data/ctsim-6.0.2/tools/linogram.cpp Examining data/ctsim-6.0.2/tools/if2.cpp Examining data/ctsim-6.0.2/tools/pjinfo.cpp Examining data/ctsim-6.0.2/tools/ifexport.cpp Examining data/ctsim-6.0.2/tools/phm2pj.cpp Examining data/ctsim-6.0.2/tools/mpiworld.cpp Examining data/ctsim-6.0.2/getopt/getopt.c Examining data/ctsim-6.0.2/getopt/getopt.h Examining data/ctsim-6.0.2/getopt/getopt1.c Examining data/ctsim-6.0.2/src/graph3dview.h Examining data/ctsim-6.0.2/src/threadproj.cpp Examining data/ctsim-6.0.2/src/views.h Examining data/ctsim-6.0.2/src/docs.cpp Examining data/ctsim-6.0.2/src/threadraster.cpp Examining data/ctsim-6.0.2/src/backgroundmgr.h Examining data/ctsim-6.0.2/src/threadrecon.cpp Examining data/ctsim-6.0.2/src/docs.h Examining data/ctsim-6.0.2/src/views.cpp Examining data/ctsim-6.0.2/src/dlgprojections.h Examining data/ctsim-6.0.2/src/ctsim.cpp Examining data/ctsim-6.0.2/src/backgroundmgr.cpp Examining data/ctsim-6.0.2/src/graph3dview.cpp Examining data/ctsim-6.0.2/src/backgroundsupr.h Examining data/ctsim-6.0.2/src/threadproj.h Examining data/ctsim-6.0.2/src/dlgreconstruct.h Examining data/ctsim-6.0.2/src/threadrecon.h Examining data/ctsim-6.0.2/src/dialogs.h Examining data/ctsim-6.0.2/src/dlgprojections.cpp Examining data/ctsim-6.0.2/src/dlgezplot.cpp Examining data/ctsim-6.0.2/src/dlgreconstruct.cpp Examining data/ctsim-6.0.2/src/dlgezplot.h Examining data/ctsim-6.0.2/src/ctsim-map.h Examining data/ctsim-6.0.2/src/tips.cpp Examining data/ctsim-6.0.2/src/dialogs.cpp Examining data/ctsim-6.0.2/src/backgroundsupr.cpp Examining data/ctsim-6.0.2/src/ctsim.h Examining data/ctsim-6.0.2/src/threadraster.h Examining data/ctsim-6.0.2/src/tips.h FINAL RESULTS: data/ctsim-6.0.2/libctsupport/strfuncs.cpp:155:3: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. gets (str); data/ctsim-6.0.2/libctsupport/strfuncs.cpp:157:3: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. gets (clist); data/ctsim-6.0.2/helical/dynphm.c:19:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename, "%s", argv[3]); data/ctsim-6.0.2/include/msvc_compat.h:37: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. #define snprintf _snprintf data/ctsim-6.0.2/include/msvc_compat.h:37:20: [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. #define snprintf _snprintf data/ctsim-6.0.2/include/msvc_compat.h:38:11: [4] (format) vsnprintf: 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. #define vsnprintf _vsnprintf data/ctsim-6.0.2/libctgraphics/ezplot.cpp:27:5: [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 snprintf (char *, size_t, const char*, ...); data/ctsim-6.0.2/libctgraphics/ezplot.cpp:741:5: [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. snprintf (s, sizeof(s), y_numfmt, ymin); data/ctsim-6.0.2/libctgraphics/ezplot.cpp:743:5: [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. snprintf (s, sizeof(s), y_numfmt, ymax); data/ctsim-6.0.2/libctgraphics/ezplot.cpp:1019:9: [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. snprintf (str, sizeof(str), x_numfmt, xgw_min + xw_tickinc * i); data/ctsim-6.0.2/libctgraphics/ezplot.cpp:1095:9: [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. snprintf (str, sizeof(str), y_numfmt, ygw_min + yw_tickinc * i); data/ctsim-6.0.2/libctgraphics/ezplot.cpp:1299:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (fmtstr, "%s%d%s%d%s", "%", wid, ".", frac, "g"); data/ctsim-6.0.2/libctgraphics/ezplot.cpp:1316:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (fmtstr, "%s%d%s%d%s", "%", wid, ".", frac, "f"); data/ctsim-6.0.2/libctgraphics/pol.cpp:167: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 (str, token.tokstr); data/ctsim-6.0.2/libctgraphics/pol.cpp:187: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 (str, token.tokstr); data/ctsim-6.0.2/libctsim/scanner.cpp:563:3: [4] (format) vsnprintf: 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. vsnprintf (szValue, sizeof(szValue), fmt, args); data/ctsim-6.0.2/libctsupport/syserror.cpp:127:3: [4] (format) vsnprintf: 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. vsnprintf (errStr, sizeof(errStr), msg, arg); data/ctsim-6.0.2/libctsupport/syserror.cpp:129:3: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf (errStr, msg, arg); data/ctsim-6.0.2/tools/ctsimtext.cpp:302: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 (pszWisdom, pszHome); data/ctsim-6.0.2/tools/ctsimtext.cpp:304: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(pszWisdom+nHome+1,szFileBase); data/ctsim-6.0.2/tools/mpiworld.cpp:76: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 (buf, str.c_str()); data/ctsim-6.0.2/tools/phm2helix.cpp:278:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(extcommand, "%s %d %d %s", opt_PhmProg.c_str(), 0, opt_nview, opt_PhmFileName.c_str() ); data/ctsim-6.0.2/tools/phm2helix.cpp:280:19: [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. stat = system( extcommand ); data/ctsim-6.0.2/tools/phm2helix.cpp:304:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(extcommand, "%s %d %d %s", data/ctsim-6.0.2/tools/phm2helix.cpp:307:24: [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. stat = system( extcommand ); data/ctsim-6.0.2/getopt/getopt.c:222:9: [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. #ifndef getenv data/ctsim-6.0.2/getopt/getopt.c:223:14: [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. extern char *getenv (); data/ctsim-6.0.2/getopt/getopt.c:415:21: [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. posixly_correct = getenv ("POSIXLY_CORRECT"); data/ctsim-6.0.2/getopt/getopt.c:985:1: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt (argc, argv, optstring) data/ctsim-6.0.2/getopt/getopt.c:1016:11: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt (argc, argv, "abc:d:0123456789"); data/ctsim-6.0.2/getopt/getopt.h:138:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt (int __argc, char *const *__argv, const char *__shortopts); data/ctsim-6.0.2/getopt/getopt.h:144:12: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt_long (int argc, char *const *argv, const char *shortopts, data/ctsim-6.0.2/getopt/getopt.h:157:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt (); data/ctsim-6.0.2/getopt/getopt.h:159:12: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt_long (int argc, char *const *argv, const char *shortopts, data/ctsim-6.0.2/getopt/getopt1.c:67:1: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt_long (argc, argv, options, long_options, opt_index) data/ctsim-6.0.2/getopt/getopt1.c:123:11: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long (argc, argv, "abc:d:0123456789", data/ctsim-6.0.2/tools/ctsimtext.cpp:293:31: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char* const pszHome = getenv("HOME"); data/ctsim-6.0.2/tools/if1.cpp:80:15: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int c = getopt_long (argc, argv, "", my_options, NULL); data/ctsim-6.0.2/tools/if2.cpp:93:13: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int c = getopt_long (argc, argv, "", my_options, NULL); data/ctsim-6.0.2/tools/ifexport.cpp:133:15: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int c = getopt_long (argc, argv, "", my_options, NULL); data/ctsim-6.0.2/tools/ifinfo.cpp:82:15: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int c = getopt_long (argc, argv, "", my_options, NULL); data/ctsim-6.0.2/tools/linogram.cpp:72:15: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int c = getopt_long (argc, argv, "", my_options, NULL); data/ctsim-6.0.2/tools/phm2helix.cpp:119:25: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int c = getopt_long(argc, argv, "", phm2helix_options, NULL); data/ctsim-6.0.2/tools/phm2if.cpp:132:15: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int c = getopt_long(argc, argv, "", my_options, NULL); data/ctsim-6.0.2/tools/phm2pj.cpp:135:15: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int c = getopt_long(argc, argv, "", phm2pj_options, NULL); data/ctsim-6.0.2/tools/pj2if.cpp:72:15: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int c = getopt_long (argc, argv, "", my_options, NULL); data/ctsim-6.0.2/tools/pjHinterp.cpp:76:13: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int c = getopt_long(argc, argv, "", my_options, NULL); data/ctsim-6.0.2/tools/pjinfo.cpp:84:13: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int c = getopt_long (argc, argv, "", my_options, NULL); data/ctsim-6.0.2/tools/pjrec.cpp:155:15: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int c = getopt_long(argc, argv, "", my_options, NULL); data/ctsim-6.0.2/helical/dynphm.c:7: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[128]; data/ctsim-6.0.2/helical/dynphm.c:17:16: [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). view = atoi(argv[1]); data/ctsim-6.0.2/helical/dynphm.c:18:17: [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). nview = atoi(argv[2]); data/ctsim-6.0.2/helical/dynphm.c:39: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). if ( (fp = fopen(filename, "w")) == (FILE *)NULL){ data/ctsim-6.0.2/include/ezplot.h:308: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 x_numfmt[20]; // format to print x tick labels data/ctsim-6.0.2/include/ezplot.h:309: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 y_numfmt[20]; // format to print y tick labels data/ctsim-6.0.2/include/pol.h:115: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 tokstr[MAXTOK+1]; data/ctsim-6.0.2/include/pol.h:142: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_szSkipChars [MAXSKIPCHAR]; // characters to skip data/ctsim-6.0.2/include/pol.h:190: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 *fname[MAXFILE]; /* pointer to filename */ data/ctsim-6.0.2/include/pol.h:192: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 inputline[MAXLINE]; /* current input line */ data/ctsim-6.0.2/include/sgp.h:177:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char MARKER_BITMAP[MARK_COUNT][5]; data/ctsim-6.0.2/libctgraphics/ezplot.cpp:740: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 s[1024]; data/ctsim-6.0.2/libctgraphics/ezplot.cpp:906: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 str[256]; data/ctsim-6.0.2/libctgraphics/ezset.cpp:47: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 str [POL::MAXTOK+1]; data/ctsim-6.0.2/libctgraphics/ezset.cpp:66: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 str [1024]; data/ctsim-6.0.2/libctgraphics/ezset.cpp:67: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 strIn [1024]; data/ctsim-6.0.2/libctgraphics/pol.cpp:264: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 term[5]; /* string of characters not to skip */ data/ctsim-6.0.2/libctgraphics/pol.cpp:394: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 str[MAXTOK+1]; data/ctsim-6.0.2/libctgraphics/pol.cpp:789: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 term [2]; data/ctsim-6.0.2/libctgraphics/pol.cpp:842:22: [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). } else if ((fp = fopen(fn, "r")) == NULL) { data/ctsim-6.0.2/libctsim/array2dfile.cpp:110: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 szDate [128]; data/ctsim-6.0.2/libctsim/ctndicom.cpp:47: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 textbuf [2048]; data/ctsim-6.0.2/libctsim/ctndicom.cpp:111: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 szRescaleSlope[17]; data/ctsim-6.0.2/libctsim/ctndicom.cpp:112: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 szRescaleIntercept[17]; data/ctsim-6.0.2/libctsim/ctndicom.cpp:310: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 szRescaleIntercept[17]; data/ctsim-6.0.2/libctsim/ctndicom.cpp:311: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 szRescaleSlope[17]; data/ctsim-6.0.2/libctsim/ctndicom.cpp:317: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 szSOPClassUID[65] = "1.2.840.10008.5.4.1.1.2"; data/ctsim-6.0.2/libctsim/ctndicom.cpp:319: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 szPixelSpacing[33] = "0\\0"; data/ctsim-6.0.2/libctsim/ctndicom.cpp:320: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 szRelImageOrientationPatient[100] = "1\\0\\0\\0\\1\\0"; data/ctsim-6.0.2/libctsim/ctndicom.cpp:321: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 szRelImagePositionPatient[49] = "0\\0\\0"; data/ctsim-6.0.2/libctsim/ctndicom.cpp:325: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 szIDSOPInstanceUID[65] = ""; data/ctsim-6.0.2/libctsim/ctndicom.cpp:328: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 szRelFrameOfReferenceUID[65] = ""; data/ctsim-6.0.2/libctsim/ctndicom.cpp:335: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 szRelStudyInstanceUID[65] = ""; data/ctsim-6.0.2/libctsim/ctndicom.cpp:341: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 szIDManufacturerModel[65] = ""; data/ctsim-6.0.2/libctsim/imagefile.cpp:1423: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 (pszFile, "r"); data/ctsim-6.0.2/libctsim/imagefile.cpp:1424: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). if ((fp = fopen (pszFile, "r")) == NULL) data/ctsim-6.0.2/libctsim/imagefile.cpp:1434: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(pszFile, "rb"); // reopen in binary mode data/ctsim-6.0.2/libctsim/imagefile.cpp:1544: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(pszFile, "rb"); data/ctsim-6.0.2/libctsim/imagefile.cpp:1547:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char header[8]; data/ctsim-6.0.2/libctsim/imagefile.cpp:1700: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). if ((fp = fopen (outfile, "wb")) == NULL) data/ctsim-6.0.2/libctsim/imagefile.cpp:1738: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). if ((fp = fopen (outfile, "wb")) == NULL) data/ctsim-6.0.2/libctsim/imagefile.cpp:1776: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). if ((fp = fopen (outfile, "w")) == NULL) data/ctsim-6.0.2/libctsim/imagefile.cpp:1809: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 (outfile, "wb"); data/ctsim-6.0.2/libctsim/imagefile.cpp:1903: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). if ((out = fopen (outfile,"w")) == NULL) { data/ctsim-6.0.2/libctsim/imagefile.cpp:1925: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). if ((fp = fopen (outfile, "wb")) == NULL) data/ctsim-6.0.2/libctsim/phantom.cpp:190: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). if ((fp = fopen (fname, "r")) == NULL) data/ctsim-6.0.2/libctsim/phantom.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 pelemtype[80]; data/ctsim-6.0.2/libctsim/scanner.cpp:561: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 szValue[256]; data/ctsim-6.0.2/libctsupport/plotfile.cpp:236: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 line[1024]; data/ctsim-6.0.2/libctsupport/syserror.cpp:124: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 errStr[2000]; data/ctsim-6.0.2/src/dlgreconstruct.cpp:156: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 szProgress [256]; data/ctsim-6.0.2/src/threadproj.cpp:183: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 (globalDetval, childDetval, detArraySize); data/ctsim-6.0.2/src/threadraster.cpp:166: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 (globalArray[iGlobalCol++], childArray[iCol], iColSize); data/ctsim-6.0.2/tools/ctsimtext.cpp:307: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 *wisdom = fopen(pszWisdom,"r"); data/ctsim-6.0.2/tools/ctsimtext.cpp:319: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* wisdom = fopen(pszWisdom,"w+"); data/ctsim-6.0.2/tools/linogram.cpp:116:11: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int n = atol (in_n); data/ctsim-6.0.2/tools/mpiworld.cpp:73: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 [ len + 1]; data/ctsim-6.0.2/tools/phm2helix.cpp:273: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 extcommand[100]; data/ctsim-6.0.2/getopt/getopt.c:245:51: [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 (!defined __STDC__ || !__STDC__) && !defined strlen data/ctsim-6.0.2/getopt/getopt.c:248: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). extern int strlen (const char *); data/ctsim-6.0.2/getopt/getopt.c:446:51: [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 = nonoption_flags_max_len = strlen (orig_str); data/ctsim-6.0.2/getopt/getopt.c:671: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). == (unsigned int) strlen (p->name)) data/ctsim-6.0.2/getopt/getopt.c:695: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). nextchar += strlen (nextchar); data/ctsim-6.0.2/getopt/getopt.c:727: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). nextchar += strlen (nextchar); data/ctsim-6.0.2/getopt/getopt.c:743: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). nextchar += strlen (nextchar); data/ctsim-6.0.2/getopt/getopt.c:748: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). nextchar += strlen (nextchar); data/ctsim-6.0.2/getopt/getopt.c:859:58: [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 ((unsigned int) (nameend - nextchar) == strlen (p->name)) data/ctsim-6.0.2/getopt/getopt.c:882: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). nextchar += strlen (nextchar); data/ctsim-6.0.2/getopt/getopt.c:902: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). nextchar += strlen (nextchar); data/ctsim-6.0.2/getopt/getopt.c:916: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). nextchar += strlen (nextchar); data/ctsim-6.0.2/getopt/getopt.c:920: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). nextchar += strlen (nextchar); data/ctsim-6.0.2/include/projections.h:126:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool read (const std::string& fname); data/ctsim-6.0.2/include/projections.h:127:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool read (const char* fname); data/ctsim-6.0.2/libctgraphics/pol.cpp:109:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int n = strlen (m_szSkipChars); data/ctsim-6.0.2/libctgraphics/pol.cpp:840: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 (fn == NULL || strlen(fn) == 0) { data/ctsim-6.0.2/libctgraphics/pol.cpp:915:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fp); data/ctsim-6.0.2/libctgraphics/pol.cpp:947:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (inputline, line, MAXLINE); data/ctsim-6.0.2/libctsim/array2dfile.cpp:540:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fs.read (reinterpret_cast<char*>(ptrColumn), m_pixelSize); data/ctsim-6.0.2/libctsim/array2dfile.cpp:545:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fs.read (reinterpret_cast<char*>(ptrColumn), columnSize); data/ctsim-6.0.2/libctsim/array2dfile.cpp:552:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fs.read (reinterpret_cast<char*>(ptrColumn), m_pixelSize); data/ctsim-6.0.2/libctsim/array2dfile.cpp:557:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fs.read (reinterpret_cast<char*>(ptrColumn), columnSize); data/ctsim-6.0.2/libctsim/array2dfile.cpp:588:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fs.read (pszLabelStr, strLength); data/ctsim-6.0.2/libctsim/array2dfile.cpp:627: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). kuint16 strlength = strlen (labelString); data/ctsim-6.0.2/libctsim/ctndicom.cpp:116:48: [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). {DCM_IMGRESCALESLOPE, DCM_DS, "", 1, (U32) strlen(szRescaleSlope), data/ctsim-6.0.2/libctsim/ctndicom.cpp:119:52: [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). {DCM_IMGRESCALEINTERCEPT, DCM_DS, "", 1, (U32) strlen(szRescaleIntercept), data/ctsim-6.0.2/libctsim/ctndicom.cpp:347:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (pszPatComments, osPatComments.str().c_str(), sizePatComments); data/ctsim-6.0.2/libctsim/ctndicom.cpp:385:48: [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). {DCM_IMGRESCALESLOPE, DCM_DS, "", 1, (U32) strlen(szRescaleSlope), data/ctsim-6.0.2/libctsim/ctndicom.cpp:387:52: [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). {DCM_IMGRESCALEINTERCEPT, DCM_DS, "", 1, (U32) strlen(szRescaleIntercept), data/ctsim-6.0.2/libctsim/ctndicom.cpp:389: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). {DCM_IMGPHOTOMETRICINTERP, DCM_CS, "", 1, (U32) strlen(szImgPhotometricInterp), data/ctsim-6.0.2/libctsim/ctndicom.cpp:391:48: [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). {DCM_IMGPIXELSPACING, DCM_DS, "", 1, (U32) strlen(szPixelSpacing), data/ctsim-6.0.2/libctsim/ctndicom.cpp:394: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). (U32) strlen(szRelImageOrientationPatient), {szRelImageOrientationPatient}}, data/ctsim-6.0.2/libctsim/ctndicom.cpp:396: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). (U32) strlen(szRelImagePositionPatient), {szRelImagePositionPatient}}, data/ctsim-6.0.2/libctsim/ctndicom.cpp:397: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). {DCM_ACQKVP, DCM_DS, "", 1, (U32) strlen(szAcqKvp), {szAcqKvp}}, data/ctsim-6.0.2/libctsim/ctndicom.cpp:398: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). {DCM_RELACQUISITIONNUMBER, DCM_IS, "", 1, (U32) strlen(szRelAcquisitionNumber), data/ctsim-6.0.2/libctsim/ctndicom.cpp:400:50: [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). {DCM_ACQSLICETHICKNESS, DCM_DS, "", 1, (U32) strlen(szRelAcquisitionNumber), data/ctsim-6.0.2/libctsim/ctndicom.cpp:402:47: [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). {DCM_RELIMAGENUMBER, DCM_IS, "", 1, (U32) strlen(szRelImageNumber), data/ctsim-6.0.2/libctsim/ctndicom.cpp:404: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). {DCM_IDSOPINSTANCEUID, DCM_UI, "", 1, (U32) strlen(szIDSOPInstanceUID), data/ctsim-6.0.2/libctsim/ctndicom.cpp:406:47: [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). {DCM_IDMANUFACTURER, DCM_LO, "", 1, (U32) strlen(szIDManufacturer), data/ctsim-6.0.2/libctsim/ctndicom.cpp:409: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). (U32) strlen(szRelPositionRefIndicator), {szRelPositionRefIndicator}}, data/ctsim-6.0.2/libctsim/ctndicom.cpp:411: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). (U32) strlen(szRelFrameOfReferenceUID), {szRelFrameOfReferenceUID}}, data/ctsim-6.0.2/libctsim/ctndicom.cpp:412:48: [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). {DCM_RELSERIESNUMBER, DCM_IS, "", 1, (U32) strlen(szRelSeriesNumber), data/ctsim-6.0.2/libctsim/ctndicom.cpp:414: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). {DCM_RELSERIESINSTANCEUID, DCM_UI, "", 1, (U32) strlen(szIDAccessionNumber), data/ctsim-6.0.2/libctsim/ctndicom.cpp:416:50: [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). {DCM_IDACCESSIONNUMBER, DCM_SH, "", 1, (U32) strlen(szIDAccessionNumber), data/ctsim-6.0.2/libctsim/ctndicom.cpp:418: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). {DCM_RELSTUDYID, DCM_SH, "", 1, (U32) strlen(szRelStudyID), {szRelStudyID}}, data/ctsim-6.0.2/libctsim/ctndicom.cpp:419: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). {DCM_IDREFERRINGPHYSICIAN, DCM_PN, "", 1, (U32) strlen(szIDReferringPhysician), data/ctsim-6.0.2/libctsim/ctndicom.cpp:421:44: [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). {DCM_IDSTUDYTIME, DCM_TM, "", 1, (U32) strlen(szIDStudyTime), {szIDStudyTime}}, data/ctsim-6.0.2/libctsim/ctndicom.cpp:422:44: [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). {DCM_IDSTUDYDATE, DCM_DA, "", 1, (U32) strlen(szIDStudyDate), {szIDStudyDate}}, data/ctsim-6.0.2/libctsim/ctndicom.cpp:423:52: [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). {DCM_RELSTUDYINSTANCEUID, DCM_UI, "", 1, (U32) strlen(szRelStudyInstanceUID), data/ctsim-6.0.2/libctsim/ctndicom.cpp:425: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). {DCM_PATSEX, DCM_CS, "", 1, (U32) strlen(szPatSex), {szPatSex}}, data/ctsim-6.0.2/libctsim/ctndicom.cpp:426:45: [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). {DCM_PATBIRTHDATE, DCM_DA, "", 1, (U32) strlen(szPatBirthdate), {szPatBirthdate}}, data/ctsim-6.0.2/libctsim/ctndicom.cpp:427:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). {DCM_PATID, DCM_LO, "", 1, (U32) strlen(szPatID), {szPatID}}, data/ctsim-6.0.2/libctsim/ctndicom.cpp:428:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). {DCM_PATNAME, DCM_PN, "", 1, (U32) strlen(szPatName), {szPatName}}, data/ctsim-6.0.2/libctsim/ctndicom.cpp:429:44: [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). {DCM_IDIMAGETYPE, DCM_CS, "", 1, (U32) strlen(szIDImageType), {szIDImageType}}, data/ctsim-6.0.2/libctsim/ctndicom.cpp:430: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). {DCM_IDMODALITY, DCM_CS, "", 1, (U32) strlen(szModality), {szModality}}, data/ctsim-6.0.2/libctsim/ctndicom.cpp:431: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). {DCM_IDSOPCLASSUID, DCM_UI, "", 1, (U32) strlen(szSOPClassUID), {szSOPClassUID}}, data/ctsim-6.0.2/libctsim/ctndicom.cpp:432:52: [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). {DCM_IDMANUFACTURERMODEL, DCM_LO, "", 1, (U32) strlen(szIDManufacturerModel), data/ctsim-6.0.2/libctsim/ctndicom.cpp:434:44: [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). {DCM_PATCOMMENTS, DCM_LT, "", 1, (U32) strlen(pszPatComments), {pszPatComments}}, data/ctsim-6.0.2/libctsim/imagefile.cpp:1406:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = fgetc (fp); data/ctsim-6.0.2/libctsim/imagefile.cpp:1409:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fp); data/ctsim-6.0.2/libctsim/imagefile.cpp:1411:13: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fp); data/ctsim-6.0.2/libctsim/imagefile.cpp:1414:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fp); data/ctsim-6.0.2/libctsim/imagefile.cpp:1426:29: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). char cSignature = toupper(fgetc(fp)); data/ctsim-6.0.2/libctsim/imagefile.cpp:1431:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cSignature = fgetc(fp); data/ctsim-6.0.2/libctsim/imagefile.cpp:1435:5: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fgetc(fp); data/ctsim-6.0.2/libctsim/imagefile.cpp:1436:5: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fgetc(fp); data/ctsim-6.0.2/libctsim/imagefile.cpp:1461:13: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = fgetc(fp); data/ctsim-6.0.2/libctsim/imagefile.cpp:1463:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(fp); data/ctsim-6.0.2/libctsim/imagefile.cpp:1488:15: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). iGS = fgetc(fp); data/ctsim-6.0.2/libctsim/imagefile.cpp:1512:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). iR = fgetc(fp); data/ctsim-6.0.2/libctsim/imagefile.cpp:1513:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). iG = fgetc(fp); data/ctsim-6.0.2/libctsim/imagefile.cpp:1514:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). iB = fgetc(fp); data/ctsim-6.0.2/libctsim/phantom.cpp:199:18: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. int status = fscanf (fp, "%79s %lf %lf %lf %lf %lf %lf", pelemtype, &cx, &cy, &u, &v, &rot, &dens); data/ctsim-6.0.2/libctsim/projections.cpp:596:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fs.read (pszRemarkStorage, _remarksize); data/ctsim-6.0.2/libctsim/projections.cpp:640:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Projections::read (const std::string& filename) data/ctsim-6.0.2/libctsim/projections.cpp:642:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read (filename.c_str()); data/ctsim-6.0.2/libctsim/projections.cpp:647:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Projections::read (const char* filename) data/ctsim-6.0.2/libctsim/projections.cpp:724:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). is.read (reinterpret_cast<char*>(pViewData), sizeView); data/ctsim-6.0.2/libctsim/projections.cpp:759:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). is.read (reinterpret_cast<char*>(pHdrData), sizeHeader); data/ctsim-6.0.2/libctsupport/consoleio.cpp:88:12: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return fgetc(stdin); data/ctsim-6.0.2/libctsupport/fnetorderstream.cpp:103:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read (reinterpret_cast<char*>(&n), 2); data/ctsim-6.0.2/libctsupport/fnetorderstream.cpp:111:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read (reinterpret_cast<char*>(&n), 4); data/ctsim-6.0.2/libctsupport/fnetorderstream.cpp:119:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read (reinterpret_cast<char*>(&n), 4); data/ctsim-6.0.2/libctsupport/fnetorderstream.cpp:127:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read (reinterpret_cast<char*>(&n), 8); data/ctsim-6.0.2/libctsupport/fnetorderstream.cpp:169:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read (reinterpret_cast<char*>(&n), 2); data/ctsim-6.0.2/libctsupport/fnetorderstream.cpp:177:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read (reinterpret_cast<char*>(&n), 4); data/ctsim-6.0.2/libctsupport/fnetorderstream.cpp:185:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read (reinterpret_cast<char*>(&n), 4); data/ctsim-6.0.2/libctsupport/fnetorderstream.cpp:193:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read (reinterpret_cast<char*>(&n), 8); data/ctsim-6.0.2/libctsupport/hashtable.cpp:34: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). int nLength = strlen (pszKeyword); data/ctsim-6.0.2/libctsupport/hashtable.cpp:49: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). int nLength = strlen (pszCompare); data/ctsim-6.0.2/libctsupport/strfuncs.cpp:99: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). for (i = strlen(str) - 1; i >= 0; i--) data/ctsim-6.0.2/libctsupport/syserror.cpp:131:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (errStr, sizeof(errStr), "Error message not available on this platform."); data/ctsim-6.0.2/src/docs.cpp:215:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (! m_pProjectionFile->read (filename.mb_str(wxConvUTF8))) { data/ctsim-6.0.2/tools/ctsimtext.cpp:298: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 nHome = strlen(pszHome); data/ctsim-6.0.2/tools/ctsimtext.cpp:299: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 nBase = strlen(szFileBase); data/ctsim-6.0.2/tools/if2.cpp:117: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). if (endptr != optarg + strlen(optarg)) { data/ctsim-6.0.2/tools/if2.cpp:124: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). if (endptr != optarg + strlen(optarg)) { data/ctsim-6.0.2/tools/ifexport.cpp:145:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/ifexport.cpp:156:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/ifexport.cpp:166:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/phm2helix.cpp:146:51: [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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/phm2helix.cpp:158:51: [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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/phm2helix.cpp:167:51: [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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/phm2helix.cpp:176:51: [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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/phm2helix.cpp:185:51: [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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/phm2helix.cpp:194:51: [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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/phm2helix.cpp:203:51: [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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/phm2helix.cpp:234: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). endstr = argv[optind+1] + strlen(argv[optind+1]); data/ctsim-6.0.2/tools/phm2helix.cpp:241: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). endstr = argv[optind+2] + strlen(argv[optind+2]); data/ctsim-6.0.2/tools/phm2if.cpp:166: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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/phm2if.cpp:175: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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/phm2if.cpp:184: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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/phm2if.cpp:193: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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/phm2if.cpp:228: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). endstr = argv[optind+1] + strlen(argv[optind+1]); data/ctsim-6.0.2/tools/phm2if.cpp:235: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). endstr = argv[optind+2] + strlen(argv[optind+2]); data/ctsim-6.0.2/tools/phm2pj.cpp:165: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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/phm2pj.cpp:177: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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/phm2pj.cpp:186: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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/phm2pj.cpp:195: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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/phm2pj.cpp:204: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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/phm2pj.cpp:213: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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/phm2pj.cpp:222: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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/phm2pj.cpp:259: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). endstr = argv[optind+1] + strlen(argv[optind+1]); data/ctsim-6.0.2/tools/phm2pj.cpp:266: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). endstr = argv[optind+2] + strlen(argv[optind+2]); data/ctsim-6.0.2/tools/pj2if.cpp:107:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (! pj.read (pj_name)) { data/ctsim-6.0.2/tools/pjHinterp.cpp:84: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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/pjHinterp.cpp:133:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ( projections.read(pszProjFilename) != true ){ data/ctsim-6.0.2/tools/pjinfo.cpp:101: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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/pjinfo.cpp:110: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). endstr = optarg + strlen(optarg); data/ctsim-6.0.2/tools/pjinfo.cpp:147:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (! pj.read (pj_name)) { data/ctsim-6.0.2/tools/pjrec.cpp:168: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). if (endptr != optarg + strlen(optarg)) { data/ctsim-6.0.2/tools/pjrec.cpp:184: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). if (endptr != optarg + strlen(optarg)) { data/ctsim-6.0.2/tools/pjrec.cpp:191: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). if (endptr != optarg + strlen(optarg)) { data/ctsim-6.0.2/tools/pjrec.cpp:258:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). projGlobal.read (pszFilenameProj); data/ctsim-6.0.2/tools/pjrec.cpp:312:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (! projGlobal.read (pszFilenameProj)) { ANALYSIS SUMMARY: Hits = 243 Lines analyzed = 38383 in approximately 1.02 seconds (37625 lines/second) Physical Source Lines of Code (SLOC) = 28223 Hits@level = [0] 107 [1] 136 [2] 58 [3] 24 [4] 23 [5] 2 Hits@level+ = [0+] 350 [1+] 243 [2+] 107 [3+] 49 [4+] 25 [5+] 2 Hits/KSLOC@level+ = [0+] 12.4012 [1+] 8.61 [2+] 3.79123 [3+] 1.73617 [4+] 0.885802 [5+] 0.0708642 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.