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/p4est-2.2/sc/example/bspline/bspline.c Examining data/p4est-2.2/sc/example/bspline/bspline_per.c Examining data/p4est-2.2/sc/example/dmatrix/dmatrix.c Examining data/p4est-2.2/sc/example/function/function.c Examining data/p4est-2.2/sc/example/logging/logging.c Examining data/p4est-2.2/sc/example/openmp/openmp.c Examining data/p4est-2.2/sc/example/options/logging.c Examining data/p4est-2.2/sc/example/options/options.c Examining data/p4est-2.2/sc/example/pthread/condvar.c Examining data/p4est-2.2/sc/example/pthread/pthread.c Examining data/p4est-2.2/sc/example/testing/sc_test_shmem.c Examining data/p4est-2.2/sc/example/warp/warp.c Examining data/p4est-2.2/sc/iniparser/dictionary.c Examining data/p4est-2.2/sc/iniparser/dictionary.h Examining data/p4est-2.2/sc/iniparser/iniexample.c Examining data/p4est-2.2/sc/iniparser/iniparser.c Examining data/p4est-2.2/sc/iniparser/iniparser.h Examining data/p4est-2.2/sc/libb64/b64dec.c Examining data/p4est-2.2/sc/libb64/b64enc.c Examining data/p4est-2.2/sc/libb64/cdecode.c Examining data/p4est-2.2/sc/libb64/cencode.c Examining data/p4est-2.2/sc/libb64/libb64.h Examining data/p4est-2.2/sc/src/sc.c Examining data/p4est-2.2/sc/src/sc.h Examining data/p4est-2.2/sc/src/sc_allgather.c Examining data/p4est-2.2/sc/src/sc_allgather.h Examining data/p4est-2.2/sc/src/sc_amr.c Examining data/p4est-2.2/sc/src/sc_amr.h Examining data/p4est-2.2/sc/src/sc_avl.c Examining data/p4est-2.2/sc/src/sc_avl.h Examining data/p4est-2.2/sc/src/sc_blas.c Examining data/p4est-2.2/sc/src/sc_blas.h Examining data/p4est-2.2/sc/src/sc_bspline.c Examining data/p4est-2.2/sc/src/sc_bspline.h Examining data/p4est-2.2/sc/src/sc_builtin/getopt.h Examining data/p4est-2.2/sc/src/sc_builtin/getopt_int.h Examining data/p4est-2.2/sc/src/sc_builtin/obstack.h Examining data/p4est-2.2/sc/src/sc_containers.c Examining data/p4est-2.2/sc/src/sc_containers.h Examining data/p4est-2.2/sc/src/sc_dmatrix.c Examining data/p4est-2.2/sc/src/sc_dmatrix.h Examining data/p4est-2.2/sc/src/sc_flops.c Examining data/p4est-2.2/sc/src/sc_flops.h Examining data/p4est-2.2/sc/src/sc_functions.c Examining data/p4est-2.2/sc/src/sc_functions.h Examining data/p4est-2.2/sc/src/sc_getopt.c Examining data/p4est-2.2/sc/src/sc_getopt.h Examining data/p4est-2.2/sc/src/sc_getopt1.c Examining data/p4est-2.2/sc/src/sc_io.c Examining data/p4est-2.2/sc/src/sc_io.h Examining data/p4est-2.2/sc/src/sc_keyvalue.c Examining data/p4est-2.2/sc/src/sc_keyvalue.h Examining data/p4est-2.2/sc/src/sc_lapack.c Examining data/p4est-2.2/sc/src/sc_lapack.h Examining data/p4est-2.2/sc/src/sc_lua.h Examining data/p4est-2.2/sc/src/sc_mpi.c Examining data/p4est-2.2/sc/src/sc_mpi.h Examining data/p4est-2.2/sc/src/sc_notify.c Examining data/p4est-2.2/sc/src/sc_notify.h Examining data/p4est-2.2/sc/src/sc_obstack.c Examining data/p4est-2.2/sc/src/sc_obstack.h Examining data/p4est-2.2/sc/src/sc_options.c Examining data/p4est-2.2/sc/src/sc_options.h Examining data/p4est-2.2/sc/src/sc_polynom.c Examining data/p4est-2.2/sc/src/sc_polynom.h Examining data/p4est-2.2/sc/src/sc_private.h Examining data/p4est-2.2/sc/src/sc_random.c Examining data/p4est-2.2/sc/src/sc_random.h Examining data/p4est-2.2/sc/src/sc_ranges.c Examining data/p4est-2.2/sc/src/sc_ranges.h Examining data/p4est-2.2/sc/src/sc_reduce.c Examining data/p4est-2.2/sc/src/sc_reduce.h Examining data/p4est-2.2/sc/src/sc_refcount.c Examining data/p4est-2.2/sc/src/sc_refcount.h Examining data/p4est-2.2/sc/src/sc_search.c Examining data/p4est-2.2/sc/src/sc_search.h Examining data/p4est-2.2/sc/src/sc_shmem.c Examining data/p4est-2.2/sc/src/sc_shmem.h Examining data/p4est-2.2/sc/src/sc_sort.c Examining data/p4est-2.2/sc/src/sc_sort.h Examining data/p4est-2.2/sc/src/sc_statistics.c Examining data/p4est-2.2/sc/src/sc_statistics.h Examining data/p4est-2.2/sc/src/sc_string.c Examining data/p4est-2.2/sc/src/sc_string.h Examining data/p4est-2.2/sc/src/sc_unique_counter.c Examining data/p4est-2.2/sc/src/sc_unique_counter.h Examining data/p4est-2.2/sc/src/sc_warp.c Examining data/p4est-2.2/sc/src/sc_warp.h Examining data/p4est-2.2/sc/test/test_allgather.c Examining data/p4est-2.2/sc/test/test_arrays.c Examining data/p4est-2.2/sc/test/test_builtin.c Examining data/p4est-2.2/sc/test/test_darray_work.c Examining data/p4est-2.2/sc/test/test_dmatrix_pool.c Examining data/p4est-2.2/sc/test/test_io_sink.c Examining data/p4est-2.2/sc/test/test_keyvalue.c Examining data/p4est-2.2/sc/test/test_node_comm.c Examining data/p4est-2.2/sc/test/test_notify.c Examining data/p4est-2.2/sc/test/test_pqueue.c Examining data/p4est-2.2/sc/test/test_reduce.c Examining data/p4est-2.2/sc/test/test_search.c Examining data/p4est-2.2/sc/test/test_sort.c Examining data/p4est-2.2/sc/test/test_sortb.c Examining data/p4est-2.2/sc/test/test_dmatrix.c Examining data/p4est-2.2/doc/attic/p8est_trilinear.c Examining data/p4est-2.2/doc/attic/p8est_trilinear.h Examining data/p4est-2.2/doc/attic/p8est_trilinear_lnodes.c Examining data/p4est-2.2/doc/attic/p8est_trilinear_nodes.c Examining data/p4est-2.2/example/balance_seeds/balance_seeds2.c Examining data/p4est-2.2/example/balance_seeds/balance_seeds3.c Examining data/p4est-2.2/example/mesh/mesh2.c Examining data/p4est-2.2/example/mesh/mesh3.c Examining data/p4est-2.2/example/mesh/periodicity3.c Examining data/p4est-2.2/example/points/points2.c Examining data/p4est-2.2/example/points/points3.c Examining data/p4est-2.2/example/simple/simple2.c Examining data/p4est-2.2/example/simple/simple3.c Examining data/p4est-2.2/example/steps/hw32.h Examining data/p4est-2.2/example/steps/p4est_step1.c Examining data/p4est-2.2/example/steps/p4est_step2.c Examining data/p4est-2.2/example/steps/p4est_step3.c Examining data/p4est-2.2/example/steps/p4est_step4.c Examining data/p4est-2.2/example/steps/p8est_step1.c Examining data/p4est-2.2/example/steps/p8est_step2.c Examining data/p4est-2.2/example/steps/p8est_step3.c Examining data/p4est-2.2/example/steps/p8est_step4.c Examining data/p4est-2.2/example/tetgen/read_conn2.c Examining data/p4est-2.2/example/tetgen/read_conn3.c Examining data/p4est-2.2/example/tetgen/read_tetgen.c Examining data/p4est-2.2/example/tetgen/write_conn2.c Examining data/p4est-2.2/example/tetgen/write_conn3.c Examining data/p4est-2.2/example/timings/bricks2.c Examining data/p4est-2.2/example/timings/bricks3.c Examining data/p4est-2.2/example/timings/loadconn2.c Examining data/p4est-2.2/example/timings/loadconn3.c Examining data/p4est-2.2/example/timings/timings2.c Examining data/p4est-2.2/example/timings/timings3.c Examining data/p4est-2.2/example/timings/tsearch3.c Examining data/p4est-2.2/src/p4est.c Examining data/p4est-2.2/src/p4est.h Examining data/p4est-2.2/src/p4est_algorithms.c Examining data/p4est-2.2/src/p4est_algorithms.h Examining data/p4est-2.2/src/p4est_balance.c Examining data/p4est-2.2/src/p4est_balance.h Examining data/p4est-2.2/src/p4est_base.c Examining data/p4est-2.2/src/p4est_base.h Examining data/p4est-2.2/src/p4est_bits.c Examining data/p4est-2.2/src/p4est_bits.h Examining data/p4est-2.2/src/p4est_build.c Examining data/p4est-2.2/src/p4est_build.h Examining data/p4est-2.2/src/p4est_communication.c Examining data/p4est-2.2/src/p4est_communication.h Examining data/p4est-2.2/src/p4est_connectivity.c Examining data/p4est-2.2/src/p4est_connectivity.h Examining data/p4est-2.2/src/p4est_connrefine.c Examining data/p4est-2.2/src/p4est_empty.c Examining data/p4est-2.2/src/p4est_empty.h Examining data/p4est-2.2/src/p4est_extended.h Examining data/p4est-2.2/src/p4est_geometry.c Examining data/p4est-2.2/src/p4est_geometry.h Examining data/p4est-2.2/src/p4est_ghost.c Examining data/p4est-2.2/src/p4est_ghost.h Examining data/p4est-2.2/src/p4est_io.c Examining data/p4est-2.2/src/p4est_io.h Examining data/p4est-2.2/src/p4est_iterate.c Examining data/p4est-2.2/src/p4est_iterate.h Examining data/p4est-2.2/src/p4est_lnodes.c Examining data/p4est-2.2/src/p4est_lnodes.h Examining data/p4est-2.2/src/p4est_mesh.c Examining data/p4est-2.2/src/p4est_mesh.h Examining data/p4est-2.2/src/p4est_nodes.c Examining data/p4est-2.2/src/p4est_nodes.h Examining data/p4est-2.2/src/p4est_plex.c Examining data/p4est-2.2/src/p4est_plex.h Examining data/p4est-2.2/src/p4est_points.c Examining data/p4est-2.2/src/p4est_points.h Examining data/p4est-2.2/src/p4est_search.c Examining data/p4est-2.2/src/p4est_search.h Examining data/p4est-2.2/src/p4est_to_p8est.h Examining data/p4est-2.2/src/p4est_to_p8est_empty.h Examining data/p4est-2.2/src/p4est_vtk.c Examining data/p4est-2.2/src/p4est_vtk.h Examining data/p4est-2.2/src/p4est_wrap.c Examining data/p4est-2.2/src/p4est_wrap.h Examining data/p4est-2.2/src/p6est.c Examining data/p4est-2.2/src/p6est.h Examining data/p4est-2.2/src/p6est_communication.c Examining data/p4est-2.2/src/p6est_communication.h Examining data/p4est-2.2/src/p6est_empty.c Examining data/p4est-2.2/src/p6est_empty.h Examining data/p4est-2.2/src/p6est_extended.h Examining data/p4est-2.2/src/p6est_ghost.c Examining data/p4est-2.2/src/p6est_ghost.h Examining data/p4est-2.2/src/p6est_lnodes.c Examining data/p4est-2.2/src/p6est_lnodes.h Examining data/p4est-2.2/src/p6est_profile.c Examining data/p4est-2.2/src/p6est_profile.h Examining data/p4est-2.2/src/p6est_vtk.c Examining data/p4est-2.2/src/p6est_vtk.h Examining data/p4est-2.2/src/p8est.c Examining data/p4est-2.2/src/p8est.h Examining data/p4est-2.2/src/p8est_algorithms.c Examining data/p4est-2.2/src/p8est_algorithms.h Examining data/p4est-2.2/src/p8est_balance.c Examining data/p4est-2.2/src/p8est_balance.h Examining data/p4est-2.2/src/p8est_bits.c Examining data/p4est-2.2/src/p8est_bits.h Examining data/p4est-2.2/src/p8est_build.c Examining data/p4est-2.2/src/p8est_build.h Examining data/p4est-2.2/src/p8est_communication.c Examining data/p4est-2.2/src/p8est_communication.h Examining data/p4est-2.2/src/p8est_connectivity.c Examining data/p4est-2.2/src/p8est_connectivity.h Examining data/p4est-2.2/src/p8est_connrefine.c Examining data/p4est-2.2/src/p8est_empty.c Examining data/p4est-2.2/src/p8est_empty.h Examining data/p4est-2.2/src/p8est_extended.h Examining data/p4est-2.2/src/p8est_geometry.c Examining data/p4est-2.2/src/p8est_geometry.h Examining data/p4est-2.2/src/p8est_ghost.c Examining data/p4est-2.2/src/p8est_ghost.h Examining data/p4est-2.2/src/p8est_io.c Examining data/p4est-2.2/src/p8est_io.h Examining data/p4est-2.2/src/p8est_iterate.c Examining data/p4est-2.2/src/p8est_iterate.h Examining data/p4est-2.2/src/p8est_lnodes.c Examining data/p4est-2.2/src/p8est_lnodes.h Examining data/p4est-2.2/src/p8est_mesh.c Examining data/p4est-2.2/src/p8est_mesh.h Examining data/p4est-2.2/src/p8est_nodes.c Examining data/p4est-2.2/src/p8est_nodes.h Examining data/p4est-2.2/src/p8est_plex.c Examining data/p4est-2.2/src/p8est_plex.h Examining data/p4est-2.2/src/p8est_points.c Examining data/p4est-2.2/src/p8est_points.h Examining data/p4est-2.2/src/p8est_search.c Examining data/p4est-2.2/src/p8est_search.h Examining data/p4est-2.2/src/p8est_tets_hexes.c Examining data/p4est-2.2/src/p8est_tets_hexes.h Examining data/p4est-2.2/src/p8est_vtk.c Examining data/p4est-2.2/src/p8est_vtk.h Examining data/p4est-2.2/src/p8est_wrap.c Examining data/p4est-2.2/src/p8est_wrap.h Examining data/p4est-2.2/test/test_all6.c Examining data/p4est-2.2/test/test_balance2.c Examining data/p4est-2.2/test/test_balance3.c Examining data/p4est-2.2/test/test_balance_seeds2.c Examining data/p4est-2.2/test/test_balance_seeds3.c Examining data/p4est-2.2/test/test_balance_type2.c Examining data/p4est-2.2/test/test_balance_type3.c Examining data/p4est-2.2/test/test_brick2.c Examining data/p4est-2.2/test/test_brick3.c Examining data/p4est-2.2/test/test_coarsen2.c Examining data/p4est-2.2/test/test_coarsen3.c Examining data/p4est-2.2/test/test_comm.c Examining data/p4est-2.2/test/test_complete_subtree.c Examining data/p4est-2.2/test/test_conn_complete2.c Examining data/p4est-2.2/test/test_conn_complete3.c Examining data/p4est-2.2/test/test_conn_reduce2.c Examining data/p4est-2.2/test/test_conn_reduce3.c Examining data/p4est-2.2/test/test_conn_transformation2.c Examining data/p4est-2.2/test/test_conn_transformation3.c Examining data/p4est-2.2/test/test_connrefine2.c Examining data/p4est-2.2/test/test_connrefine3.c Examining data/p4est-2.2/test/test_edge_face_corners3.c Examining data/p4est-2.2/test/test_face_transform3.c Examining data/p4est-2.2/test/test_ghost2.c Examining data/p4est-2.2/test/test_ghost3.c Examining data/p4est-2.2/test/test_hash.c Examining data/p4est-2.2/test/test_iterate2.c Examining data/p4est-2.2/test/test_iterate3.c Examining data/p4est-2.2/test/test_join2.c Examining data/p4est-2.2/test/test_join3.c Examining data/p4est-2.2/test/test_lnodes2.c Examining data/p4est-2.2/test/test_lnodes3.c Examining data/p4est-2.2/test/test_load2.c Examining data/p4est-2.2/test/test_load3.c Examining data/p4est-2.2/test/test_loadsave2.c Examining data/p4est-2.2/test/test_loadsave3.c Examining data/p4est-2.2/test/test_nodes2.c Examining data/p4est-2.2/test/test_nodes3.c Examining data/p4est-2.2/test/test_order.c Examining data/p4est-2.2/test/test_partition2.c Examining data/p4est-2.2/test/test_partition3.c Examining data/p4est-2.2/test/test_partition_corr2.c Examining data/p4est-2.2/test/test_partition_corr3.c Examining data/p4est-2.2/test/test_periodic3.c Examining data/p4est-2.2/test/test_plex2.c Examining data/p4est-2.2/test/test_plex3.c Examining data/p4est-2.2/test/test_quadrants2.c Examining data/p4est-2.2/test/test_quadrants3.c Examining data/p4est-2.2/test/test_reorder2.c Examining data/p4est-2.2/test/test_reorder3.c Examining data/p4est-2.2/test/test_replace2.c Examining data/p4est-2.2/test/test_replace3.c Examining data/p4est-2.2/test/test_search2.c Examining data/p4est-2.2/test/test_search3.c Examining data/p4est-2.2/test/test_subcomm2.c Examining data/p4est-2.2/test/test_subcomm3.c Examining data/p4est-2.2/test/test_valid2.c Examining data/p4est-2.2/test/test_valid3.c Examining data/p4est-2.2/test/test_wrap2.c Examining data/p4est-2.2/test/test_wrap3.c FINAL RESULTS: data/p4est-2.2/example/steps/p4est_step3.c:527:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf (filename, BUFSIZ, P4EST_STRING "_step3_%04d", timestep); data/p4est-2.2/sc/iniparser/dictionary.c:68:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(t,s); data/p4est-2.2/sc/iniparser/iniparser.c:83:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(l, s); data/p4est-2.2/sc/iniparser/iniparser.c:255:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(keym, "%s:", s); data/p4est-2.2/sc/iniparser/iniparser.c:290:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(keym, "%s:", s); data/p4est-2.2/sc/iniparser/iniparser.c:336:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(keym, "%s:", s); data/p4est-2.2/sc/iniparser/iniparser.c:565:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(line, strstrip(input_line)); data/p4est-2.2/sc/iniparser/iniparser.c:578:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(section, strstrip(section)); data/p4est-2.2/sc/iniparser/iniparser.c:579:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(section, strlwc(section)); data/p4est-2.2/sc/iniparser/iniparser.c:585:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(key, strstrip(key)); data/p4est-2.2/sc/iniparser/iniparser.c:586:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(key, strlwc(key)); data/p4est-2.2/sc/iniparser/iniparser.c:587:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(value, strstrip(value)); data/p4est-2.2/sc/iniparser/iniparser.c:604:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(key, strstrip(key)); data/p4est-2.2/sc/iniparser/iniparser.c:605:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(key, strlwc(key)); data/p4est-2.2/sc/iniparser/iniparser.c:702:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp, "%s:%s", section, key); data/p4est-2.2/sc/src/sc.c:851:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf (buffer, BUFSIZ, fmt, ap); data/p4est-2.2/sc/src/sc.c:985:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf (buffer, BUFSIZ, fmt, ap); data/p4est-2.2/sc/src/sc.h:205:27: [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, 1, 2))) data/p4est-2.2/sc/src/sc.h:208:27: [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/p4est-2.2/sc/src/sc.h:380:27: [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/p4est-2.2/sc/src/sc.h:382:27: [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/p4est-2.2/sc/src/sc.h:384:27: [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/p4est-2.2/sc/src/sc.h:406:27: [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, 1, 2))); data/p4est-2.2/sc/src/sc.h:408:27: [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, 1, 2))); data/p4est-2.2/sc/src/sc.h:410:27: [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, 1, 2))); data/p4est-2.2/sc/src/sc.h:412:27: [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, 1, 2))); data/p4est-2.2/sc/src/sc.h:414:27: [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, 1, 2))); data/p4est-2.2/sc/src/sc.h:416:27: [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, 1, 2))); data/p4est-2.2/sc/src/sc.h:418:27: [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, 1, 2))); data/p4est-2.2/sc/src/sc.h:420:27: [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, 1, 2))); data/p4est-2.2/sc/src/sc.h:450:27: [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, 1, 2))); data/p4est-2.2/sc/src/sc.h:452:27: [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, 1, 2))); data/p4est-2.2/sc/src/sc.h:454:27: [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, 1, 2))); data/p4est-2.2/sc/src/sc.h:456:27: [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, 1, 2))); data/p4est-2.2/sc/src/sc.h:458:27: [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, 1, 2))); data/p4est-2.2/sc/src/sc.h:460:27: [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, 1, 2))); data/p4est-2.2/sc/src/sc.h:462:27: [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, 1, 2))); data/p4est-2.2/sc/src/sc.h:464:27: [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, 1, 2))); data/p4est-2.2/sc/src/sc.h:540:27: [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, 6, 7))); data/p4est-2.2/sc/src/sc.h:569:27: [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/p4est-2.2/sc/src/sc_string.c:78:12: [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. result = vsnprintf (scs->buffer + scs->printed, remain, fmt, ap); data/p4est-2.2/sc/src/sc_string.h:85:27: [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/p4est-2.2/src/p4est_base.h:210:27: [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/p4est-2.2/src/p4est_base.h:212:27: [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/p4est-2.2/src/p4est_base.h:230:27: [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, 1, 2))); data/p4est-2.2/src/p4est_base.h:232:27: [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, 1, 2))); data/p4est-2.2/src/p4est_base.h:234:27: [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, 1, 2))); data/p4est-2.2/src/p4est_base.h:236:27: [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, 1, 2))); data/p4est-2.2/src/p4est_base.h:238:27: [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, 1, 2))); data/p4est-2.2/src/p4est_base.h:240:27: [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, 1, 2))); data/p4est-2.2/src/p4est_base.h:242:27: [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, 1, 2))); data/p4est-2.2/src/p4est_base.h:244:27: [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, 1, 2))); data/p4est-2.2/src/p4est_base.h:276:27: [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, 1, 2))); data/p4est-2.2/src/p4est_base.h:278:27: [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, 1, 2))); data/p4est-2.2/src/p4est_base.h:280:27: [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, 1, 2))); data/p4est-2.2/src/p4est_base.h:282:27: [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, 1, 2))); data/p4est-2.2/src/p4est_base.h:284:27: [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, 1, 2))); data/p4est-2.2/src/p4est_base.h:286:27: [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, 1, 2))); data/p4est-2.2/src/p4est_base.h:288:27: [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, 1, 2))); data/p4est-2.2/src/p4est_base.h:290:27: [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, 1, 2))); data/p4est-2.2/src/p4est_connectivity.c:4482:18: [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 the scanf format is influenceable by an attacker, it's exploitable. retval = sscanf (line, "%*d, %lld, %lld, %lld, %lld" data/p4est-2.2/src/p4est_vtk.c:619:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (cont->vtufile, data/p4est-2.2/src/p4est_vtk.c:1142:7: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf (vtkCellDataString + printed, BUFSIZ - printed, data/p4est-2.2/src/p4est_vtk.c:1147:7: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf (vtkCellDataString + printed, BUFSIZ - printed, data/p4est-2.2/src/p4est_vtk.c:1152:7: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf (vtkCellDataString + printed, BUFSIZ - printed, data/p4est-2.2/src/p4est_vtk.c:1157:7: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf (vtkCellDataString + printed, BUFSIZ - printed, data/p4est-2.2/src/p4est_vtk.c:1462: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 (cont->vtufile, data/p4est-2.2/src/p4est_vtk.c:1476: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 (cont->vtufile, data/p4est-2.2/src/p4est_vtk.c:1582: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 (cont->vtufile, data/p4est-2.2/src/p4est_vtk.c:1594: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 (cont->vtufile, data/p4est-2.2/example/timings/tsearch3.c:954:3: [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 (tsg->mpisize); data/p4est-2.2/sc/src/sc.c:1186:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. trace_file_name = getenv ("SC_TRACE_FILE"); data/p4est-2.2/sc/src/sc.c:1200: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. trace_file_prio = getenv ("SC_TRACE_LP"); data/p4est-2.2/sc/src/sc_builtin/getopt.h:152:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) data/p4est-2.2/sc/src/sc_builtin/getopt.h:155:12: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt (); data/p4est-2.2/sc/src/sc_builtin/getopt.h:159:12: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. extern int getopt_long (int ___argc, char *const *___argv, data/p4est-2.2/sc/src/sc_getopt.c:101:9: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. #ifndef getenv data/p4est-2.2/sc/src/sc_getopt.c:102:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. extern char *getenv (); data/p4est-2.2/sc/src/sc_getopt.c:239: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. d->__posixly_correct = !!getenv ("POSIXLY_CORRECT"); data/p4est-2.2/sc/src/sc_getopt.c:1102:1: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt (int argc, char *const *argv, const char *optstring) data/p4est-2.2/sc/src/sc_getopt1.c:32:1: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt_long (int argc, char *const *argv, const char *options, data/p4est-2.2/sc/src/sc_options.c:1174:9: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long (argc, argv, optstring, longopts, &option_index); data/p4est-2.2/sc/test/test_builtin.c:55:18: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((copt = getopt_long (argc, argv, "cnt:", sopt, &lindex)) != -1) { data/p4est-2.2/sc/test/test_node_comm.c:50:16: [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. myval[i] = random (); data/p4est-2.2/sc/test/test_node_comm.c:122:3: [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 (rank); data/p4est-2.2/sc/test/test_sort.c:60: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 ((unsigned) rank << 15); data/p4est-2.2/sc/test/test_sortb.c:65:3: [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 (17 + (int) total); data/p4est-2.2/test/test_balance_seeds2.c:335:3: [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 (9212007); data/p4est-2.2/test/test_balance_seeds2.c:404: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. level = ((random ()) % (P4EST_QMAXLEVEL - maxlevel)) + maxlevel + 1; data/p4est-2.2/test/test_balance_seeds2.c:409:15: [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. i = ((random ()) % (ilast + 1 - ifirst)) + ifirst; data/p4est-2.2/test/test_balance_seeds2.c:491: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. level = ((random ()) % (P4EST_QMAXLEVEL - maxlevel)) + maxlevel + 1; data/p4est-2.2/test/test_balance_seeds2.c:496:15: [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. i = ((random ()) % (ilast + 1 - ifirst)) + ifirst; data/p4est-2.2/test/test_balance_seeds2.c:582: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. level = ((random ()) % (P4EST_QMAXLEVEL - maxlevel)) + maxlevel + 1; data/p4est-2.2/test/test_balance_seeds2.c:587:15: [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. i = ((random ()) % (ilast + 1 - ifirst)) + ifirst; data/p4est-2.2/doc/attic/p8est_trilinear_lnodes.c:320:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (local_nodes.array, nodes->element_nodes, data/p4est-2.2/example/mesh/mesh2.c:489: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). refine_level = atoi (argv[2]); data/p4est-2.2/example/points/points2.c:67:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen (filename, "rb"); data/p4est-2.2/example/points/points2.c:122: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 buffer[BUFSIZ]; data/p4est-2.2/example/points/points2.c:201: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). maxlevel = atoi (argv[2]); data/p4est-2.2/example/points/points2.c:207: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). max_points = (p4est_locidx_t) atoi (argv[3]); data/p4est-2.2/example/simple/simple2.c:298: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). refine_level = atoi (argv[2]); data/p4est-2.2/example/simple/simple3.c:236: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). refine_level = atoi (argv[2]); data/p4est-2.2/example/steps/p4est_step1.c:67:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char p[3]; data/p4est-2.2/example/steps/p4est_step2.c:104: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). refine_level = atoi (argv[2]); data/p4est-2.2/example/steps/p4est_step3.c:521: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 filename[BUFSIZ] = ""; data/p4est-2.2/example/steps/p4est_step4.c:395:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (y, x, nloc * sizeof (double)); data/p4est-2.2/example/tetgen/read_tetgen.c:34: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 afilename[BUFSIZ]; data/p4est-2.2/example/tetgen/write_conn2.c:38:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZ]; data/p4est-2.2/example/timings/bricks2.c:71: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 filename[BUFSIZ]; data/p4est-2.2/example/timings/loadconn2.c:70: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 filename[BUFSIZ]; data/p4est-2.2/sc/example/bspline/bspline.c:31: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 filename[BUFSIZ]; data/p4est-2.2/sc/example/bspline/bspline.c:42:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). gf = fopen (filename, "wb"); data/p4est-2.2/sc/example/bspline/bspline.c:159:7: [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 (argv[1]); data/p4est-2.2/sc/example/bspline/bspline_per.c:31: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 filename[BUFSIZ]; data/p4est-2.2/sc/example/bspline/bspline_per.c:42:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). gf = fopen (filename, "wb"); data/p4est-2.2/sc/example/bspline/bspline_per.c:159:7: [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 (argv[1]); data/p4est-2.2/sc/example/testing/sc_test_shmem.c:47:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char outstring[BUFSIZ]; data/p4est-2.2/sc/iniparser/dictionary.c:46:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(newptr, ptr, size); data/p4est-2.2/sc/iniparser/dictionary.c:365: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 cval[90] ; data/p4est-2.2/sc/iniparser/dictionary.c:374:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cval, "%04d", i); data/p4est-2.2/sc/iniparser/dictionary.c:379:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cval, "%04d", i); data/p4est-2.2/sc/iniparser/dictionary.c:387:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cval, "%04d", i); data/p4est-2.2/sc/iniparser/iniexample.c:28: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). ini = fopen("example.ini", "w"); data/p4est-2.2/sc/iniparser/iniparser.c:46: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 l[ASCIILINESZ+1]; data/p4est-2.2/sc/iniparser/iniparser.c:76: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 l[ASCIILINESZ+1]; data/p4est-2.2/sc/iniparser/iniparser.c:247: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 keym[ASCIILINESZ+1]; data/p4est-2.2/sc/iniparser/iniparser.c:281: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 keym[ASCIILINESZ+1]; data/p4est-2.2/sc/iniparser/iniparser.c:323: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 keym[ASCIILINESZ+1]; data/p4est-2.2/sc/iniparser/iniparser.c:562: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[ASCIILINESZ+1]; data/p4est-2.2/sc/iniparser/iniparser.c:633: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 [ASCIILINESZ+1] ; data/p4est-2.2/sc/iniparser/iniparser.c:634: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 section [ASCIILINESZ+1] ; data/p4est-2.2/sc/iniparser/iniparser.c:635: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 key [ASCIILINESZ+1] ; data/p4est-2.2/sc/iniparser/iniparser.c:636: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 tmp [ASCIILINESZ+1] ; data/p4est-2.2/sc/iniparser/iniparser.c:637: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 val [ASCIILINESZ+1] ; data/p4est-2.2/sc/iniparser/iniparser.c:646: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 ((in=fopen(ininame, "r"))==NULL) { data/p4est-2.2/sc/src/sc.c:287: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 bn[BUFSIZ], *bp; data/p4est-2.2/sc/src/sc.c:392: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 **) ptr)[-1] = alloc_ptr; data/p4est-2.2/sc/src/sc.c:393: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 **) ptr)[-2] = (char *) size; data/p4est-2.2/sc/src/sc.c:439: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. alloc_ptr = ((char **) ptr)[-1]; data/p4est-2.2/sc/src/sc.c:444:27: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. ssize = (ptrdiff_t) ((char **) ptr)[-2]; data/p4est-2.2/sc/src/sc.c:453:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. SC_ASSERT (((char *) ptr)[ssize + i] == (char) -2); data/p4est-2.2/sc/src/sc.c:495:27: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. old_size = (size_t) ((char **) ptr)[-2]; data/p4est-2.2/sc/src/sc.c:502:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (new_ptr, ptr, min_size); data/p4est-2.2/sc/src/sc.c:622:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (d, s, len); data/p4est-2.2/sc/src/sc.c:846: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 buffer[BUFSIZ]; data/p4est-2.2/sc/src/sc.c:983: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 buffer[BUFSIZ]; data/p4est-2.2/sc/src/sc.c:1188: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[BUFSIZ]; data/p4est-2.2/sc/src/sc.c:1197:21: [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). sc_trace_file = fopen (buffer, "wb"); data/p4est-2.2/sc/src/sc_allgather.c:162:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (((char *) recvbuf) + mpirank * datasize, sendbuf, datasize); data/p4est-2.2/sc/src/sc_bspline.c:400:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (result, wfrom, sizeof (double) * bs->d); data/p4est-2.2/sc/src/sc_bspline.c:464:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (result, wfrom, sizeof (double) * bs->d); data/p4est-2.2/sc/src/sc_bspline.c:509:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (result, pfrom, sizeof (double) * bs->d); data/p4est-2.2/sc/src/sc_builtin/obstack.h:148: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 contents[4]; /* objects begin here */ data/p4est-2.2/sc/src/sc_builtin/obstack.h:298:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (__o->next_free, where, __len); \ data/p4est-2.2/sc/src/sc_builtin/obstack.h:308:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (__o->next_free, where, __len); \ data/p4est-2.2/sc/src/sc_builtin/obstack.h:434:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ((h)->next_free, where, (h)->temp.tempint), \ data/p4est-2.2/sc/src/sc_builtin/obstack.h:441:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ((h)->next_free, where, (h)->temp.tempint), \ data/p4est-2.2/sc/src/sc_containers.c:269:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (ptr, array->array, minoffs); data/p4est-2.2/sc/src/sc_containers.c:294:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dest->array, src->array, src->elem_count * src->elem_size); data/p4est-2.2/sc/src/sc_containers.c:307:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dest->array + dest_offset * dest->elem_size, data/p4est-2.2/sc/src/sc_containers.c:395:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (temp, elem1, array->elem_size); data/p4est-2.2/sc/src/sc_containers.c:581:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (newind, sc_array_index (newindices, 0), count * sizeof (size_t)); data/p4est-2.2/sc/src/sc_containers.c:595: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 (temp, carray + esize * zk, esize); data/p4est-2.2/sc/src/sc_containers.c:597: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 (carray + esize * zk, carray + esize * zi, esize); data/p4est-2.2/sc/src/sc_containers.c:599: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 (carray + esize * zi, temp, esize); data/p4est-2.2/sc/src/sc_containers.c:672:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (temp, c, size); data/p4est-2.2/sc/src/sc_containers.c:673:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (c, p, size); data/p4est-2.2/sc/src/sc_containers.c:674:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (p, temp, size); data/p4est-2.2/sc/src/sc_containers.c:709:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (result, p, size); data/p4est-2.2/sc/src/sc_containers.c:714:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (p, temp, size); data/p4est-2.2/sc/src/sc_containers.c:738:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (temp, c, size); data/p4est-2.2/sc/src/sc_containers.c:739:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (c, p, size); data/p4est-2.2/sc/src/sc_containers.c:740:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (p, temp, size); data/p4est-2.2/sc/src/sc_containers.c:1691:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (rip, &hash_array->a, sizeof (sc_array_t)); data/p4est-2.2/sc/src/sc_dmatrix.c:238:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (Ydata, Xdata, totalsize * sizeof (double)); data/p4est-2.2/sc/src/sc_dmatrix.c:273:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (data, dmatrix->e[0], data/p4est-2.2/sc/src/sc_dmatrix.c:312:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (data, dmatrix->e[0], data/p4est-2.2/sc/src/sc_io.c:56: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). sink->file = fopen (filename, data/p4est-2.2/sc/src/sc_io.c:116:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (sink->buffer->array + sink->buffer_bytes, data, bytes_avail); data/p4est-2.2/sc/src/sc_io.c:203:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). source->file = fopen (filename, "rb"); data/p4est-2.2/sc/src/sc_io.c:268: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, source->buffer->array + source->buffer_bytes, bbytes_out); data/p4est-2.2/sc/src/sc_mpi.c:309:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (q, p, lp); data/p4est-2.2/sc/src/sc_mpi.c:336:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy ((char *) q + displ[0] * sc_mpi_sizeof (tq), p, lp); data/p4est-2.2/sc/src/sc_mpi.c:376:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (q, p, l); data/p4est-2.2/sc/src/sc_notify.c:128:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (senders, snda.array, *num_senders * sizeof (int)); data/p4est-2.2/sc/src/sc_notify.c:223: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 (senders, pint + 2, found_num_senders * sizeof (int)); data/p4est-2.2/sc/src/sc_notify.c:352: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 (pout, pint, itemlen * sizeof (int)); data/p4est-2.2/sc/src/sc_notify.c:364: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 (pout, psec, itemlen * sizeof (int)); data/p4est-2.2/sc/src/sc_notify.c:458:11: [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 (pout, pint, (2 + numfroms) * sizeof (int)); data/p4est-2.2/sc/src/sc_notify.c:742: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 (pout, pint, itemlen * sizeof (int)); data/p4est-2.2/sc/src/sc_options.c:61: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 program_path[BUFSIZ]; data/p4est-2.2/sc/src/sc_options.c:568: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 outbuf[BUFSIZ]; data/p4est-2.2/sc/src/sc_options.c:669: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 outbuf[BUFSIZ]; data/p4est-2.2/sc/src/sc_options.c:782: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 skey[BUFSIZ], lkey[BUFSIZ]; data/p4est-2.2/sc/src/sc_options.c:969:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen (inifile, "wb"); data/p4est-2.2/sc/src/sc_options.c:1141: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 optstring[BUFSIZ]; data/p4est-2.2/sc/src/sc_options.c:1337: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 key[BUFSIZ]; data/p4est-2.2/sc/src/sc_polynom.c:139:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (p->c->array, coefficients, p->c->elem_size * p->c->elem_count); data/p4est-2.2/sc/src/sc_reduce.c:73:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (alldata + i * datasize, data, datasize); data/p4est-2.2/sc/src/sc_reduce.c:119:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (data, alldata, datasize); data/p4est-2.2/sc/src/sc_reduce.c:492:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (recvbuf, sendbuf, datasize); data/p4est-2.2/sc/src/sc_shmem.c:36: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. const char *sc_shmem_type_to_string[SC_SHMEM_NUM_TYPES] = { data/p4est-2.2/sc/src/sc_shmem.c:287:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (destarray, srcarray, bytes); data/p4est-2.2/sc/src/sc_shmem.c:355:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (destarray, srcarray, bytes); data/p4est-2.2/sc/src/sc_shmem.h:56:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern const char *sc_shmem_type_to_string[SC_SHMEM_NUM_TYPES]; data/p4est-2.2/sc/src/sc_sort.c:234: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 (temp, lo_data, size); data/p4est-2.2/sc/src/sc_sort.c:235: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 (lo_data, hi_data, size); data/p4est-2.2/sc/src/sc_sort.c:236: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 (hi_data, temp, size); data/p4est-2.2/sc/src/sc_sort.c:289:19: [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 (lo_data, hi_data, size); data/p4est-2.2/sc/src/sc_sort.c:300:19: [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 (hi_data, lo_data, size); data/p4est-2.2/sc/src/sc_sort.c:338:19: [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 (lo_data, hi_data, size); data/p4est-2.2/sc/src/sc_sort.c:349:19: [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 (hi_data, lo_data, size); data/p4est-2.2/sc/src/sc_statistics.c:224:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (flatout, flatin, 7 * nvars * sizeof (*flatout)); data/p4est-2.2/sc/src/sc_statistics.c:324: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 buffer[BUFSIZ]; data/p4est-2.2/sc/src/sc_string.h:49: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 buffer[SC_STRING_SIZE]; /**< Opaque object: do not access. */ data/p4est-2.2/sc/test/test_arrays.c:62:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (v->array, a->array, N * S); data/p4est-2.2/sc/test/test_builtin.c:69:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). anint = atoi (optarg); data/p4est-2.2/sc/test/test_builtin.c:112:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b3[BUFSIZ]; data/p4est-2.2/sc/test/test_notify.c:108:12: [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). ntop = atoi (argv[1]); data/p4est-2.2/sc/test/test_notify.c:109:12: [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). nint = atoi (argv[2]); data/p4est-2.2/sc/test/test_notify.c:110:12: [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). nbot = atoi (argv[3]); data/p4est-2.2/sc/test/test_sort.c:42: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 buffer[BUFSIZ]; data/p4est-2.2/src/p4est.c:554:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (p4est, input, sizeof (p4est_t)); data/p4est-2.2/src/p4est.c:582:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (ptree, itree, sizeof (p4est_tree_t)); data/p4est-2.2/src/p4est.c:592:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (pquadrants->array, iquadrants->array, data/p4est-2.2/src/p4est.c:600:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (pq->p.user_data, iq->p.user_data, p4est->data_size); data/p4est-2.2/src/p4est.c:608:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (p4est->global_first_quadrant, input->global_first_quadrant, data/p4est-2.2/src/p4est.c:614:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (p4est->global_first_position, input->global_first_position, data/p4est-2.2/src/p4est.c:1224:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (peer->recv_first.array, first_seeds->array, data/p4est-2.2/src/p4est.c:2131:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (qarray->array, peer->send_first.array, qbytes); data/p4est-2.2/src/p4est.c:2138:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (qarray->array, peer->send_second.array, qbytes); data/p4est-2.2/src/p4est.c:3325:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen (filename, "ab"); data/p4est-2.2/src/p4est.c:3403:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen (filename, "rb+"); data/p4est-2.2/src/p4est.c:3449:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (qpos, q->p.user_data, data_size); data/p4est-2.2/src/p4est.c:3722: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 (qap, lbuf, qbuf_size); data/p4est-2.2/src/p4est.c:3723: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 (dap, lbuf + qbuf_size, data_size); data/p4est-2.2/src/p4est_algorithms.c:332: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 buffer[BUFSIZ]; data/p4est-2.2/src/p4est_algorithms.c:2302:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tquadrants->array, outlist->array, outlist->elem_size * ocount); data/p4est-2.2/src/p4est_algorithms.c:2478: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 (sc_array_index (flist, fcount), data/p4est-2.2/src/p4est_algorithms.c:2555:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (sc_array_index (flist, fcount), data/p4est-2.2/src/p4est_algorithms.c:2561:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tquadrants->array, flist->array, data/p4est-2.2/src/p4est_algorithms.c:3104:11: [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 (quad_send_buf, tree->quadrants.array + data/p4est-2.2/src/p4est_algorithms.c:3115: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 (user_data_send_buf + il * data_size, data/p4est-2.2/src/p4est_algorithms.c:3368:11: [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 (quadrants->array + data/p4est-2.2/src/p4est_algorithms.c:3380:15: [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 (quad->p.user_data, user_data_recv_buf + zz * data_size, data/p4est-2.2/src/p4est_build.c:100:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (p4est, from, sizeof (p4est_t)); data/p4est-2.2/src/p4est_build.c:122:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (p4est->global_first_position, from->global_first_position, data/p4est-2.2/src/p4est_communication.c:384: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 (pi, pi + 1, sizeof (p4est_quadrant_t)); data/p4est-2.2/src/p4est_communication.c:1135:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dest_cp, src_cp, cp_len); data/p4est-2.2/src/p4est_communication.c:1353:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dest_cp, src_cp, cp_len); data/p4est-2.2/src/p4est_connectivity.c:176:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (conn->vertices, vertices, sizeof (double) * 3 * num_vertices); data/p4est-2.2/src/p4est_connectivity.c:177:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (conn->tree_to_vertex, ttv, data/p4est-2.2/src/p4est_connectivity.c:184:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (conn->tree_to_tree, ttt, data/p4est-2.2/src/p4est_connectivity.c:186:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (conn->tree_to_face, ttf, sizeof (int8_t) * P4EST_FACES * num_trees); data/p4est-2.2/src/p4est_connectivity.c:190:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (conn->tree_to_edge, tte, data/p4est-2.2/src/p4est_connectivity.c:192:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (conn->edge_to_tree, ett, sizeof (p4est_topidx_t) * num_ett); data/p4est-2.2/src/p4est_connectivity.c:193:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (conn->edge_to_edge, ete, sizeof (int8_t) * num_ett); data/p4est-2.2/src/p4est_connectivity.c:195:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (conn->ett_offset, eoff, sizeof (p4est_topidx_t) * (num_edges + 1)); data/p4est-2.2/src/p4est_connectivity.c:199:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (conn->tree_to_corner, ttc, data/p4est-2.2/src/p4est_connectivity.c:201:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (conn->corner_to_tree, ctt, sizeof (p4est_topidx_t) * num_ctt); data/p4est-2.2/src/p4est_connectivity.c:202:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (conn->corner_to_corner, ctc, sizeof (int8_t) * num_ctt); data/p4est-2.2/src/p4est_connectivity.c:204:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (conn->ctt_offset, coff, data/p4est-2.2/src/p4est_connectivity.c:833: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 magic8[8 + 1]; data/p4est-2.2/src/p4est_connectivity.c:834: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 pkgversion24[24 + 1]; data/p4est-2.2/src/p4est_connectivity.c:984: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 magic8[9]; data/p4est-2.2/src/p4est_connectivity.c:985: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 pkgversion24[25]; data/p4est-2.2/src/p4est_connectivity.c:2992:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (fi->key, fikey.key, P4EST_HALF * sizeof (p4est_topidx_t)); data/p4est-2.2/src/p4est_connectivity.c:3037:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (ei->key, eikey.key, 2 * sizeof (p4est_topidx_t)); data/p4est-2.2/src/p4est_connectivity.c:3940:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (swapspace, conn->corner_to_tree + (size_t) startt, data/p4est-2.2/src/p4est_connectivity.c:3945:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (conn->corner_to_tree + (size_t) end0, swapspace, data/p4est-2.2/src/p4est_connectivity.c:3950:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (swapspacei, conn->corner_to_corner + (size_t) startt, data/p4est-2.2/src/p4est_connectivity.c:3955:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (conn->corner_to_corner + (size_t) end0, swapspacei, data/p4est-2.2/src/p4est_connectivity.c:4051:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (swapspace, conn->edge_to_tree + (size_t) startt, data/p4est-2.2/src/p4est_connectivity.c:4056:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (conn->edge_to_tree + (size_t) end0, swapspace, data/p4est-2.2/src/p4est_connectivity.c:4061:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (swapspacei, conn->edge_to_edge + (size_t) startt, data/p4est-2.2/src/p4est_connectivity.c:4066:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (conn->edge_to_edge + (size_t) end0, swapspacei, data/p4est-2.2/src/p4est_connectivity.c:4532:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fid = fopen (filename, "rb"); data/p4est-2.2/src/p4est_ghost.c:1300: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 (mpm + sum_all_procs, m->offsets_by_proc[p].array, data/p4est-2.2/src/p4est_ghost.c:2443:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (mem, mirror_data[mirr], data_size); data/p4est-2.2/src/p4est_ghost.c:2621: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, mirror_data[mirr], data_size); data/p4est-2.2/src/p4est_ghost.c:2694: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 ((char *) exc->ghost_data + (ng_excl + theg) * data_size, data/p4est-2.2/src/p4est_ghost.c:3267:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (ghost->mirror_proc_fronts, mirror_proc_mirrors, data/p4est-2.2/src/p4est_ghost.c:3272:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (ghost->mirror_proc_front_offsets, mirror_proc_offsets, data/p4est-2.2/src/p4est_ghost.c:3780: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_mirrors->array + oldsize * new_mirrors->elem_size, data/p4est-2.2/src/p4est_ghost.c:3828:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (mpf, nmpfa->array, nmpfa->elem_size * nmpfa->elem_count); data/p4est-2.2/src/p4est_ghost.c:3848:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (nmpma->array + nmpma->elem_size * offset, data/p4est-2.2/src/p4est_ghost.c:3877:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (mirror_proc_mirrors, nmpma->array, data/p4est-2.2/src/p4est_io.c:73:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dap, q->p.user_data, dsize); data/p4est-2.2/src/p4est_io.c:139:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (p4est->global_first_quadrant, global_first_quadrant, data/p4est-2.2/src/p4est_io.c:232:11: [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 (q->p.user_data, dap, dsize); data/p4est-2.2/src/p4est_iterate.c:143: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 (tier->array, next_tier, P4EST_ITER_STRIDE * sizeof (size_t)); data/p4est-2.2/src/p4est_iterate.c:150: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 (next_tier, tier->array, P4EST_ITER_STRIDE * sizeof (size_t)); data/p4est-2.2/src/p4est_iterate.c:160:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (tier->array, next_tier, P4EST_ITER_STRIDE * sizeof (size_t)); data/p4est-2.2/src/p4est_lnodes.c:3108:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dest, src, count * sizeof (p4est_quadrant_t)); data/p4est-2.2/src/p4est_lnodes.c:3145:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dest, src, data/p4est-2.2/src/p4est_lnodes.c:3533:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dest, node_data->array + elem_size * lz, elem_size); data/p4est-2.2/src/p4est_lnodes.c:3646:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dest, node_data->array + elem_size * lz, elem_size); data/p4est-2.2/src/p4est_mesh.c:327:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (pcquad, cquads, goodones * sizeof (p4est_locidx_t)); data/p4est-2.2/src/p4est_mesh.c:328:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (pccorner, ccorners, goodones * sizeof (int8_t)); data/p4est-2.2/src/p4est_nodes.c:943:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (new_sharers, old_sharers, num_sharers * sizeof (int)); data/p4est-2.2/src/p4est_nodes.c:1003:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (this_base + second_size, new_sharers, data/p4est-2.2/src/p4est_nodes.c:1036: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 (quad_indeps, quad_nodes, P4EST_CHILDREN * sizeof (*quad_nodes)); data/p4est-2.2/src/p4est_nodes.c:1222:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (new_sharers, this_base + second_size, num_sharers * sizeof (int)); data/p4est-2.2/src/p4est_nodes.c:1393: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 (sorted, sharers, num_sharers * sizeof (int)); data/p4est-2.2/src/p4est_nodes.c:1480: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 (sorted, sharers, num_sharers * sizeof (int)); data/p4est-2.2/src/p4est_plex.c:577:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (F, lnodes->face_code, Klocal * sizeof (p4est_lnodes_code_t)); data/p4est-2.2/src/p4est_plex.c:664:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (quad_to_local_orig, quad_to_local, data/p4est-2.2/src/p4est_vtk.c:190:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char vtufilename[BUFSIZ]; /**< Each process writes one. */ data/p4est-2.2/src/p4est_vtk.c:191: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 pvtufilename[BUFSIZ]; /**< Only root writes this one. */ data/p4est-2.2/src/p4est_vtk.c:192:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char visitfilename[BUFSIZ]; /**< Only root writes this one. */ data/p4est-2.2/src/p4est_vtk.c:453:19: [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). cont->vtufile = fopen (cont->vtufilename, "wb"); data/p4est-2.2/src/p4est_vtk.c:761:22: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). cont->pvtufile = fopen (cont->pvtufilename, "wb"); data/p4est-2.2/src/p4est_vtk.c:797:23: [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). cont->visitfile = fopen (cont->visitfilename, "wb"); data/p4est-2.2/src/p4est_vtk.c:844: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 point_scalars[BUFSIZ], point_vectors[BUFSIZ]; data/p4est-2.2/src/p4est_vtk.c:1048: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 cell_scalars[BUFSIZ], cell_vectors[BUFSIZ]; data/p4est-2.2/src/p4est_vtk.c:1064: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 vtkCellDataString[BUFSIZ] = ""; data/p4est-2.2/src/p4est_vtk.c:1677: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 *filename_basename, filename_cpy[BUFSIZ]; data/p4est-2.2/src/p6est.c:69:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (conn->top_vertices, top_vertices, data/p4est-2.2/src/p6est.c:583:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (p6est, input, sizeof (p6est_t)); data/p4est-2.2/src/p6est.c:613: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 (outlayer->p.user_data, inlayer->p.user_data, p6est->data_size); data/p4est-2.2/src/p6est.c:618:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (p6est->global_first_layer, input->global_first_layer, data/p4est-2.2/src/p6est.c:762:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen (filename, "ab"); data/p4est-2.2/src/p6est.c:831:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen (filename, "rb+"); data/p4est-2.2/src/p6est.c:871: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 (qpos, layer->p.user_data, data_size); data/p4est-2.2/src/p6est.c:1056:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (layer->p.user_data, &loadlayer[2], save_data_size); data/p4est-2.2/src/p6est.c:1359:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (newq, sc_array_index (newcol, 0), data/p4est-2.2/src/p6est.c:1664:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (p, sc_array_index (work_array, 0), data/p4est-2.2/src/p6est.c:2051:15: [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 (layer_data, layer->p.user_data, data_size); data/p4est-2.2/src/p6est.c:2067:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (sc_array_index (new_layers, self_offset), data/p4est-2.2/src/p6est.c:2110:11: [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 (layer->p.user_data, layer_data, data_size); data/p4est-2.2/src/p6est_ghost.c:197:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (mlayer, sc_array_index (send, 0), data/p4est-2.2/src/p6est_ghost.c:229:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (mpo, mpfo, (mpisize + 1) * sizeof (p4est_locidx_t)); data/p4est-2.2/src/p6est_ghost.c:257:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (mpf, nmpfa->array, nmpfa->elem_size * nmpfa->elem_count); data/p4est-2.2/src/p6est_ghost.c:283: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 (lp, mpf + mpfo[i], sizeof (p4est_locidx_t) * frontsize); data/p4est-2.2/src/p6est_ghost.c:310:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (mpm, nmpma->array, nmpma->elem_size * nmpma->elem_count); data/p4est-2.2/src/p6est_ghost.c:576:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (old_proc_off, ghost->proc_offsets, (mpisize + 1) * sizeof data/p4est-2.2/src/p6est_lnodes.c:359:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (layernodecount, layernodeoffsets, data/p4est-2.2/src/p6est_profile.c:663:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (c, thisprof->array, count * sizeof (int8_t)); data/p4est-2.2/src/p6est_profile.c:674:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (c, work->array, work->elem_count * work->elem_size); data/p4est-2.2/src/p6est_profile.c:685:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (c, selfprof->array, count * sizeof (int8_t)); data/p4est-2.2/src/p6est_profile.c:695:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (oldprof.array, work->array, data/p4est-2.2/src/p6est_profile.c:863:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (c, work->array, work->elem_count * work->elem_size); data/p4est-2.2/src/p6est_profile.c:1025:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (send + send_offsets[zz] + icount, c, data/p4est-2.2/src/p6est_profile.c:1093: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 (c, work->array, work->elem_count * work->elem_size); data/p4est-2.2/src/p6est_profile.c:1101: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 (oldview.array, work->array, data/p4est-2.2/src/p6est_profile.c:1245:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (q, work->array, work->elem_count * work->elem_size); data/p4est-2.2/src/p6est_vtk.c:81: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 point_scalars[BUFSIZ], point_vectors[BUFSIZ]; data/p4est-2.2/src/p6est_vtk.c:179: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 vtufilename[BUFSIZ]; data/p4est-2.2/src/p6est_vtk.c:198: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). vtufile = fopen (vtufilename, "wb"); data/p4est-2.2/src/p6est_vtk.c:503: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 pvtufilename[BUFSIZ]; data/p4est-2.2/src/p6est_vtk.c:508:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). pvtufile = fopen (pvtufilename, "wb"); data/p4est-2.2/src/p6est_vtk.c:578: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 vtufilename[BUFSIZ]; data/p4est-2.2/src/p6est_vtk.c:586: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). vtufile = fopen (vtufilename, "rb+"); data/p4est-2.2/src/p6est_vtk.c:647: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 pvtufilename[BUFSIZ]; data/p4est-2.2/src/p6est_vtk.c:651:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). pvtufile = fopen (pvtufilename, "ab"); data/p4est-2.2/src/p6est_vtk.c:686: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 vtufilename[BUFSIZ]; data/p4est-2.2/src/p6est_vtk.c:694: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). vtufile = fopen (vtufilename, "ab"); data/p4est-2.2/src/p6est_vtk.c:718: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 visitfilename[BUFSIZ]; data/p4est-2.2/src/p6est_vtk.c:719: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 pvtufilename[BUFSIZ]; data/p4est-2.2/src/p6est_vtk.c:724:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). pvtufile = fopen (pvtufilename, "ab"); data/p4est-2.2/src/p6est_vtk.c:732:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). visitfile = fopen (visitfilename, "wb"); data/p4est-2.2/src/p8est_tets_hexes.c:81: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). nodefile = fopen (nodefilename, "rb"); data/p4est-2.2/src/p8est_tets_hexes.c:170: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). elefile = fopen (elefilename, "rb"); data/p4est-2.2/src/p8est_tets_hexes.c:250: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 nodefilename[BUFSIZ]; data/p4est-2.2/src/p8est_tets_hexes.c:251: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 elefilename[BUFSIZ]; data/p4est-2.2/src/p8est_tets_hexes.c:435:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (ei->ek, eikey.ek, 2 * sizeof (p4est_topidx_t)); data/p4est-2.2/src/p8est_tets_hexes.c:528:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (fi->fk, fikey.fk, 3 * sizeof (p4est_topidx_t)); data/p4est-2.2/src/p8est_tets_hexes.c:578:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (conn->vertices, ptg->nodes->array, 3 * evzoffset * sizeof (double)); data/p4est-2.2/test/test_loadsave2.c:162: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 conn_name[BUFSIZ]; data/p4est-2.2/test/test_loadsave2.c:163: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 p4est_name[BUFSIZ]; data/p4est-2.2/test/test_partition2.c:195: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 (td, quad->p.user_data, p4est->data_size); data/p4est-2.2/sc/example/testing/sc_test_shmem.c:57: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). snprintf (outstring + strlen (outstring), BUFSIZ - strlen (outstring), data/p4est-2.2/sc/example/testing/sc_test_shmem.c:57: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). snprintf (outstring + strlen (outstring), BUFSIZ - strlen (outstring), data/p4est-2.2/sc/example/testing/sc_test_shmem.c:62:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf (outstring + strlen (outstring), BUFSIZ - strlen (outstring), data/p4est-2.2/sc/example/testing/sc_test_shmem.c:62:56: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf (outstring + strlen (outstring), BUFSIZ - strlen (outstring), data/p4est-2.2/sc/iniparser/dictionary.c:66: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). t = (char*)malloc(strlen(s)+1) ; data/p4est-2.2/sc/iniparser/dictionary.c:94:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(key); data/p4est-2.2/sc/iniparser/iniparser.c:84: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). last = l + strlen(l); data/p4est-2.2/sc/iniparser/iniparser.c:253: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). seclen = (int)strlen(s); data/p4est-2.2/sc/iniparser/iniparser.c:289: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). seclen = (int)strlen(s); data/p4est-2.2/sc/iniparser/iniparser.c:335: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). seclen = (int)strlen(s); data/p4est-2.2/sc/iniparser/iniparser.c:566: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). len = (int)strlen(line); data/p4est-2.2/sc/iniparser/iniparser.c:665: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). len = (int)strlen(line)-1; data/p4est-2.2/sc/src/sc.c:620:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (s) + 1; data/p4est-2.2/sc/src/sc_getopt.c:270: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 len = d->__nonoption_flags_max_len = strlen (orig_str); data/p4est-2.2/sc/src/sc_getopt.c:497: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). == (unsigned int) strlen (p->name)) data/p4est-2.2/sc/src/sc_getopt.c:546: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). d->__nextchar += strlen (d->__nextchar); data/p4est-2.2/sc/src/sc_getopt.c:619: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). d->__nextchar += strlen (d->__nextchar); data/p4est-2.2/sc/src/sc_getopt.c:659: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). d->__nextchar += strlen (d->__nextchar); data/p4est-2.2/sc/src/sc_getopt.c:664: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). d->__nextchar += strlen (d->__nextchar); data/p4est-2.2/sc/src/sc_getopt.c:867:56: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) data/p4est-2.2/sc/src/sc_getopt.c:912: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). d->__nextchar += strlen (d->__nextchar); data/p4est-2.2/sc/src/sc_getopt.c:956: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). d->__nextchar += strlen (d->__nextchar); data/p4est-2.2/sc/src/sc_getopt.c:994: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). d->__nextchar += strlen (d->__nextchar); data/p4est-2.2/sc/src/sc_getopt.c:998: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). d->__nextchar += strlen (d->__nextchar); data/p4est-2.2/sc/src/sc_options.c:493:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int prefixlen = strlen (prefix); data/p4est-2.2/sc/src/sc_options.c:501:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ((item->opt_name != NULL) ? (strlen (item->opt_name) + 2) : 4); data/p4est-2.2/sc/src/sc_options.c:1003: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). this_n = strlen (default_prefix); data/p4est-2.2/sc/test/test_builtin.c:110: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). const size_t l1 = strlen (b1); data/p4est-2.2/sc/test/test_builtin.c:111: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). const size_t l2 = strlen (b2); data/p4est-2.2/sc/test/test_io_sink.c:49:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). retval = sc_io_sink_write (sink, input, strlen (input)); data/p4est-2.2/src/p4est_connectivity.c:857:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (magic8, P4EST_STRING, 8); data/p4est-2.2/src/p4est_connectivity.c:861:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (pkgversion24, P4EST_PACKAGE_VERSION, 24); data/p4est-2.2/src/p4est_connectivity.c:4354:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc (stream); data/p4est-2.2/src/p6est_profile.c:146:51: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p6est_profile_balance_self_one_pass (sc_array_t * read, sc_array_t * write) data/p4est-2.2/src/p6est_profile.c:160:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = *((int8_t *) sc_array_index (read, count - 1)); data/p4est-2.2/src/p6est_profile.c:163:38: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = *((int8_t *) sc_array_index (read, count - 1 - zy)); data/p4est-2.2/src/p6est_profile.c:188:51: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p6est_profile_balance_face_one_pass (sc_array_t * read, sc_array_t * write, data/p4est-2.2/src/p6est_profile.c:207:38: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = *((int8_t *) sc_array_index (read, count - 1 - zy++)); data/p4est-2.2/src/p6est_profile.c:210:41: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nn = *((int8_t *) sc_array_index (read, count - 1 - zy)); data/p4est-2.2/src/p6est_profile.c:244:51: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). p6est_profile_balance_full_one_pass (sc_array_t * read, sc_array_t * write, data/p4est-2.2/src/p6est_profile.c:263:38: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = *((int8_t *) sc_array_index (read, count - 1 - zy++)); data/p4est-2.2/src/p6est_profile.c:266:41: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nn = *((int8_t *) sc_array_index (read, count - 1 - zy)); data/p4est-2.2/src/p6est_profile.c:269:48: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). prevl = *((int8_t *) sc_array_index (read, count - 1 - (zy - 2))); data/p4est-2.2/src/p6est_profile.c:275:48: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nextl = *((int8_t *) sc_array_index (read, count - 1 - (zy + 1))); ANALYSIS SUMMARY: Hits = 415 Lines analyzed = 112779 in approximately 2.96 seconds (38105 lines/second) Physical Source Lines of Code (SLOC) = 76275 Hits@level = [0] 428 [1] 44 [2] 277 [3] 24 [4] 70 [5] 0 Hits@level+ = [0+] 843 [1+] 415 [2+] 371 [3+] 94 [4+] 70 [5+] 0 Hits/KSLOC@level+ = [0+] 11.0521 [1+] 5.44084 [2+] 4.86398 [3+] 1.23238 [4+] 0.917732 [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.