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/octave-iso2mesh-1.9.6+ds/tools/cgalmesh/mesh_polyhedral_domain.cpp Examining data/octave-iso2mesh-1.9.6+ds/tools/cgalmesh/mesh_3D_image.cpp Examining data/octave-iso2mesh-1.9.6+ds/tools/cgalsurf/mesh_a_3d_gray_image.cpp Examining data/octave-iso2mesh-1.9.6+ds/tools/cgalsimp2/edge_collapse_enriched_polyhedron.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/src/epsilonSampling.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/src/holeFilling.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/src/mwExtensions.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/src/detectIntersections.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/src/simplification.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/src/cleaning.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/src/uniform.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/src/smoothing.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/src/sparseLSystem.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/include/sparseLSystem.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/include/detectIntersections.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/include/simplification.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/include/exttrimesh.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/include/holeFilling.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/include/component.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/include/epsilonSampling.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/meshfix.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/jrs_predicates/jrs_predicates.c Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/jrs_predicates/jrs_predicates.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/triangle.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/vertex.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/tin.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/point.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/edge.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/checkAndRepair.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/PRIMITIVES/heap.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/PRIMITIVES/jqsort.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/PRIMITIVES/list.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/PRIMITIVES/graph.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/PRIMITIVES/clusterGraph.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/PRIMITIVES/binTree.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/PRIMITIVES/matrix.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/PRIMITIVES/dijkstraGraph.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/test/test.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/include/vertex.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/include/matrix.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/include/edge.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/include/list.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/include/j_mesh.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/include/point.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/include/clusterGraph.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/include/jqsort.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/include/jmesh.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/include/binTree.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/include/dijkstraGraph.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/include/triangle.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/include/heap.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/include/graph.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/include/tin.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_preconditioners.c Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_preconditioners.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_context.c Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_linkage.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_iterative_solvers.c Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_superlu.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_private.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_context.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_api.c Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_blas.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_cnc_gpu_cuda.c Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_cnc_gpu_cuda.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_iterative_solvers.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_matrix.c Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_os.c Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_blas.c Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_matrix.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_superlu.c Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/nl_single_file.c Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/plugins/cnc/cnc_utils.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/plugins/cnc/cnc_sparse_matrix_ell.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/plugins/cnc/cnc_gpu_solver.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/plugins/cnc/cnc_kernels.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/plugins/cnc/cnc_sparse_matrix_bcrs.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/plugins/cnc/cnc_sparse_matrix_coo.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/plugins/cnc/cnc_sparse_matrix_hyb.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/plugins/cnc/cnc_timer.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/plugins/cnc/cnc_sparse_matrix_crs.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/plugins/cnc/cnc_cublas_utils.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/plugins/cnc/cnc_arrays.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/plugins/cnc/cnc_texture.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/nl.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/CMake/cmCUDA_DISCOVER_DEVICE_FLAGS.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/lscm_NL/lscm_with_c_api.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmtx.cpp Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/nb_coo.h Examining data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.c FINAL RESULTS: data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp:68:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(fmt,msg); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp:69:2: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf(fms,fmt,ap); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp:95:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(fmt,msg); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp:96:2: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf(fms,fmt,ap); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp:115:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(fmt,msg); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp:116:2: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf(fms,fmt,ap); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp:148:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(fmt+1,fms); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp:162:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(fmt+1,msg); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp:163:3: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf(fms,fmt,ap); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:251:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(nfname, fname); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:550:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(triname,fname); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:551:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(vername,fname); vername[strlen(vername)-4]='\0'; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:608:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(triname,fname); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:656:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(triname,fname); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:761:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(triname,fname); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:807:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(triname,fname); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:808:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(vername,fname); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:813:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(jkkname,fname); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:995:14: [4] (buffer) fscanf: 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(!fscanf(in, "%s", token)) data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1157:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(triname,fname); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1284:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(triname,fname); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1406:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(triname,fname); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1458:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(triname,fname); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1631:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(triname,fname); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.c:112:9: [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 (sscanf(line, "%s %s %s %s %s", banner, mtx, crd, data_type, data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.c:452:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). return strcpy(s2, s); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.c:508:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer,"%s %s %s %s", types[0], types[1], types[2], types[3]); data/octave-iso2mesh-1.9.6+ds/meshfix/meshfix.cpp:166:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tname, iname); data/octave-iso2mesh-1.9.6+ds/meshfix/meshfix.cpp:174:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(oname,"%s%s%s",tname,subext,newextension); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/jrs_predicates/jrs_predicates.c:261:7: [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. a = random(); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/jrs_predicates/jrs_predicates.c:262:7: [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. b = random(); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/jrs_predicates/jrs_predicates.c:263:7: [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. c = random(); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/jrs_predicates/jrs_predicates.c:287:7: [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. a = random(); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/jrs_predicates/jrs_predicates.c:288:7: [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. b = random(); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/jrs_predicates/jrs_predicates.c:289:7: [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. c = random(); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/jrs_predicates/jrs_predicates.c:310:7: [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. a = random(); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/jrs_predicates/jrs_predicates.c:311:7: [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. b = random(); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/jrs_predicates/jrs_predicates.c:330:7: [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. a = random(); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/jrs_predicates/jrs_predicates.c:331:7: [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. c = random(); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/jrs_predicates/jrs_predicates.c:355:7: [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. a = random(); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/jrs_predicates/jrs_predicates.c:356:7: [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. c = random(); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/jrs_predicates/jrs_predicates.c:377:7: [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. a = random(); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp:64:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char fmt[2048], fms[4096]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp:67:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(fmt,"\nERROR- "); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp:74:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fms, "Try the '-rescue' command line option.\n"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp:91:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char fmt[2048], fms[4096]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp:94:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(fmt,"WARNING- "); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp:111:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char fmt[2048], fms[4096]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp:114:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(fmt,"INFO- "); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp:140:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char fmt[2048] = "\r"; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp:141:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char fms[4096]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp:142:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char rotating_bar[5] = "-\\|/"; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/JMESH/jmesh.cpp:147:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(fms,"%c",rotating_bar[wc++]); if (wc==4) wc=0; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:107:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char Swapped[16]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:158:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char line[MAX_READLINE_CHARS]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:183:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char s[256]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:198:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *line, s[2]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:209:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char header[256]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:213:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(fname,"r")) == NULL) return IO_CANTOPEN; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:250:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nfname[4096]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:257:13: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. if (i==0) {strcat(nfname,".wrl"); i=strlen(fname);} data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:366:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char floatver[32]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:371:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(floatver,"%f",v->x); sscanf(floatver,"%f",&x); v->x = x; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:372:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(floatver,"%f",v->y); sscanf(floatver,"%f",&x); v->y = x; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:373:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(floatver,"%f",v->z); sscanf(floatver,"%f",&x); v->z = x; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:387:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(fname,"r")) == NULL) return IO_CANTOPEN; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:435:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[256], *line; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:440:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(fname,"rb")) == NULL) return IO_CANTOPEN; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:500:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(fname,"r")) == NULL) return IO_CANTOPEN; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:544:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char vername[256], triname[256]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:552:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(vername,".ver"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:554:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fpv = fopen(vername,"r")) == NULL) data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:559:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fpt = fopen(triname,"r")) == NULL) data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:603:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char triname[256]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:610:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(triname,"w")) == NULL) data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:650:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char triname[256]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:658:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(triname,"w")) == NULL) data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:756:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char triname[256]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:763:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(triname,"w")) == NULL) data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:797:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char jkkname[256]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:801:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char vername[256], triname[256]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:809:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(triname,".tri"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:810:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(vername,".ver"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:814:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(jkkname,".jkk"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:817:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fpv = fopen(vername,"w")) == NULL) data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:822:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fpt = fopen(triname,"w")) == NULL) data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:829:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fpj = fopen(jkkname,"w")) == NULL) data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:916:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char c, keyword[64]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:936:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char keyword[64], dtype[64], dval[64]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:953:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char keyword[64], ptype[64], pname[64]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:980:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char keyword[64], ltype[64], uctype[64], dtype[64], dval[64]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:992:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char token[1024]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1077:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char keyword[64], formats[24], version[10]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1081:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((in = fopen(fname,"rb")) == NULL) JMesh::error("Can't open input ply file\n"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1151:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char triname[256]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1159:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(triname,"w")) == NULL) data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1210:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char c, cmd[3] = ""; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1217:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(fname,"r")) == NULL) return IO_CANTOPEN; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1279:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char triname[256]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1286:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(triname,"w")) == NULL) data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1317:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char kw[64]="", kw2[64]="", *line, facet[50]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1325:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(fname,"r")) == NULL) return IO_CANTOPEN; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1401:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char triname[256]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1408:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(triname,"w")) == NULL) data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1446:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char triname[256], mask; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1460:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(triname,"w")) == NULL) data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1610:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char triname[256], IsLittleEndian=0; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1632:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(triname,"wb")) == NULL) data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/lscm_NL/lscm_with_c_api.cpp:224: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 line[1024] ; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.c:27:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f = fopen(fname, "r")) == NULL) data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.c:98:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[MM_MAX_LINE_LENGTH]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.c:99:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char banner[MM_MAX_TOKEN_LENGTH]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.c:100:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mtx[MM_MAX_TOKEN_LENGTH]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.c:101:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char crd[MM_MAX_TOKEN_LENGTH]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.c:102:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char data_type[MM_MAX_TOKEN_LENGTH]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.c:103:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char storage_scheme[MM_MAX_TOKEN_LENGTH]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.c:191:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[MM_MAX_LINE_LENGTH]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.c:222:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[MM_MAX_LINE_LENGTH]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.c:341:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f = fopen(fname, "r")) == NULL) data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.c:408:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f = fopen(fname, "w")) == NULL) data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.c:457:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[MM_MAX_LINE_LENGTH]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.c:458:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *types[4]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.h:16:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. typedef char MM_typecode[4]; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmtx.cpp:104: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 max_iter = atoi(argv[2]); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/nb_coo.h:40:11: [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). fid = fopen(mm_filename, "r"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_blas.c:1391:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *UL[2] = { "U", "L" }; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_blas.c:1392:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *T[3] = { "N", "T", 0 }; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_blas.c:1393:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *D[2] = { "U", "N" }; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/NL/nl_blas.c:1403:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *T[3] = { "N", "T", 0 }; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/nl_single_file.c:2776:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *UL[2] = { "U", "L" }; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/nl_single_file.c:2777:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *T[3] = { "N", "T", 0 }; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/nl_single_file.c:2778:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *D[2] = { "U", "N" }; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/src/nl_single_file.c:2788:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *T[3] = { "N", "T", 0 }; data/octave-iso2mesh-1.9.6+ds/meshfix/meshfix.cpp:164:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char tname[2048]; data/octave-iso2mesh-1.9.6+ds/meshfix/meshfix.cpp:238:36: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). numberComponentsToKeep = atoi(argv[i+1]); data/octave-iso2mesh-1.9.6+ds/meshfix/meshfix.cpp:251:46: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (i>=argc-1 || (uniformRemeshSteps = atoi(argv[i+1]))<1) data/octave-iso2mesh-1.9.6+ds/meshfix/meshfix.cpp:262:44: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (i>=argc-1 || (numberOfVertices = atoi(argv[i+1]))<1) data/octave-iso2mesh-1.9.6+ds/meshfix/meshfix.cpp:267:42: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (i>=argc-1 || (smoothingSteps = atoi(argv[i+1]))<1) data/octave-iso2mesh-1.9.6+ds/meshfix/meshfix.cpp:335: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). if (i<argc-1) { nsteps = atoi(argv[i+1]); i++; } data/octave-iso2mesh-1.9.6+ds/meshfix/meshfix.cpp:342: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). if (i<argc-1) { nsteps = atoi(argv[i+1]); i++; } data/octave-iso2mesh-1.9.6+ds/meshfix/meshfix.cpp:458:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen("meshfix_log.txt","a"); data/octave-iso2mesh-1.9.6+ds/meshfix/src/cleaning.cpp:7:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char outname[2048]; data/octave-iso2mesh-1.9.6+ds/meshfix/src/cleaning.cpp:13:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outname,"%f",v->x); sscanf(outname,"%f",&a); v->x = a; data/octave-iso2mesh-1.9.6+ds/meshfix/src/cleaning.cpp:14:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outname,"%f",v->y); sscanf(outname,"%f",&a); v->y = a; data/octave-iso2mesh-1.9.6+ds/meshfix/src/cleaning.cpp:15:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(outname,"%f",v->z); sscanf(outname,"%f",&a); v->z = a; data/octave-iso2mesh-1.9.6+ds/tools/cgalmesh/mesh_3D_image.cpp:68: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). if(argc==9 && atoi(argv[8])>0){ data/octave-iso2mesh-1.9.6+ds/tools/cgalmesh/mesh_3D_image.cpp:69: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). printf("RNG seed=%d\n",atoi(argv[8])); data/octave-iso2mesh-1.9.6+ds/tools/cgalmesh/mesh_3D_image.cpp:70: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). CGAL::Random rd(atoi(argv[8])); data/octave-iso2mesh-1.9.6+ds/tools/cgalmesh/mesh_3D_image.cpp:141:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). medit_file.open(argv[2]); data/octave-iso2mesh-1.9.6+ds/tools/cgalmesh/mesh_3D_image.cpp:143:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). medit_file.open("output.mesh"); data/octave-iso2mesh-1.9.6+ds/tools/cgalmesh/mesh_polyhedral_domain.cpp:63: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). if(argc==9 && atoi(argv[8])>0){ data/octave-iso2mesh-1.9.6+ds/tools/cgalmesh/mesh_polyhedral_domain.cpp:64: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). printf("RNG seed=%d\n",atoi(argv[8])); data/octave-iso2mesh-1.9.6+ds/tools/cgalmesh/mesh_polyhedral_domain.cpp:65: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). CGAL::Random rd(atoi(argv[8])); data/octave-iso2mesh-1.9.6+ds/tools/cgalmesh/mesh_polyhedral_domain.cpp:87:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). medit_file.open(argv[2]); data/octave-iso2mesh-1.9.6+ds/tools/cgalmesh/mesh_polyhedral_domain.cpp:89:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). medit_file.open("output.mesh"); data/octave-iso2mesh-1.9.6+ds/tools/cgalsurf/mesh_a_3d_gray_image.cpp:41: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). printf("RNG seed %d\n",atoi(argv[12])); data/octave-iso2mesh-1.9.6+ds/tools/cgalsurf/mesh_a_3d_gray_image.cpp:42: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). CGAL::Random rd(atoi(argv[12])); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:162:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(in)) != '\n' && i<(MAX_READLINE_CHARS-1)) data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:187:8: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (!fscanf(fp,"%255s",s)) data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:199:99: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. do {pos0 = ftell(fp); line = readLineFromFile(fp);} while (line[0] == '#' || line[0] == '\0' || !sscanf(line,"%1s",s)); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:222: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). else if (sameString((char *)(fname+strlen(fname)-4), (char *)".obj")) err = loadOBJ(fname); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:223: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). else if (sameString((char *)(fname+strlen(fname)-4), (char *)".tri")) err = loadVerTri(fname); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:224: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). else if (sameString((char *)(fname+strlen(fname)-4), (char *)".stl")) err = loadSTL(fname); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:254:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t i=strlen(fname)-1; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:257:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (i==0) {strcat(nfname,".wrl"); i=strlen(fname);} data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:442:6: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if(!fscanf(fp,"%255s",s)) JMesh::error("fscanf %s:%d failed.", __FILE__, __LINE__); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:444:81: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. do {line = readLineFromFile(fp);} while (line[0] == '#' || line[0] == '\0' || !sscanf(line,"%256s",s)); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:548:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!sameString((char *)(fname+strlen(fname)-4), (char *)".tri")) return IO_UNKNOWN; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:551:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strcpy(vername,fname); vername[strlen(vername)-4]='\0'; data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:919:7: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (!fscanf(in,"%64s ",keyword)) JMesh::error("Unexpected token or end of file!\n"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:922:15: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(in)) != '\n') if (c==EOF) JMesh::error("\nUnexpected end of file!\n"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:923:8: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (!fscanf(in,"%64s ",keyword)) JMesh::error("Unexpected token or end of file!\n"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:926:7: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (!fscanf(in,"%64s ",keyword)) JMesh::error("Unexpected token or end of file!\n"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:937:6: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (fscanf(in,"%64s %64s %64s\n",keyword,dtype,dval) < 3) JMesh::error("Unexpected token or end of file!\n"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:941:6: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (fscanf(in,"%64s %64s %64s\n",keyword,dtype,dval) < 3) JMesh::error("Unexpected token or end of file!\n"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:945:6: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (fscanf(in,"%64s %64s %64s\n",keyword,dtype,dval) < 3) JMesh::error("Unexpected token or end of file!\n"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:957:7: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (!sscanf(rline,"%64s ",keyword)) JMesh::error("Unexpected token or end of file!\n"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:960:7: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (sscanf(rline,"%64s %64s %64s",keyword,ptype,pname) < 3) JMesh::error("Unexpected token or end of file!\n"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:971:8: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (!sscanf(readLineFromFile(in),"%64s ",keyword)) JMesh::error("Unexpected token or end of file!\n"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:981:6: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (fscanf(in,"%64s %64s %64s %64s %64s\n",keyword,ltype,uctype,dtype,dval) < 5) JMesh::error("Unexpected token or end of file!\n"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:997:28: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). else for (i=0; i<oh; i++) fgetc(in); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1084:6: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (sscanf(readLineFromFile(in),"%7s %24s %10s",keyword,formats,version) < 3) JMesh::error("Unexpected token or end of file!\n"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1100:7: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (!sscanf(readLineFromFile(in),"%64s ",keyword)) JMesh::error("Unexpected token or end of file!\n"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1102:8: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (!sscanf(readLineFromFile(in),"%64s ",keyword)) JMesh::error("Unexpected token or end of file!\n"); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1220:9: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. while (fscanf(fp, "%2s", cmd) && cmd[0] != '\0') data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1249:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c=fgetc(fp)) != EOF && isspace(c) && c != '\n' && c != '\r'); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1327:7: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (!fscanf(fp,"%5s",kw)) JMesh::error("fscanf %s:%d failed.", __FILE__, __LINE__); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1357:4: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. sscanf(line,"%64s %f %f %f",kw,&x,&y,&z); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/JMeshLib/src/MESH_STRUCTURE/io.cpp:1360:5: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. sscanf(line,"%64s %64s %f %f %f",kw,kw2,&x,&y,&z); data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.c:122:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(banner, MatrixMarketBanner, strlen(MatrixMarketBanner)) != 0) data/octave-iso2mesh-1.9.6+ds/meshfix/contrib/OpenNL3.2.1/examples/mmtx/mmio.c:450:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(s); data/octave-iso2mesh-1.9.6+ds/meshfix/meshfix.cpp:165:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *oname = (char *)malloc(strlen(iname)+strlen(subext)+strlen(newextension)+1); data/octave-iso2mesh-1.9.6+ds/meshfix/meshfix.cpp:165:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *oname = (char *)malloc(strlen(iname)+strlen(subext)+strlen(newextension)+1); data/octave-iso2mesh-1.9.6+ds/meshfix/meshfix.cpp:165:60: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *oname = (char *)malloc(strlen(iname)+strlen(subext)+strlen(newextension)+1); data/octave-iso2mesh-1.9.6+ds/meshfix/meshfix.cpp:169:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int tl = strlen(tname), nl = strlen(newextension); data/octave-iso2mesh-1.9.6+ds/meshfix/meshfix.cpp:169: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). int tl = strlen(tname), nl = strlen(newextension); data/octave-iso2mesh-1.9.6+ds/meshfix/meshfix.cpp:173:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(stripExt) for (int n=strlen(tname)-1; n>0; n--) if (tname[n]=='.') {tname[n] = '\0'; break;} data/octave-iso2mesh-1.9.6+ds/tools/cgalmesh/mesh_3D_image.cpp:76:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). image.read(argv[1]); ANALYSIS SUMMARY: Hits = 198 Lines analyzed = 34805 in approximately 1.05 seconds (33149 lines/second) Physical Source Lines of Code (SLOC) = 22000 Hits@level = [0] 379 [1] 41 [2] 115 [3] 13 [4] 29 [5] 0 Hits@level+ = [0+] 577 [1+] 198 [2+] 157 [3+] 42 [4+] 29 [5+] 0 Hits/KSLOC@level+ = [0+] 26.2273 [1+] 9 [2+] 7.13636 [3+] 1.90909 [4+] 1.31818 [5+] 0 Dot directories skipped = 2 (--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.