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/mcl-14-137+ds/util/alloc.h Examining data/mcl-14-137+ds/util/array.c Examining data/mcl-14-137+ds/util/err.h Examining data/mcl-14-137+ds/util/compile.h Examining data/mcl-14-137+ds/util/alloc.c Examining data/mcl-14-137+ds/util/gralloc.h Examining data/mcl-14-137+ds/util/equate.h Examining data/mcl-14-137+ds/util/equate.c Examining data/mcl-14-137+ds/util/tok.c Examining data/mcl-14-137+ds/util/heap.h Examining data/mcl-14-137+ds/util/inttypes.h Examining data/mcl-14-137+ds/util/opt.c Examining data/mcl-14-137+ds/util/list.h Examining data/mcl-14-137+ds/util/gralloc.c Examining data/mcl-14-137+ds/util/ding.c Examining data/mcl-14-137+ds/util/tr.c Examining data/mcl-14-137+ds/util/hash.h Examining data/mcl-14-137+ds/util/types.h Examining data/mcl-14-137+ds/util/opt.h Examining data/mcl-14-137+ds/util/heap.c Examining data/mcl-14-137+ds/util/rand.h Examining data/mcl-14-137+ds/util/ting.h Examining data/mcl-14-137+ds/util/types.c Examining data/mcl-14-137+ds/util/hash.c Examining data/mcl-14-137+ds/util/io.h Examining data/mcl-14-137+ds/util/tr.h Examining data/mcl-14-137+ds/util/minmax.h Examining data/mcl-14-137+ds/util/rand.c Examining data/mcl-14-137+ds/util/list.c Examining data/mcl-14-137+ds/util/tok.h Examining data/mcl-14-137+ds/util/array.h Examining data/mcl-14-137+ds/util/let.c Examining data/mcl-14-137+ds/util/ding.h Examining data/mcl-14-137+ds/util/let.h Examining data/mcl-14-137+ds/util/ting.c Examining data/mcl-14-137+ds/util/getpagesize.h Examining data/mcl-14-137+ds/util/err.c Examining data/mcl-14-137+ds/util/io.c Examining data/mcl-14-137+ds/src/shmcl/mclcm.c Examining data/mcl-14-137+ds/src/shmcl/mcl.c Examining data/mcl-14-137+ds/src/clew/scan.h Examining data/mcl-14-137+ds/src/clew/clm.h Examining data/mcl-14-137+ds/src/clew/cat.c Examining data/mcl-14-137+ds/src/clew/cat.h Examining data/mcl-14-137+ds/src/clew/scan.c Examining data/mcl-14-137+ds/src/clew/claw.c Examining data/mcl-14-137+ds/src/clew/claw.h Examining data/mcl-14-137+ds/src/clew/clm.c Examining data/mcl-14-137+ds/src/shmx/mcxsubs.c Examining data/mcl-14-137+ds/src/shmx/mcxfp.h Examining data/mcl-14-137+ds/src/shmx/mcxassemble.c Examining data/mcl-14-137+ds/src/shmx/mcxtab.c Examining data/mcl-14-137+ds/src/shmx/mcxdiameter.h Examining data/mcl-14-137+ds/src/shmx/mcxclcf.h Examining data/mcl-14-137+ds/src/shmx/mcxerdos.h Examining data/mcl-14-137+ds/src/shmx/mcx.h Examining data/mcl-14-137+ds/src/shmx/mcxconvert.h Examining data/mcl-14-137+ds/src/shmx/mcxtest2.c Examining data/mcl-14-137+ds/src/shmx/mcxquery.c Examining data/mcl-14-137+ds/src/shmx/mcxerdos.c Examining data/mcl-14-137+ds/src/shmx/mcxtest.c Examining data/mcl-14-137+ds/src/shmx/mcxconvert.c Examining data/mcl-14-137+ds/src/shmx/mcxload.c Examining data/mcl-14-137+ds/src/shmx/mcxalter.h Examining data/mcl-14-137+ds/src/shmx/mcxmm.c Examining data/mcl-14-137+ds/src/shmx/mcxcollect.c Examining data/mcl-14-137+ds/src/shmx/mcxtab.h Examining data/mcl-14-137+ds/src/shmx/mcxquery.h Examining data/mcl-14-137+ds/src/shmx/mcxcollect.h Examining data/mcl-14-137+ds/src/shmx/mcxarray.c Examining data/mcl-14-137+ds/src/shmx/mcxmap.c Examining data/mcl-14-137+ds/src/shmx/mcxrand.c Examining data/mcl-14-137+ds/src/shmx/mcxalter.c Examining data/mcl-14-137+ds/src/shmx/mcx.c Examining data/mcl-14-137+ds/src/shmx/mcxminusmeet.c Examining data/mcl-14-137+ds/src/shmx/mcxdump.c Examining data/mcl-14-137+ds/src/shmx/mcxmetric.c Examining data/mcl-14-137+ds/src/shmx/mcxclcf.c Examining data/mcl-14-137+ds/src/shmx/mcxfp.c Examining data/mcl-14-137+ds/src/shmx/mcxdiameter.c Examining data/mcl-14-137+ds/src/shcl/clmps.c Examining data/mcl-14-137+ds/src/shcl/report.c Examining data/mcl-14-137+ds/src/shcl/clmmate.h Examining data/mcl-14-137+ds/src/shcl/clminfo2.c Examining data/mcl-14-137+ds/src/shcl/clmclose.h Examining data/mcl-14-137+ds/src/shcl/clmresidue.c Examining data/mcl-14-137+ds/src/shcl/clm.c Examining data/mcl-14-137+ds/src/shcl/clmframe.c Examining data/mcl-14-137+ds/src/shcl/clmps.defs.h Examining data/mcl-14-137+ds/src/shcl/clm.h Examining data/mcl-14-137+ds/src/shcl/clmmeet.c Examining data/mcl-14-137+ds/src/shcl/clmmeet.h Examining data/mcl-14-137+ds/src/shcl/clmps.h Examining data/mcl-14-137+ds/src/shcl/clmmate.c Examining data/mcl-14-137+ds/src/shcl/clmdist.h Examining data/mcl-14-137+ds/src/shcl/clmdist.c Examining data/mcl-14-137+ds/src/shcl/clmoptics.h Examining data/mcl-14-137+ds/src/shcl/clmorder.h Examining data/mcl-14-137+ds/src/shcl/clmimac.c Examining data/mcl-14-137+ds/src/shcl/clmresidue.h Examining data/mcl-14-137+ds/src/shcl/clmorder.c Examining data/mcl-14-137+ds/src/shcl/clminfo2.h Examining data/mcl-14-137+ds/src/shcl/clmadjust.h Examining data/mcl-14-137+ds/src/shcl/clmdag.c Examining data/mcl-14-137+ds/src/shcl/clminfo.h Examining data/mcl-14-137+ds/src/shcl/clmadjust.c Examining data/mcl-14-137+ds/src/shcl/clmformat.zmm.h Examining data/mcl-14-137+ds/src/shcl/clmclose.c Examining data/mcl-14-137+ds/src/shcl/clmformat.c Examining data/mcl-14-137+ds/src/shcl/clmoptics.c Examining data/mcl-14-137+ds/src/shcl/report.h Examining data/mcl-14-137+ds/src/shcl/clmimac.h Examining data/mcl-14-137+ds/src/shcl/clminfo.c Examining data/mcl-14-137+ds/src/mcl/inflate.h Examining data/mcl-14-137+ds/src/mcl/dpsd.c Examining data/mcl-14-137+ds/src/mcl/proc.h Examining data/mcl-14-137+ds/src/mcl/transform.h Examining data/mcl-14-137+ds/src/mcl/inflate.c Examining data/mcl-14-137+ds/src/mcl/expand.h Examining data/mcl-14-137+ds/src/mcl/transform.c Examining data/mcl-14-137+ds/src/mcl/interpret.c Examining data/mcl-14-137+ds/src/mcl/expand.c Examining data/mcl-14-137+ds/src/mcl/interpret.h Examining data/mcl-14-137+ds/src/mcl/proc.c Examining data/mcl-14-137+ds/src/mcl/shadow.c Examining data/mcl-14-137+ds/src/mcl/alg.h Examining data/mcl-14-137+ds/src/mcl/dpsd.h Examining data/mcl-14-137+ds/src/mcl/procinit.h Examining data/mcl-14-137+ds/src/mcl/shadow.h Examining data/mcl-14-137+ds/src/mcl/alg.c Examining data/mcl-14-137+ds/src/mcl/procinit.c Examining data/mcl-14-137+ds/src/gryphon/path.c Examining data/mcl-14-137+ds/src/gryphon/path.h Examining data/mcl-14-137+ds/src/impala/stream.h Examining data/mcl-14-137+ds/src/impala/ivptypes.h Examining data/mcl-14-137+ds/src/impala/tab.c Examining data/mcl-14-137+ds/src/impala/compose.h Examining data/mcl-14-137+ds/src/impala/ivp.h Examining data/mcl-14-137+ds/src/impala/iface.c Examining data/mcl-14-137+ds/src/impala/matrix.c Examining data/mcl-14-137+ds/src/impala/ivp.c Examining data/mcl-14-137+ds/src/impala/app.h Examining data/mcl-14-137+ds/src/impala/version.c Examining data/mcl-14-137+ds/src/impala/io.h Examining data/mcl-14-137+ds/src/impala/app.c Examining data/mcl-14-137+ds/src/impala/pval.c Examining data/mcl-14-137+ds/src/impala/stream.c Examining data/mcl-14-137+ds/src/impala/edge.h Examining data/mcl-14-137+ds/src/impala/edge.c Examining data/mcl-14-137+ds/src/impala/version.h Examining data/mcl-14-137+ds/src/impala/compose.c Examining data/mcl-14-137+ds/src/impala/matrix.h Examining data/mcl-14-137+ds/src/impala/tab.h Examining data/mcl-14-137+ds/src/impala/io.c Examining data/mcl-14-137+ds/src/impala/pval.h Examining data/mcl-14-137+ds/src/impala/vector.c Examining data/mcl-14-137+ds/src/impala/iface.h Examining data/mcl-14-137+ds/src/impala/vector.h Examining data/mcl-14-137+ds/src/shmcx/ops.h Examining data/mcl-14-137+ds/src/shmcx/ops.c Examining data/mcl-14-137+ds/src/shmcx/stack.h Examining data/mcl-14-137+ds/src/shmcx/glob.h Examining data/mcl-14-137+ds/src/shmcx/glob.c Examining data/mcl-14-137+ds/src/shmcx/util.c Examining data/mcl-14-137+ds/src/shmcx/mcxi.c Examining data/mcl-14-137+ds/src/shmcx/util.h Examining data/mcl-14-137+ds/src/shmcx/stack.c Examining data/mcl-14-137+ds/src/shmcxquery/mcxquery.c Examining data/mcl-14-137+ds/caml/caml_mcl.c FINAL RESULTS: data/mcl-14-137+ds/src/gryphon/path.c:22:31: [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 dbg(format, ...) if(1)fprintf(stderr, format, ## __VA_ARGS__); data/mcl-14-137+ds/src/impala/io.c:1977:14: [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. ; n = sscanf(line->str, "%s%s", keyTxt->str, valTxt->str) data/mcl-14-137+ds/src/impala/stream.c:321:25: [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. ; if (1 != sscanf(state->etcbuf->str, "%s%n", xkey->str, &n_char_read)) data/mcl-14-137+ds/src/impala/stream.c:391:23: [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. && 1 != sscanf(state->etcbuf->str+state->etcbuf_ofs, "%s%n", ykey->str, &n_char_read) data/mcl-14-137+ds/src/impala/stream.c:521:19: [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(buf->str, "%s%s%lf", xkey->str, ykey->str, value) data/mcl-14-137+ds/src/shmcx/ops.c:922:10: [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(stdout, v_g ? "talkative\n" : "silent\n") data/mcl-14-137+ds/src/shmcx/util.c:51:7: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. ; vfprintf(stderr, fmt, args) data/mcl-14-137+ds/src/shmcx/util.h:24: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. __attribute__ ((format (printf, 2, 3))) data/mcl-14-137+ds/src/shmx/mcxcollect.c:251:22: [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. { if (2 != sscanf(buf->str, "%s%lg", lbl->str, &val)) data/mcl-14-137+ds/src/shmx/mcxcollect.c:410:10: [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 /* --summary option is a bit rubbish interface-wise */ data/mcl-14-137+ds/src/shmx/mcxerdos.c:493:15: [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. ; ns = sscanf(line->str, "%s %s", sa->str, sb->str) data/mcl-14-137+ds/src/shmx/mcxmm.c:358:7: [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("| %s\n", label ? label : "????") data/mcl-14-137+ds/util/err.c:44:7: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. ; vfprintf(fp, fmt, *args) data/mcl-14-137+ds/util/err.c:152:7: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. ; vfprintf(stderr, fmt, args) data/mcl-14-137+ds/util/err.c:170:7: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. ; vfprintf(fp, fmt, *args) data/mcl-14-137+ds/util/err.h:218: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. __attribute__ ((format (printf, 3, 4))) data/mcl-14-137+ds/util/err.h:233: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. __attribute__ ((format (printf, 2, 3))) data/mcl-14-137+ds/util/err.h:244: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. __attribute__ ((format (printf, 2, 3))) data/mcl-14-137+ds/util/err.h:256: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. __attribute__ ((format (printf, 3, 4))) data/mcl-14-137+ds/util/err.h:267: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. __attribute__ ((format (printf, 2, 3))) data/mcl-14-137+ds/util/err.h:277: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. __attribute__ ((format (printf, 2, 3))) data/mcl-14-137+ds/util/err.h:288: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. __attribute__ ((format (printf, 3, 4))) data/mcl-14-137+ds/util/err.h:299: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. __attribute__ ((format (printf, 3, 4))) data/mcl-14-137+ds/util/opt.c:789:16: [4] (shell) execlp: 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. ; execlp("man", "man", minime->str, NULL) data/mcl-14-137+ds/util/ting.c:138:13: [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. ; npf = vsnprintf(buf, PRINT_BUF_SIZE, fmt, args2) data/mcl-14-137+ds/util/ting.c:141:13: [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. ; npf = vsnprintf(buf, PRINT_BUF_SIZE, fmt, *args) data/mcl-14-137+ds/util/ting.c:165:19: [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. ; npf = vsnprintf(txtbuf->str, m+1, fmt, args2) data/mcl-14-137+ds/util/ting.c:168:19: [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. ; npf = vsnprintf(txtbuf->str, m+1, fmt, *args) data/mcl-14-137+ds/util/ting.h:316: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. __attribute__ ((format (printf, 2, 3))) data/mcl-14-137+ds/util/ting.h:327: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. __attribute__ ((format (printf, 2, 3))) data/mcl-14-137+ds/util/ting.h:342: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. __attribute__ ((format (printf, 4, 5))) data/mcl-14-137+ds/caml/caml_mcl.c:20:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(mcxSeed(315)); data/mcl-14-137+ds/src/clew/claw.c:254:24: [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* e1 = getenv("MCL_ADJ_FMAX") data/mcl-14-137+ds/src/clew/claw.c:255:24: [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* e2 = getenv("MCL_ADJ_EMASS") data/mcl-14-137+ds/src/clew/scan.c:56:28: [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. ; double powah = getenv("MCL_SCAN_R") ? atof(getenv("MCL_SCAN_R")) : 0.0 data/mcl-14-137+ds/src/clew/scan.c:56:56: [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. ; double powah = getenv("MCL_SCAN_R") ? atof(getenv("MCL_SCAN_R")) : 0.0 data/mcl-14-137+ds/src/clew/scan.c:143:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. ; double powah = getenv("MCL_SCAN_R") ? atof(getenv("MCL_SCAN_R")) : 0.0 data/mcl-14-137+ds/src/clew/scan.c:143:50: [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. ; double powah = getenv("MCL_SCAN_R") ? atof(getenv("MCL_SCAN_R")) : 0.0 data/mcl-14-137+ds/src/impala/app.c:58:28: [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* envp = getenv("NU_MAGIC") data/mcl-14-137+ds/src/impala/compose.c:238: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. ; const char* valp = getenv("MCLEDGE_NCPUS") data/mcl-14-137+ds/src/impala/io.c:288:28: [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* envp = getenv(opt) data/mcl-14-137+ds/src/impala/io.c:353:28: [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* envp = getenv("MCLXIODIGITS") data/mcl-14-137+ds/src/impala/io.c:773:12: [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. ; if (!getenv("MCL_READ_SPARSE") && !colmask && !rowmask) data/mcl-14-137+ds/src/impala/matrix.c:1987:28: [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* policy = getenv("MCLX_THREAD_POLICY") data/mcl-14-137+ds/src/mcl/alg.c:1925:7: [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. ; if(getenv("MCL_DUMP_SHADOW")) data/mcl-14-137+ds/src/mcl/alg.c:1939:18: [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. else if (0 && getenv("MCL_NULL_NODE")) data/mcl-14-137+ds/src/mcl/alg.c:1957:23: [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. ; mcxbool ns = getenv("MCL_CENTER_NS") ? TRUE : FALSE data/mcl-14-137+ds/src/mcl/proc.c:259:39: [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. { mcxbool local cpl__unused = getenv("MCL_AUTO_LOCAL") ? TRUE : FALSE data/mcl-14-137+ds/src/mcl/proc.c:260:39: [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. ; mcxbool smooth cpl__unused = getenv("MCL_AUTO_SMOOTH") ? TRUE : FALSE data/mcl-14-137+ds/src/mcl/shadow.c:61:17: [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. ; if ((ep = getenv("MCL_LOOP_BOOST"))) data/mcl-14-137+ds/src/mcl/shadow.c:116:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. ; mcxbool dump = getenv("MCL_DUMP_SHADOW") ? TRUE : FALSE data/mcl-14-137+ds/src/shcl/clmdist.c:545:32: [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* e = getenv("CLMDIST_TAG") data/mcl-14-137+ds/src/shcl/clmps.c:557:7: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. ; srandom(mcxSeed(2308947)) data/mcl-14-137+ds/src/shcl/clmps.c:684:53: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. { double f = (1.0 * (unsigned long) random()) / RAND_MAX data/mcl-14-137+ds/src/shmcl/mcl.c:119:7: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. ; srandom(mcxSeed(315)) data/mcl-14-137+ds/src/shmcl/mclcm.c:515:11: [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. ; if (getenv("MCLCM_BLOCK_STOCHASTIC")) /* this works very badly! */ data/mcl-14-137+ds/src/shmcl/mclcm.c:518:16: [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. ; else if (getenv("MCLCM_BASE_UNSCALE") && start_col_sums_g) data/mcl-14-137+ds/src/shmcl/mclcm.c:891:7: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. ; srandom(mcxSeed(89315)) data/mcl-14-137+ds/src/shmx/mcxalter.c:229:7: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. ; srandom(mcxSeed(11235813)) data/mcl-14-137+ds/src/shmx/mcxmetric.c:214:7: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. ; srandom(mcxSeed(8910111213)) data/mcl-14-137+ds/src/shmx/mcxmetric.c:217:10: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. { srandom(mcxSeed(8910111213)) data/mcl-14-137+ds/src/shmx/mcxmetric.c:332:17: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. { if (random() * 1.0 / RAND_MAX < 0.5) data/mcl-14-137+ds/src/shmx/mcxquery.c:1465:7: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. ; srandom(mcxSeed(135313531)) /* for tf arguments, #tug, #rug */ data/mcl-14-137+ds/src/shmx/mcxrand.c:347:32: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. { unsigned long rx = random() data/mcl-14-137+ds/src/shmx/mcxrand.c:410:32: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. { unsigned long rx = random() data/mcl-14-137+ds/src/shmx/mcxrand.c:479:32: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. { unsigned long rx = random() data/mcl-14-137+ds/src/shmx/mcxrand.c:517:45: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. { unsigned long rx = (unsigned long) random() data/mcl-14-137+ds/src/shmx/mcxrand.c:518:45: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. ; unsigned long ry = (unsigned long) random() data/mcl-14-137+ds/src/shmx/mcxrand.c:655:44: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. { unsigned long r = (unsigned long) random() data/mcl-14-137+ds/src/shmx/mcxrand.c:704:44: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. { unsigned long r = (unsigned long) random() data/mcl-14-137+ds/src/shmx/mcxrand.c:705:44: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. ; unsigned long s = (unsigned long) random() data/mcl-14-137+ds/src/shmx/mcxrand.c:756:44: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. { unsigned long r = (unsigned long) random() data/mcl-14-137+ds/src/shmx/mcxrand.c:757:44: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. ; unsigned long s = (unsigned long) random() data/mcl-14-137+ds/src/shmx/mcxrand.c:801:37: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. { val = (((unsigned long) random()) * 1.0) / RAND_MAX data/mcl-14-137+ds/src/shmx/mcxrand.c:864:7: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. ; srandom(mcxSeed(2308947)) data/mcl-14-137+ds/src/shmx/mcxsubs.c:348:19: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. { long r = random() data/mcl-14-137+ds/src/shmx/mcxsubs.c:364:24: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. if (((double) random()) / RAND_MAX >= efac) data/mcl-14-137+ds/src/shmx/mcxsubs.c:457:7: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. ; srandom(mcxSeed(30847)) data/mcl-14-137+ds/src/shmx/mcxtest.c:217:7: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. ; srandom(mcxSeed(8910111213)) data/mcl-14-137+ds/src/shmx/mcxtest.c:220:10: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. { srandom(mcxSeed(8910111213)) data/mcl-14-137+ds/src/shmx/mcxtest.c:340:17: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. { if (random() * 1.0 / RAND_MAX < 0.5) data/mcl-14-137+ds/util/alloc.c:84:28: [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* tin = getenv("TINGEA_MEM_SIGNAL") data/mcl-14-137+ds/util/err.c:97:30: [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. mcxLogLevelSetByString(getenv("TINGEA_LOG_TAG")) data/mcl-14-137+ds/util/io.c:208:10: [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. ( getenv("TINGEA_PLUS_APPEND") data/mcl-14-137+ds/src/impala/compose.c:242:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). n_threads = atoi(valp) data/mcl-14-137+ds/src/impala/io.c:73: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. static unsigned char mclxCookie[4] = { 0x1b, 0xc2, 0x4d, 0xe8 } ; data/mcl-14-137+ds/src/impala/io.c:74: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. static unsigned char mclvCookie[4] = { 0xb1, 0x2c, 0xd4, 0x8e } ; data/mcl-14-137+ds/src/impala/io.c:1622: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 voidstring[20] data/mcl-14-137+ds/src/impala/io.c:1694: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 report[80] data/mcl-14-137+ds/src/impala/ivp.c:110: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(mclpar->ivps, ivps, sz * sizeof(mclIvp)) data/mcl-14-137+ds/src/impala/vector.c:147:10: [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(new_ivps, dst_vec->ivps, new_n_ivps * sizeof new_ivps[0]) data/mcl-14-137+ds/src/impala/vector.c:173: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(new_ivps, src_ivps, new_n_ivps * sizeof(mclIvp)) data/mcl-14-137+ds/src/mcl/alg.c:1207:17: [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). : l = atol(opt->val) data/mcl-14-137+ds/src/mcl/alg.c:1440:17: [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). : l = atol(opt->val) data/mcl-14-137+ds/src/mcl/expand.c:350:10: [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(ivpbuf->ivps, dstvec->ivps, dstvec->n_ivps * sizeof(mclIvp)) data/mcl-14-137+ds/src/mcl/expand.c:421: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(ivpbuf->ivps, dstvec->ivps, dstvec->n_ivps * sizeof(mclIvp)) data/mcl-14-137+ds/src/mcl/proc.c:287: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 msg[80] data/mcl-14-137+ds/src/mcl/procinit.c:398: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). : i = atoi(opt->val) data/mcl-14-137+ds/src/mcl/procinit.c:405: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). : i = atoi(opt->val) data/mcl-14-137+ds/src/mcl/procinit.c:412: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). : i = atoi(opt->val) data/mcl-14-137+ds/src/mcl/procinit.c:422: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). : i = atoi(opt->val) data/mcl-14-137+ds/src/mcl/procinit.c:430: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). : i = atoi(opt->val) data/mcl-14-137+ds/src/mcl/procinit.c:438: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). : i = atoi(opt->val) data/mcl-14-137+ds/src/mcl/procinit.c:456: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). : i = atoi(opt->val) data/mcl-14-137+ds/src/mcl/procinit.c:463: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). : i = atoi(opt->val) data/mcl-14-137+ds/src/mcl/procinit.c:480: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). : i = atoi(opt->val) data/mcl-14-137+ds/src/mcl/procinit.c:494: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). : i = atoi(opt->val) data/mcl-14-137+ds/src/mcl/procinit.c:508: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). : i = atoi(opt->val) data/mcl-14-137+ds/src/mcl/procinit.c:517: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). : i = atoi(opt->val) data/mcl-14-137+ds/src/mcl/procinit.c:526: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). : i = atoi(opt->val) data/mcl-14-137+ds/src/mcl/procinit.c:536: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). : i = atoi(opt->val) data/mcl-14-137+ds/src/mcl/procinit.c:547: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). : i = atoi(opt->val) data/mcl-14-137+ds/src/mcl/procinit.c:556:35: [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). : mxp->sparse_trigger = atoi(opt->val) data/mcl-14-137+ds/src/mcl/procinit.c:566: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). : i = atoi(opt->val) data/mcl-14-137+ds/src/mcl/procinit.c:575: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). : mpp->devel = atoi(opt->val) data/mcl-14-137+ds/src/mcl/procinit.c:616: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). : i = atoi(opt->val) data/mcl-14-137+ds/src/shcl/clm.c:236:27: [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). : mcx_progress_g = atoi(val) data/mcl-14-137+ds/src/shcl/clm.c:246:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : mcx_debug_g = atoi(val) data/mcl-14-137+ds/src/shcl/clmadjust.c:131:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : lintl = atoi(val) data/mcl-14-137+ds/src/shcl/clmadjust.c:141:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : lintk = atoi(val) data/mcl-14-137+ds/src/shcl/clmclose.c:292:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : ccbound_num = atoi(val) data/mcl-14-137+ds/src/shcl/clmdist.c:277:19: [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). : digits = atoi(val) data/mcl-14-137+ds/src/shcl/clmframe.c:1635:27: [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). : whittle_num = atoi(opt->val) data/mcl-14-137+ds/src/shcl/clmframe.c:1656: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). : debug_g = (unsigned) atoi(opt->val) data/mcl-14-137+ds/src/shcl/clminfo.c:168:21: [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). : n_cl_max = atoi(val) data/mcl-14-137+ds/src/shcl/clminfo.c:183:19: [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). : clceil = atoi(val) data/mcl-14-137+ds/src/shcl/clminfo2.c:183:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : n_thread_l = atoi(val) data/mcl-14-137+ds/src/shcl/clminfo2.c:188:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : i_group_g = atoi(val) data/mcl-14-137+ds/src/shcl/clminfo2.c:193:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : n_group_G = atoi(val) data/mcl-14-137+ds/src/shcl/clminfo2.c:203:21: [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). : clceil_g = atoi(val) data/mcl-14-137+ds/src/shcl/clminfo2.c:213:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : n_cl_max_g = atoi(val) data/mcl-14-137+ds/src/shcl/clmoptics.c:187:21: [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). : ps_nrows = atoi(val) data/mcl-14-137+ds/src/shcl/clmoptics.c:207:19: [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). : minpts = atoi(val) data/mcl-14-137+ds/src/shcl/clmoptics.c:481: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 mark_buf[10] data/mcl-14-137+ds/src/shcl/clmps.c:314: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 buf[100] data/mcl-14-137+ds/src/shcl/clmps.c:429:21: [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). : n_cl_max = atoi(val) data/mcl-14-137+ds/src/shcl/clmps.c:490:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : level = atoi(val) data/mcl-14-137+ds/src/shcl/clmps.c:521:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : e_max = atoi(val) data/mcl-14-137+ds/src/shmcl/mclcm.c:715: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). : N = atoi(opt->val) data/mcl-14-137+ds/src/shmcx/glob.c:265:21: [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 i = atoi(token) data/mcl-14-137+ds/src/shmx/mcx.c:218:27: [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). : mcx_progress_g = atoi(val) data/mcl-14-137+ds/src/shmx/mcx.c:228:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : mcx_debug_g = atoi(val) data/mcl-14-137+ds/src/shmx/mcxalter.c:198:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : canonical_g = atoi(val) data/mcl-14-137+ds/src/shmx/mcxarray.c:1793:27: [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). : n_thread_l = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxarray.c:1798:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : i_group = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxarray.c:1803: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). : n_group_G = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxarray.c:1808:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : start_g = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxarray.c:1813:21: [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). : end_g = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxarray.c:1834:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : labelidx = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxarray.c:1849:25: [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). : nrows_max = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxarray.c:1894:21: [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). : rskip = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxarray.c:1899:21: [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). : cskip = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxclcf.c:162:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : n_thread_l = atoi(val) data/mcl-14-137+ds/src/shmx/mcxclcf.c:167:21: [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). : i_group = atoi(val) data/mcl-14-137+ds/src/shmx/mcxclcf.c:172:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : n_group_G = atoi(val) data/mcl-14-137+ds/src/shmx/mcxclcf.c:192:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : test_loop_g = atoi(val) ? TRUE : FALSE data/mcl-14-137+ds/src/shmx/mcxcollect.c:392: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). { unsigned u = atoi(lb) data/mcl-14-137+ds/src/shmx/mcxconvert.c:132:19: [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). : catmax = atoi(val) data/mcl-14-137+ds/src/shmx/mcxdiameter.c:443:21: [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). : i_group = atoi(val) data/mcl-14-137+ds/src/shmx/mcxdiameter.c:448:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : n_group_G = atoi(val) data/mcl-14-137+ds/src/shmx/mcxdiameter.c:458: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). : extent_g = (unsigned) atoi(val) data/mcl-14-137+ds/src/shmx/mcxdiameter.c:463: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). : n_thread_l = (unsigned) atoi(val) data/mcl-14-137+ds/src/shmx/mcxdiameter.c:501: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). : n_thread_l = (unsigned) atoi(val) data/mcl-14-137+ds/src/shmx/mcxdiameter.c:526:21: [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). : i_group = atoi(val) data/mcl-14-137+ds/src/shmx/mcxdiameter.c:531:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : n_group_G = atoi(val) data/mcl-14-137+ds/src/shmx/mcxdump.c:630:21: [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). : n_max = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxdump.c:773: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). : table_nfields = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxdump.c:778:28: [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). : table_nlines = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxfp.c:500:25: [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). : label_column = atoi(val) data/mcl-14-137+ds/src/shmx/mcxfp.c:505:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : col_start = atoi(val) data/mcl-14-137+ds/src/shmx/mcxfp.c:515:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : n_row_skip = atoi(val) data/mcl-14-137+ds/src/shmx/mcxfp.c:540:21: [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). : i_group = atoi(val) data/mcl-14-137+ds/src/shmx/mcxfp.c:545:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : n_group_G = atoi(val) data/mcl-14-137+ds/src/shmx/mcxfp.c:769:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ; map_fd = open(fnload, O_RDONLY) data/mcl-14-137+ds/src/shmx/mcxfp.c:867:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). { int fd = open(fndump, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600) data/mcl-14-137+ds/src/shmx/mcxload.c:645:33: [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). : streamer.cmax_123 = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxload.c:650:33: [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). : streamer.cmax_235 = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxload.c:655:33: [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). : streamer.rmax_123 = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxload.c:660:33: [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). : streamer.cmax_123 = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxload.c:723: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). : packed_row_hi = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxload.c:728: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). : packed_col_hi = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxmap.c:250:21: [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). : cmul = atol(opt->val) data/mcl-14-137+ds/src/shmx/mcxmap.c:256:21: [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). : cmul = atol(opt->val) data/mcl-14-137+ds/src/shmx/mcxmap.c:261:21: [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). : rmul = atol(opt->val) data/mcl-14-137+ds/src/shmx/mcxmap.c:266:23: [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). : cshift = atol(opt->val) data/mcl-14-137+ds/src/shmx/mcxmap.c:267:23: [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). ; rshift = atol(opt->val) data/mcl-14-137+ds/src/shmx/mcxmap.c:272:23: [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). : cshift = atol(opt->val) data/mcl-14-137+ds/src/shmx/mcxmap.c:277:23: [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). : rshift = atol(opt->val) data/mcl-14-137+ds/src/shmx/mcxminusmeet.c:228: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). ; modes = atoi(argv[1]) data/mcl-14-137+ds/src/shmx/mcxmm.c:527: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). : q = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxquery.c:589:20: [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). : n_limit = atoi(val) data/mcl-14-137+ds/src/shmx/mcxquery.c:596:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : trigger_eff = atoi(val) data/mcl-14-137+ds/src/shmx/mcxquery.c:600:25: [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). : trigger_clcf = atoi(val) data/mcl-14-137+ds/src/shmx/mcxquery.c:619:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : n_thread_l = atoi(val) data/mcl-14-137+ds/src/shmx/mcxquery.c:658:21: [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). ; VS.stepi = atoi(val) data/mcl-14-137+ds/src/shmx/mcxquery.c:679:21: [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). : divide_g = atoi(val) data/mcl-14-137+ds/src/shmx/mcxrand.c:892: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). : template_n_nodes = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxrand.c:991:25: [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). : N_shuffle = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxrand.c:996:21: [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). : N_add = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxrand.c:1001:25: [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). : N_remove = atoi(opt->val) data/mcl-14-137+ds/src/shmx/mcxrand.c:1014: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(cl->cols[i].ivps, dom2->ivps+n_copied, cl->cols[i].n_ivps * sizeof theivp) data/mcl-14-137+ds/src/shmx/mcxsubs.c:595:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). : digits = atoi(argv[a]) data/mcl-14-137+ds/src/shmx/mcxsubs.c:1133:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). ; int i = atoi(ti->str) data/mcl-14-137+ds/util/alloc.c:86: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). { unsigned tintin = atoi(tin) data/mcl-14-137+ds/util/array.c:111: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 data/mcl-14-137+ds/util/array.c:145:10: [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(((char*)base) + k * size, ((char*)base) + l * size, size) data/mcl-14-137+ds/util/array.c:463: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(mem_cell, data + (n-1) * mem_size, mem_size) data/mcl-14-137+ds/util/array.c:464: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(data + (n-1) * mem_size, data + r * mem_size, mem_size) data/mcl-14-137+ds/util/array.c:465: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(data + r * mem_size, mem_cell, mem_size) data/mcl-14-137+ds/util/ding.c:35:10: [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(rts, str, n) data/mcl-14-137+ds/util/heap.c:117: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(heapRoot + i*elsz, heapRoot + elsz*((i-1)/2), elsz) data/mcl-14-137+ds/util/heap.c:120:10: [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(heapRoot + i*elsz, elemch, elsz) data/mcl-14-137+ds/util/heap.c:135:16: [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(heapRoot+root*elsz, heapRoot+d*elsz, elsz) data/mcl-14-137+ds/util/heap.c:141:10: [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(heapRoot+root*elsz, elemch, elsz) data/mcl-14-137+ds/util/io.c:297:26: [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 ((xf->fp = fopen(fname, xf->mode)) == NULL) data/mcl-14-137+ds/util/io.c:527: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 cbuf[MCX_IORL_BSZ] data/mcl-14-137+ds/util/io.h:388:19: [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 unsigned char abcd[4] data/mcl-14-137+ds/util/io.h:393:19: [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 unsigned char abcd[4] data/mcl-14-137+ds/util/opt.c:139: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 argcpy[501] data/mcl-14-137+ds/util/opt.c:391:22: [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. lftToken = (char *) rltSigns[i] data/mcl-14-137+ds/util/opt.c:431:22: [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. rgtToken = (char *) rltSigns[i] data/mcl-14-137+ds/util/ting.c:127: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 buf[PRINT_BUF_SIZE], *src data/mcl-14-137+ds/util/ting.c:316: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 num[500] data/mcl-14-137+ds/util/ting.c:347: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 num[128] data/mcl-14-137+ds/util/ting.c:564: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(ting->str, str, sz) data/mcl-14-137+ds/util/ting.c:600: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(ting->str, str, sz) data/mcl-14-137+ds/util/ting.c:626: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(str, ting->str+offset, (dim) length) data/mcl-14-137+ds/src/impala/stream.c:324: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). ; xkey->len = strlen(xkey->str) data/mcl-14-137+ds/src/impala/stream.c:398: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). ykey->len = strlen(ykey->str) data/mcl-14-137+ds/src/impala/stream.c:548: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). ; xlen = strlen(xkey->str) data/mcl-14-137+ds/src/impala/stream.c:549: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). ; ylen = strlen(ykey->str) data/mcl-14-137+ds/src/mcl/alg.c:1055: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). ; dim diroutlen = strlen(dirout) data/mcl-14-137+ds/src/mcl/transform.c:129: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 (!val || !strlen(val)) data/mcl-14-137+ds/src/shcl/clmps.c:326: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). ; o = p+4+strlen(buf) data/mcl-14-137+ds/src/shmcx/ops.c:1005: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). int length = strlen(hook->op_token) + 1 data/mcl-14-137+ds/src/shmcx/ops.c:1017: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). int length = strlen(alias->op_token) + strlen(alias->op_alias) + 2 data/mcl-14-137+ds/src/shmcx/ops.c:1017: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). int length = strlen(alias->op_token) + strlen(alias->op_alias) + 2 data/mcl-14-137+ds/src/shmx/mcxcollect.c:253: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). ; lbl->len = strlen(lbl->str) data/mcl-14-137+ds/src/shmx/mcxerdos.c:495: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). sa->len = strlen(sa->str) data/mcl-14-137+ds/src/shmx/mcxerdos.c:496: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). , sb->len = strlen(sb->str) data/mcl-14-137+ds/src/shmx/mcxerdos.c:498: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). sa->len = strlen(sa->str) data/mcl-14-137+ds/src/shmx/mcxquery.c:489: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). { dim dash_count = mcxStrCountChar(a, '/', strlen(a)) data/mcl-14-137+ds/src/shmx/mcxquery.c:511: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). { dim dash_count = mcxStrCountChar(a, '/', strlen(a)) data/mcl-14-137+ds/src/shmx/mcxsubs.c:998: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). ; dim dlen = strlen(dtype) data/mcl-14-137+ds/util/ding.c:25: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). { return mcxStrNDup(str, strlen(str)) data/mcl-14-137+ds/util/ding.c:49: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). ; z += (len >= 0) ? (dim) len : strlen(p) data/mcl-14-137+ds/util/ding.c:88: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). { const char* z = offset >= 0 ? p+offset : p + strlen(p) data/mcl-14-137+ds/util/ding.c:100: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). { const char* z = offset >= 0 ? p+offset : p + strlen(p) data/mcl-14-137+ds/util/ding.c:396: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). { dim ls = strlen(s) data/mcl-14-137+ds/util/ding.c:397: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). ; dim lt = strlen(t) data/mcl-14-137+ds/util/hash.c:1083: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). { dim l = strlen(s) data/mcl-14-137+ds/util/io.c:427:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(xf->fp) data/mcl-14-137+ds/util/io.c:589:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (k-- > 0 && (r = read(fileno(xf->fp), dst->str+dst->len, psz)) > 0) data/mcl-14-137+ds/util/io.c:596:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). && (r = read(fileno(xf->fp), dst->str+dst->len, rem)) > 0 data/mcl-14-137+ds/util/io.c:939: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). ; n_trailing = strlen(s) /* truncintok */ data/mcl-14-137+ds/util/io.c:968: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). ; int patlen = strlen(pattern) /* truncintok */ data/mcl-14-137+ds/util/opt.c:141:16: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). { strncpy(argcpy, arg, (eq-arg)) data/mcl-14-137+ds/util/opt.c:569: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). { int thislen = strlen(opt->tag) /* truncintok */ data/mcl-14-137+ds/util/opt.c:571: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). thislen += 1 + strlen(opt->descr_arg) /* truncintok */ data/mcl-14-137+ds/util/opt.c:641: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). { dim srclen = strlen(src) data/mcl-14-137+ds/util/ting.c:385: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). { dim length = string ? strlen(string) : 0 data/mcl-14-137+ds/util/ting.c:393:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). { strncpy(ting->str, string, length) data/mcl-14-137+ds/util/ting.c:639: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). ; ting->len = strlen(str) data/mcl-14-137+ds/util/ting.c:675: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). , str? strlen(str) : 0 /* string length */ data/mcl-14-137+ds/util/ting.c:690: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). { dim len = strlen(str) data/mcl-14-137+ds/util/ting.c:745: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). , str ? strlen(str) : 0 /* string length */ data/mcl-14-137+ds/util/tok.c:63: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). len = strlen(offset) data/mcl-14-137+ds/util/tok.c:137: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). len = strlen(offset) data/mcl-14-137+ds/util/tr.c:189: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). ; dim len = strlen(src) data/mcl-14-137+ds/util/tr.c:521: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). ; const char* z = spec + strlen(spec) ANALYSIS SUMMARY: Hits = 270 Lines analyzed = 70371 in approximately 1.43 seconds (49158 lines/second) Physical Source Lines of Code (SLOC) = 53281 Hits@level = [0] 634 [1] 43 [2] 143 [3] 53 [4] 31 [5] 0 Hits@level+ = [0+] 904 [1+] 270 [2+] 227 [3+] 84 [4+] 31 [5+] 0 Hits/KSLOC@level+ = [0+] 16.9666 [1+] 5.06747 [2+] 4.26043 [3+] 1.57655 [4+] 0.581821 [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.