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/memkind-1.10.1/autohbw/autohbw.c
Examining data/memkind-1.10.1/autohbw/autohbw_api.h
Examining data/memkind-1.10.1/examples/autohbw_candidates.c
Examining data/memkind-1.10.1/examples/filter_example.c
Examining data/memkind-1.10.1/examples/hello_hbw_example.c
Examining data/memkind-1.10.1/examples/hello_memkind_example.c
Examining data/memkind-1.10.1/examples/memkind_allocated.hpp
Examining data/memkind-1.10.1/examples/memkind_allocated_example.cpp
Examining data/memkind-1.10.1/examples/memkind_cpp_allocator.cpp
Examining data/memkind-1.10.1/examples/memkind_decorator_debug.c
Examining data/memkind-1.10.1/examples/memkind_get_stat.c
Examining data/memkind-1.10.1/examples/pmem_alignment.c
Examining data/memkind-1.10.1/examples/pmem_and_dax_kmem_kind.c
Examining data/memkind-1.10.1/examples/pmem_and_default_kind.c
Examining data/memkind-1.10.1/examples/pmem_config.c
Examining data/memkind-1.10.1/examples/pmem_cpp_allocator.cpp
Examining data/memkind-1.10.1/examples/pmem_detect_kind.c
Examining data/memkind-1.10.1/examples/pmem_free_with_unknown_kind.c
Examining data/memkind-1.10.1/examples/pmem_kinds.c
Examining data/memkind-1.10.1/examples/pmem_malloc.c
Examining data/memkind-1.10.1/examples/pmem_malloc_unlimited.c
Examining data/memkind-1.10.1/examples/pmem_multithreads.c
Examining data/memkind-1.10.1/examples/pmem_multithreads_onekind.c
Examining data/memkind-1.10.1/examples/pmem_usable_size.c
Examining data/memkind-1.10.1/include/hbw_allocator.h
Examining data/memkind-1.10.1/include/hbwmalloc.h
Examining data/memkind-1.10.1/include/memkind.h
Examining data/memkind-1.10.1/include/memkind/internal/heap_manager.h
Examining data/memkind-1.10.1/include/memkind/internal/memkind_arena.h
Examining data/memkind-1.10.1/include/memkind/internal/memkind_bandwidth.h
Examining data/memkind-1.10.1/include/memkind/internal/memkind_dax_kmem.h
Examining data/memkind-1.10.1/include/memkind/internal/memkind_default.h
Examining data/memkind-1.10.1/include/memkind/internal/memkind_gbtlb.h
Examining data/memkind-1.10.1/include/memkind/internal/memkind_hbw.h
Examining data/memkind-1.10.1/include/memkind/internal/memkind_hugetlb.h
Examining data/memkind-1.10.1/include/memkind/internal/memkind_interleave.h
Examining data/memkind-1.10.1/include/memkind/internal/memkind_log.h
Examining data/memkind-1.10.1/include/memkind/internal/memkind_pmem.h
Examining data/memkind-1.10.1/include/memkind/internal/memkind_private.h
Examining data/memkind-1.10.1/include/memkind/internal/memkind_regular.h
Examining data/memkind-1.10.1/include/memkind/internal/tbb_mem_pool_policy.h
Examining data/memkind-1.10.1/include/memkind/internal/tbb_wrapper.h
Examining data/memkind-1.10.1/include/memkind/internal/vec.h
Examining data/memkind-1.10.1/include/memkind_allocator.h
Examining data/memkind-1.10.1/include/memkind_deprecated.h
Examining data/memkind-1.10.1/include/pmem_allocator.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/arena_externs.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/arena_inlines_a.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/arena_inlines_b.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/arena_stats.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/arena_structs_a.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/arena_structs_b.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/arena_types.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/assert.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/atomic.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/atomic_c11.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/atomic_gcc_sync.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/atomic_msvc.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/background_thread_externs.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/background_thread_inlines.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/background_thread_structs.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/base_externs.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/base_inlines.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/base_structs.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/base_types.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/bin.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/bin_stats.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/bin_types.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/bit_util.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/bitmap.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/cache_bin.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/ckh.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/ctl.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/div.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/emitter.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/extent_dss.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/extent_externs.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/extent_inlines.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/extent_mmap.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/extent_structs.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/extent_types.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/hash.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/hook.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/jemalloc_internal_externs.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/jemalloc_internal_includes.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_a.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_b.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/jemalloc_internal_macros.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/large_externs.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/log.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/malloc_io.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/mutex.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/mutex_pool.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/mutex_prof.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/nstime.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/pages.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/ph.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/prng.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/prof_externs.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/prof_inlines_a.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/prof_inlines_b.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/prof_structs.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/prof_types.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/ql.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/qr.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/quantum.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/rb.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/rtree.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/rtree_tsd.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/safety_check.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/sc.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/seq.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/smoothstep.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/spin.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/stats.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/sz.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/tcache_externs.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/tcache_inlines.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/tcache_structs.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/tcache_types.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/test_hooks.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/ticker.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/tsd.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/tsd_generic.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/tsd_malloc_thread_cleanup.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/tsd_tls.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/tsd_types.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/tsd_win.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/util.h
Examining data/memkind-1.10.1/jemalloc/include/jemalloc/internal/witness.h
Examining data/memkind-1.10.1/jemalloc/include/msvc_compat/C99/stdbool.h
Examining data/memkind-1.10.1/jemalloc/include/msvc_compat/C99/stdint.h
Examining data/memkind-1.10.1/jemalloc/include/msvc_compat/strings.h
Examining data/memkind-1.10.1/jemalloc/include/msvc_compat/windows_extra.h
Examining data/memkind-1.10.1/jemalloc/msvc/test_threads/test_threads.cpp
Examining data/memkind-1.10.1/jemalloc/msvc/test_threads/test_threads.h
Examining data/memkind-1.10.1/jemalloc/msvc/test_threads/test_threads_main.cpp
Examining data/memkind-1.10.1/jemalloc/src/arena.c
Examining data/memkind-1.10.1/jemalloc/src/background_thread.c
Examining data/memkind-1.10.1/jemalloc/src/base.c
Examining data/memkind-1.10.1/jemalloc/src/bin.c
Examining data/memkind-1.10.1/jemalloc/src/bitmap.c
Examining data/memkind-1.10.1/jemalloc/src/ckh.c
Examining data/memkind-1.10.1/jemalloc/src/ctl.c
Examining data/memkind-1.10.1/jemalloc/src/div.c
Examining data/memkind-1.10.1/jemalloc/src/extent.c
Examining data/memkind-1.10.1/jemalloc/src/extent_dss.c
Examining data/memkind-1.10.1/jemalloc/src/extent_mmap.c
Examining data/memkind-1.10.1/jemalloc/src/hash.c
Examining data/memkind-1.10.1/jemalloc/src/hook.c
Examining data/memkind-1.10.1/jemalloc/src/jemalloc.c
Examining data/memkind-1.10.1/jemalloc/src/jemalloc_cpp.cpp
Examining data/memkind-1.10.1/jemalloc/src/large.c
Examining data/memkind-1.10.1/jemalloc/src/log.c
Examining data/memkind-1.10.1/jemalloc/src/malloc_io.c
Examining data/memkind-1.10.1/jemalloc/src/mutex.c
Examining data/memkind-1.10.1/jemalloc/src/mutex_pool.c
Examining data/memkind-1.10.1/jemalloc/src/nstime.c
Examining data/memkind-1.10.1/jemalloc/src/pages.c
Examining data/memkind-1.10.1/jemalloc/src/prng.c
Examining data/memkind-1.10.1/jemalloc/src/prof.c
Examining data/memkind-1.10.1/jemalloc/src/rtree.c
Examining data/memkind-1.10.1/jemalloc/src/safety_check.c
Examining data/memkind-1.10.1/jemalloc/src/sc.c
Examining data/memkind-1.10.1/jemalloc/src/stats.c
Examining data/memkind-1.10.1/jemalloc/src/sz.c
Examining data/memkind-1.10.1/jemalloc/src/tcache.c
Examining data/memkind-1.10.1/jemalloc/src/test_hooks.c
Examining data/memkind-1.10.1/jemalloc/src/ticker.c
Examining data/memkind-1.10.1/jemalloc/src/tsd.c
Examining data/memkind-1.10.1/jemalloc/src/witness.c
Examining data/memkind-1.10.1/jemalloc/src/zone.c
Examining data/memkind-1.10.1/jemalloc/test/include/test/SFMT-alti.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/SFMT-params.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/SFMT-params11213.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/SFMT-params1279.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/SFMT-params132049.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/SFMT-params19937.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/SFMT-params216091.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/SFMT-params2281.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/SFMT-params4253.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/SFMT-params44497.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/SFMT-params607.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/SFMT-params86243.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/SFMT-sse2.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/SFMT.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/btalloc.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/extent_hooks.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/math.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/mq.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/mtx.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/test.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/thd.h
Examining data/memkind-1.10.1/jemalloc/test/include/test/timer.h
Examining data/memkind-1.10.1/jemalloc/test/integration/MALLOCX_ARENA.c
Examining data/memkind-1.10.1/jemalloc/test/integration/aligned_alloc.c
Examining data/memkind-1.10.1/jemalloc/test/integration/allocated.c
Examining data/memkind-1.10.1/jemalloc/test/integration/extent.c
Examining data/memkind-1.10.1/jemalloc/test/integration/malloc.c
Examining data/memkind-1.10.1/jemalloc/test/integration/mallocx.c
Examining data/memkind-1.10.1/jemalloc/test/integration/overflow.c
Examining data/memkind-1.10.1/jemalloc/test/integration/posix_memalign.c
Examining data/memkind-1.10.1/jemalloc/test/integration/rallocx.c
Examining data/memkind-1.10.1/jemalloc/test/integration/sdallocx.c
Examining data/memkind-1.10.1/jemalloc/test/integration/slab_sizes.c
Examining data/memkind-1.10.1/jemalloc/test/integration/smallocx.c
Examining data/memkind-1.10.1/jemalloc/test/integration/thread_arena.c
Examining data/memkind-1.10.1/jemalloc/test/integration/thread_tcache_enabled.c
Examining data/memkind-1.10.1/jemalloc/test/integration/xallocx.c
Examining data/memkind-1.10.1/jemalloc/test/src/SFMT.c
Examining data/memkind-1.10.1/jemalloc/test/src/btalloc.c
Examining data/memkind-1.10.1/jemalloc/test/src/btalloc_0.c
Examining data/memkind-1.10.1/jemalloc/test/src/btalloc_1.c
Examining data/memkind-1.10.1/jemalloc/test/src/math.c
Examining data/memkind-1.10.1/jemalloc/test/src/mq.c
Examining data/memkind-1.10.1/jemalloc/test/src/mtx.c
Examining data/memkind-1.10.1/jemalloc/test/src/test.c
Examining data/memkind-1.10.1/jemalloc/test/src/thd.c
Examining data/memkind-1.10.1/jemalloc/test/src/timer.c
Examining data/memkind-1.10.1/jemalloc/test/stress/hookbench.c
Examining data/memkind-1.10.1/jemalloc/test/stress/microbench.c
Examining data/memkind-1.10.1/jemalloc/test/unit/SFMT.c
Examining data/memkind-1.10.1/jemalloc/test/unit/a0.c
Examining data/memkind-1.10.1/jemalloc/test/unit/arena_reset.c
Examining data/memkind-1.10.1/jemalloc/test/unit/arena_reset_prof.c
Examining data/memkind-1.10.1/jemalloc/test/unit/atomic.c
Examining data/memkind-1.10.1/jemalloc/test/unit/background_thread.c
Examining data/memkind-1.10.1/jemalloc/test/unit/background_thread_enable.c
Examining data/memkind-1.10.1/jemalloc/test/unit/base.c
Examining data/memkind-1.10.1/jemalloc/test/unit/binshard.c
Examining data/memkind-1.10.1/jemalloc/test/unit/bit_util.c
Examining data/memkind-1.10.1/jemalloc/test/unit/bitmap.c
Examining data/memkind-1.10.1/jemalloc/test/unit/ckh.c
Examining data/memkind-1.10.1/jemalloc/test/unit/decay.c
Examining data/memkind-1.10.1/jemalloc/test/unit/div.c
Examining data/memkind-1.10.1/jemalloc/test/unit/emitter.c
Examining data/memkind-1.10.1/jemalloc/test/unit/extent_quantize.c
Examining data/memkind-1.10.1/jemalloc/test/unit/extent_util.c
Examining data/memkind-1.10.1/jemalloc/test/unit/fork.c
Examining data/memkind-1.10.1/jemalloc/test/unit/hash.c
Examining data/memkind-1.10.1/jemalloc/test/unit/hook.c
Examining data/memkind-1.10.1/jemalloc/test/unit/huge.c
Examining data/memkind-1.10.1/jemalloc/test/unit/junk.c
Examining data/memkind-1.10.1/jemalloc/test/unit/junk_alloc.c
Examining data/memkind-1.10.1/jemalloc/test/unit/junk_free.c
Examining data/memkind-1.10.1/jemalloc/test/unit/log.c
Examining data/memkind-1.10.1/jemalloc/test/unit/mallctl.c
Examining data/memkind-1.10.1/jemalloc/test/unit/malloc_io.c
Examining data/memkind-1.10.1/jemalloc/test/unit/math.c
Examining data/memkind-1.10.1/jemalloc/test/unit/mq.c
Examining data/memkind-1.10.1/jemalloc/test/unit/mtx.c
Examining data/memkind-1.10.1/jemalloc/test/unit/nstime.c
Examining data/memkind-1.10.1/jemalloc/test/unit/pack.c
Examining data/memkind-1.10.1/jemalloc/test/unit/pages.c
Examining data/memkind-1.10.1/jemalloc/test/unit/ph.c
Examining data/memkind-1.10.1/jemalloc/test/unit/prng.c
Examining data/memkind-1.10.1/jemalloc/test/unit/prof_accum.c
Examining data/memkind-1.10.1/jemalloc/test/unit/prof_active.c
Examining data/memkind-1.10.1/jemalloc/test/unit/prof_gdump.c
Examining data/memkind-1.10.1/jemalloc/test/unit/prof_idump.c
Examining data/memkind-1.10.1/jemalloc/test/unit/prof_log.c
Examining data/memkind-1.10.1/jemalloc/test/unit/prof_reset.c
Examining data/memkind-1.10.1/jemalloc/test/unit/prof_tctx.c
Examining data/memkind-1.10.1/jemalloc/test/unit/prof_thread_name.c
Examining data/memkind-1.10.1/jemalloc/test/unit/ql.c
Examining data/memkind-1.10.1/jemalloc/test/unit/qr.c
Examining data/memkind-1.10.1/jemalloc/test/unit/rb.c
Examining data/memkind-1.10.1/jemalloc/test/unit/retained.c
Examining data/memkind-1.10.1/jemalloc/test/unit/rtree.c
Examining data/memkind-1.10.1/jemalloc/test/unit/safety_check.c
Examining data/memkind-1.10.1/jemalloc/test/unit/sc.c
Examining data/memkind-1.10.1/jemalloc/test/unit/seq.c
Examining data/memkind-1.10.1/jemalloc/test/unit/size_classes.c
Examining data/memkind-1.10.1/jemalloc/test/unit/slab.c
Examining data/memkind-1.10.1/jemalloc/test/unit/smoothstep.c
Examining data/memkind-1.10.1/jemalloc/test/unit/spin.c
Examining data/memkind-1.10.1/jemalloc/test/unit/stats.c
Examining data/memkind-1.10.1/jemalloc/test/unit/stats_print.c
Examining data/memkind-1.10.1/jemalloc/test/unit/test_hooks.c
Examining data/memkind-1.10.1/jemalloc/test/unit/ticker.c
Examining data/memkind-1.10.1/jemalloc/test/unit/tsd.c
Examining data/memkind-1.10.1/jemalloc/test/unit/witness.c
Examining data/memkind-1.10.1/jemalloc/test/unit/zero.c
Examining data/memkind-1.10.1/src/hbwmalloc.c
Examining data/memkind-1.10.1/src/heap_manager.c
Examining data/memkind-1.10.1/src/memkind-auto-dax-kmem-nodes.c
Examining data/memkind-1.10.1/src/memkind-hbw-nodes.c
Examining data/memkind-1.10.1/src/memkind.c
Examining data/memkind-1.10.1/src/memkind_arena.c
Examining data/memkind-1.10.1/src/memkind_bandwidth.c
Examining data/memkind-1.10.1/src/memkind_dax_kmem.c
Examining data/memkind-1.10.1/src/memkind_default.c
Examining data/memkind-1.10.1/src/memkind_gbtlb.c
Examining data/memkind-1.10.1/src/memkind_hbw.c
Examining data/memkind-1.10.1/src/memkind_hugetlb.c
Examining data/memkind-1.10.1/src/memkind_interleave.c
Examining data/memkind-1.10.1/src/memkind_log.c
Examining data/memkind-1.10.1/src/memkind_pmem.c
Examining data/memkind-1.10.1/src/memkind_regular.c
Examining data/memkind-1.10.1/src/tbb_wrapper.c
Examining data/memkind-1.10.1/test/Allocator.hpp
Examining data/memkind-1.10.1/test/TestPolicy.hpp
Examining data/memkind-1.10.1/test/alloc_benchmark.c
Examining data/memkind-1.10.1/test/alloc_performance_tests.cpp
Examining data/memkind-1.10.1/test/allocate_to_max_stress_test.cpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/AllocationSizes.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/Allocation_info.cpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/Allocation_info.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/Allocator.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/AllocatorFactory.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/CSVLogger.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/CommandLine.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/Configuration.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/ConsoleLog.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/FunctionCalls.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/FunctionCallsPerformanceTask.cpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/FunctionCallsPerformanceTask.h
Examining data/memkind-1.10.1/test/allocator_perf_tool/GTestAdapter.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/HBWmallocAllocatorWithTimer.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/HugePageOrganizer.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/HugePageUnmap.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/Iterator.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/JemallocAllocatorWithTimer.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/MemkindAllocatorWithTimer.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/Numastat.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/PmemMockup.cpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/PmemMockup.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/Runnable.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/ScenarioWorkload.cpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/ScenarioWorkload.h
Examining data/memkind-1.10.1/test/allocator_perf_tool/StandardAllocatorWithTimer.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/Stats.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/StressIncreaseToMax.cpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/StressIncreaseToMax.h
Examining data/memkind-1.10.1/test/allocator_perf_tool/Task.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/TaskFactory.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/Tests.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/Thread.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/TimerSysTime.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/VectorIterator.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/Workload.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/WrappersMacros.hpp
Examining data/memkind-1.10.1/test/allocator_perf_tool/main.cpp
Examining data/memkind-1.10.1/test/autohbw_test_helper.c
Examining data/memkind-1.10.1/test/bat_tests.cpp
Examining data/memkind-1.10.1/test/check.cpp
Examining data/memkind-1.10.1/test/check.h
Examining data/memkind-1.10.1/test/common.h
Examining data/memkind-1.10.1/test/dax_kmem_nodes.cpp
Examining data/memkind-1.10.1/test/dax_kmem_nodes.h
Examining data/memkind-1.10.1/test/decorator_test.cpp
Examining data/memkind-1.10.1/test/decorator_test.h
Examining data/memkind-1.10.1/test/dlopen_test.cpp
Examining data/memkind-1.10.1/test/environ_err_dax_kmem_malloc_positive_test.cpp
Examining data/memkind-1.10.1/test/environ_err_dax_kmem_malloc_test.cpp
Examining data/memkind-1.10.1/test/environ_err_hbw_malloc_test.cpp
Examining data/memkind-1.10.1/test/error_message_tests.cpp
Examining data/memkind-1.10.1/test/fragmentation_benchmark_pmem.cpp
Examining data/memkind-1.10.1/test/freeing_memory_segfault_test.cpp
Examining data/memkind-1.10.1/test/gb_page_tests_bind_policy.cpp
Examining data/memkind-1.10.1/test/get_arena_test.cpp
Examining data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc
Examining data/memkind-1.10.1/test/gtest_fused/gtest/gtest.h
Examining data/memkind-1.10.1/test/hbw_allocator_performance_tests.cpp
Examining data/memkind-1.10.1/test/hbw_allocator_tests.cpp
Examining data/memkind-1.10.1/test/hbw_verify_function_test.cpp
Examining data/memkind-1.10.1/test/heap_manager_init_perf_test.cpp
Examining data/memkind-1.10.1/test/huge_page_test.cpp
Examining data/memkind-1.10.1/test/load_tbbmalloc_symbols.c
Examining data/memkind-1.10.1/test/locality_test.cpp
Examining data/memkind-1.10.1/test/main.cpp
Examining data/memkind-1.10.1/test/memkind_allocator_tests.cpp
Examining data/memkind-1.10.1/test/memkind_dax_kmem_test.cpp
Examining data/memkind-1.10.1/test/memkind_defrag_reallocate.cpp
Examining data/memkind-1.10.1/test/memkind_detect_kind_tests.cpp
Examining data/memkind-1.10.1/test/memkind_null_kind_test.cpp
Examining data/memkind-1.10.1/test/memkind_pmem_config_tests.cpp
Examining data/memkind-1.10.1/test/memkind_pmem_long_time_tests.cpp
Examining data/memkind-1.10.1/test/memkind_pmem_tests.cpp
Examining data/memkind-1.10.1/test/memkind_stat_test.cpp
Examining data/memkind-1.10.1/test/memkind_versioning_tests.cpp
Examining data/memkind-1.10.1/test/memory_footprint_test.cpp
Examining data/memkind-1.10.1/test/memory_manager.h
Examining data/memkind-1.10.1/test/multithreaded_tests.cpp
Examining data/memkind-1.10.1/test/negative_tests.cpp
Examining data/memkind-1.10.1/test/performance/framework.cpp
Examining data/memkind-1.10.1/test/performance/framework.hpp
Examining data/memkind-1.10.1/test/performance/operations.hpp
Examining data/memkind-1.10.1/test/performance/perf_tests.cpp
Examining data/memkind-1.10.1/test/performance/perf_tests.hpp
Examining data/memkind-1.10.1/test/pmem_alloc_performance_tests.cpp
Examining data/memkind-1.10.1/test/pmem_allocator_tests.cpp
Examining data/memkind-1.10.1/test/proc_stat.h
Examining data/memkind-1.10.1/test/random_sizes_allocator.h
Examining data/memkind-1.10.1/test/static_kinds_list.h
Examining data/memkind-1.10.1/test/static_kinds_tests.cpp
Examining data/memkind-1.10.1/test/tbbmalloc.h
Examining data/memkind-1.10.1/test/trace_mechanism_test_helper.c
Examining data/memkind-1.10.1/test/trial_generator.cpp
Examining data/memkind-1.10.1/test/trial_generator.h

FINAL RESULTS:

data/memkind-1.10.1/jemalloc/include/jemalloc/internal/test_hooks.h:12:9:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
#define readlink JEMALLOC_HOOK(readlink, test_hooks_libc_hook)
data/memkind-1.10.1/jemalloc/include/jemalloc/internal/test_hooks.h:12:32:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
#define readlink JEMALLOC_HOOK(readlink, test_hooks_libc_hook)
data/memkind-1.10.1/jemalloc/src/jemalloc.c:980:13:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
		linklen = readlink(linkname, buf, PATH_MAX);
data/memkind-1.10.1/test/memkind_pmem_tests.cpp:138:11:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    err = chmod(dir_name, path_stat.st_mode & ~S_IWUSR);
data/memkind-1.10.1/autohbw/autohbw.c:64:13:  [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(stderr, __VA_ARGS__);                                                          \
data/memkind-1.10.1/include/memkind/internal/memkind_log.h:9:47:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define PRINTF_FORMAT __attribute__ ((format (printf, 1, 2)))
data/memkind-1.10.1/jemalloc/src/prof.c:433:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(new_node->name, name);
data/memkind-1.10.1/jemalloc/src/prof.c:2538:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(log_filename, filename);
data/memkind-1.10.1/jemalloc/test/unit/fork.c:86:3:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		execvp(args[0], args);
data/memkind-1.10.1/jemalloc/test/unit/log.c:11:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(log_var_names, names);
data/memkind-1.10.1/jemalloc/test/unit/stats.c:226:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(cmd, "stats.arenas.%u.bins.0.%s", arena_ind, name);
data/memkind-1.10.1/src/memkind_arena.c:788:13:  [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(cmd, 128, arena_stats[stat].stats[j], kind->arena_zero + i);
data/memkind-1.10.1/src/memkind_default.c:55: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(kind->name, name);
data/memkind-1.10.1/src/memkind_hugetlb.c:176:20:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    snprintf_ret = snprintf(formatted_path, sizeof(formatted_path),
data/memkind-1.10.1/src/memkind_hugetlb.c:186:24:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        snprintf_ret = snprintf(formatted_path, sizeof(formatted_path), nr_path_fmt,
data/memkind-1.10.1/src/memkind_log.c:53:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        vfprintf(stderr, format, args);
data/memkind-1.10.1/src/memkind_pmem.c:205:12:  [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).
    (void) strcpy(fullname, dir);
data/memkind-1.10.1/src/memkind_pmem.c:206:12:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    (void) strcat(fullname, template);
data/memkind-1.10.1/test/allocator_perf_tool/HugePageOrganizer.hpp:59:13:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        if (system(cmd) || (get_nr_hugepages(node_number) != nr_hugepages)) {
data/memkind-1.10.1/test/allocator_perf_tool/Numastat.hpp:30:20:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        if((file = popen(cmd.str().c_str(), "r"))) {
data/memkind-1.10.1/test/fragmentation_benchmark_pmem.cpp:126:10:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    std::strcat(file_name, log_tag[policy]);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:1601:10:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
# define vsnprintf _vsnprintf
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:4452:5:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vprintf(fmt, args);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:4472:3:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vprintf(fmt, args);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:4479:3:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vprintf(fmt, args);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest.h:4045:32:  [4] (buffer) StrNCpy:
  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).
            inline const char *StrNCpy(char *dest, const char *src, size_t n)
data/memkind-1.10.1/test/gtest_fused/gtest/gtest.h:4140:26:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
# define GTEST_SNPRINTF_ _snprintf
data/memkind-1.10.1/test/gtest_fused/gtest/gtest.h:4142:26:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
# define GTEST_SNPRINTF_ snprintf
data/memkind-1.10.1/test/gtest_fused/gtest/gtest.h:9786: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(\
data/memkind-1.10.1/test/memkind_dax_kmem_test.cpp:202:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(test1, "%s", val);
data/memkind-1.10.1/test/memkind_null_kind_test.cpp:150:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(test1, "%s", val);
data/memkind-1.10.1/test/memkind_null_kind_test.cpp:183:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(test1, "%s", val);
data/memkind-1.10.1/test/memkind_pmem_tests.cpp:539:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(test1, "%s", val);
data/memkind-1.10.1/test/memkind_pmem_tests.cpp:561:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(test1, "%s", val);
data/memkind-1.10.1/test/memkind_pmem_tests.cpp:583:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(test1, "%s", val);
data/memkind-1.10.1/test/memkind_pmem_tests.cpp:605:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(test1, "%s", val);
data/memkind-1.10.1/test/proc_stat.h:45:21:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
                    sscanf(pos, "%64[a-zA-Z_0-9()]: %s", current_entry_name, value);
data/memkind-1.10.1/examples/filter_example.c:20:5:  [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(0);
data/memkind-1.10.1/examples/filter_example.c:44:30:  [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.
        stream[i] = (double)(random())/(double)(RAND_MAX);
data/memkind-1.10.1/examples/pmem_alignment.c:29:30:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    } else if (argc == 2 && (realpath(argv[1], path) == NULL)) {
data/memkind-1.10.1/examples/pmem_and_dax_kmem_kind.c:29:13:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
        if (realpath(argv[1], path) == NULL) {
data/memkind-1.10.1/examples/pmem_and_default_kind.c:35:13:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
        if (realpath(argv[1], path) == NULL) {
data/memkind-1.10.1/examples/pmem_config.c:29:30:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    } else if (argc == 2 && (realpath(argv[1], path) == NULL)) {
data/memkind-1.10.1/examples/pmem_detect_kind.c:87:30:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    } else if (argc == 2 && (realpath(argv[1], path) == NULL)) {
data/memkind-1.10.1/examples/pmem_free_with_unknown_kind.c:32:30:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    } else if (argc == 2 && (realpath(argv[1], path) == NULL)) {
data/memkind-1.10.1/examples/pmem_kinds.c:33:30:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    } else if (argc == 2 && (realpath(argv[1], path) == NULL)) {
data/memkind-1.10.1/examples/pmem_malloc.c:29:30:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    } else if (argc == 2 && (realpath(argv[1], path) == NULL)) {
data/memkind-1.10.1/examples/pmem_malloc_unlimited.c:27:30:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    } else if (argc == 2 && (realpath(argv[1], path) == NULL)) {
data/memkind-1.10.1/examples/pmem_multithreads.c:34:30:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    } else if (argc == 2 && (realpath(argv[1], path) == NULL)) {
data/memkind-1.10.1/examples/pmem_multithreads_onekind.c:42:30:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    } else if (argc == 2 && (realpath(argv[1], path) == NULL)) {
data/memkind-1.10.1/examples/pmem_usable_size.c:29:30:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    } else if (argc == 2 && (realpath(argv[1], path) == NULL)) {
data/memkind-1.10.1/jemalloc/include/jemalloc/internal/mutex.h:82:37:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
#    define MALLOC_MUTEX_LOCK(m)    EnterCriticalSection(&(m)->lock)
data/memkind-1.10.1/jemalloc/src/jemalloc.c:721: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.
	return getenv(name);
data/memkind-1.10.1/jemalloc/test/src/mtx.c:44:2:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
	EnterCriticalSection(&mtx->lock);
data/memkind-1.10.1/test/allocator_perf_tool/AllocationSizes.hpp:18:9:  [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(seed);
data/memkind-1.10.1/test/allocator_perf_tool/AllocatorFactory.hpp:160:9:  [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(seed);
data/memkind-1.10.1/test/allocator_perf_tool/FunctionCalls.hpp:39:14:  [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.
        std::srand(seed);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:718:37:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
void ShuffleRange(internal::Random* random, int begin, int end,
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:739:39:  [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.
inline void Shuffle(internal::Random* random, std::vector<E>* v) {
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:740: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.
  ShuffleRange(random, 0, static_cast<int>(v->size()), v);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:1201:21:  [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.
  internal::Random* random() { return &random_; }
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:1649:44:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  const char* const testbridge_test_only = getenv(GTEST_TEST_FILTER_ENV_VAR_);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:4271:47:  [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.
void TestCase::ShuffleTests(internal::Random* random) {
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:4272:11:  [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.
  Shuffle(random, &test_indices_);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:6157:7:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
      random()->Reseed(random_seed_);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:6479: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.
  ShuffleRange(random(), 0, last_death_test_case_ + 1, &test_case_indices_);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:6482: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.
  ShuffleRange(random(), last_death_test_case_ + 1,
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:6487:34:  [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.
    test_cases_[i]->ShuffleTests(random());
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:8902:5:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
  ::InitializeCriticalSection(critical_section_);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:8920:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
  ::EnterCriticalSection(critical_section_);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:8952:11:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
        ::InitializeCriticalSection(critical_section_);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest.h:4105:41:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
                const char *const env = getenv(name);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest.h:4108:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
                return getenv(name);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest.h:20913:45:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        void ShuffleTests(internal::Random *random);
data/memkind-1.10.1/test/main.cpp:22:19:  [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.
    while ((opt = getopt(argc, argv, "d:")) != -1) {
data/memkind-1.10.1/test/performance/perf_tests.hpp:34:9:  [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(m_seed);
data/memkind-1.10.1/test/trial_generator.cpp:61:12:  [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.
    return random() % i;
data/memkind-1.10.1/autohbw/autohbw.c:179:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        int level = atoi(log_str);
data/memkind-1.10.1/examples/hello_hbw_example.c:41:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(default_str, "Hello world from standard memory\n");
data/memkind-1.10.1/examples/hello_hbw_example.c:42:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(hbw_str, "Hello world from high bandwidth memory\n");
data/memkind-1.10.1/examples/hello_hbw_example.c:43:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(hbw_hugetlb_str, "Hello world from high bandwidth 2 MB paged memory\n");
data/memkind-1.10.1/examples/hello_memkind_example.c:65:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(default_str, "Hello world from standard memory\n");
data/memkind-1.10.1/examples/hello_memkind_example.c:66:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(hugetlb_str, "Hello world from standard memory with 2 MB pages\n");
data/memkind-1.10.1/examples/hello_memkind_example.c:67:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(hbw_str, "Hello world from high bandwidth memory\n");
data/memkind-1.10.1/examples/hello_memkind_example.c:68:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(hbw_hugetlb_str, "Hello world from high bandwidth 2 MB paged memory\n");
data/memkind-1.10.1/examples/hello_memkind_example.c:69:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(hbw_preferred_str,
data/memkind-1.10.1/examples/hello_memkind_example.c:71:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(hbw_preferred_hugetlb_str,
data/memkind-1.10.1/examples/hello_memkind_example.c:74:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(hbw_interleave_str,
data/memkind-1.10.1/examples/pmem_alignment.c:12:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char path[PATH_MAX] = "/tmp/";
data/memkind-1.10.1/examples/pmem_alignment.c:16: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 error_message[MEMKIND_ERROR_MESSAGE_SIZE];
data/memkind-1.10.1/examples/pmem_and_dax_kmem_kind.c:10:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char path[PATH_MAX]="/tmp/";
data/memkind-1.10.1/examples/pmem_and_dax_kmem_kind.c:14: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 error_message[MEMKIND_ERROR_MESSAGE_SIZE];
data/memkind-1.10.1/examples/pmem_and_default_kind.c:15:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char path[PATH_MAX]="/tmp/";
data/memkind-1.10.1/examples/pmem_and_default_kind.c:19: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 error_message[MEMKIND_ERROR_MESSAGE_SIZE];
data/memkind-1.10.1/examples/pmem_and_default_kind.c:96:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(ptr_default, "Hello world from standard memory - ptr_default.\n");
data/memkind-1.10.1/examples/pmem_and_default_kind.c:97:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(ptr_pmem, "Hello world from file-backed memory - ptr_pmem.\n");
data/memkind-1.10.1/examples/pmem_config.c:12:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char path[PATH_MAX] = "/tmp/";
data/memkind-1.10.1/examples/pmem_config.c:16: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 error_message[MEMKIND_ERROR_MESSAGE_SIZE];
data/memkind-1.10.1/examples/pmem_detect_kind.c:10:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char path[PATH_MAX]="/tmp/";
data/memkind-1.10.1/examples/pmem_detect_kind.c:20: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 error_message[MEMKIND_ERROR_MESSAGE_SIZE];
data/memkind-1.10.1/examples/pmem_free_with_unknown_kind.c:10:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char path[PATH_MAX]="/tmp/";
data/memkind-1.10.1/examples/pmem_free_with_unknown_kind.c:15: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 error_message[MEMKIND_ERROR_MESSAGE_SIZE];
data/memkind-1.10.1/examples/pmem_free_with_unknown_kind.c:25: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 *ptr[100] = { NULL };
data/memkind-1.10.1/examples/pmem_free_with_unknown_kind.c:64:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(ptr[10], "Hello world from standard memory - ptr[10].\n");
data/memkind-1.10.1/examples/pmem_free_with_unknown_kind.c:65:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(ptr[40], "Hello world from standard memory - ptr[40].\n");
data/memkind-1.10.1/examples/pmem_free_with_unknown_kind.c:66:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(ptr[80], "Hello world from persistent memory - ptr[80].\n");
data/memkind-1.10.1/examples/pmem_kinds.c:13:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char path[PATH_MAX]="/tmp/";
data/memkind-1.10.1/examples/pmem_kinds.c:17: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 error_message[MEMKIND_ERROR_MESSAGE_SIZE];
data/memkind-1.10.1/examples/pmem_malloc.c:12:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char path[PATH_MAX]="/tmp/";
data/memkind-1.10.1/examples/pmem_malloc.c:16: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 error_message[MEMKIND_ERROR_MESSAGE_SIZE];
data/memkind-1.10.1/examples/pmem_malloc.c:79:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(pmem_str1, "Hello world from pmem - pmem_str1.\n");
data/memkind-1.10.1/examples/pmem_malloc.c:80:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(pmem_str2, "Hello world from pmem - pmem_str2.\n");
data/memkind-1.10.1/examples/pmem_malloc.c:81:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(pmem_str3, "Hello world from persistent memory - pmem_str3.\n");
data/memkind-1.10.1/examples/pmem_malloc_unlimited.c:10:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char path[PATH_MAX]="/tmp/";
data/memkind-1.10.1/examples/pmem_malloc_unlimited.c:14: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 error_message[MEMKIND_ERROR_MESSAGE_SIZE];
data/memkind-1.10.1/examples/pmem_multithreads.c:15:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char path[PATH_MAX]="/tmp/";
data/memkind-1.10.1/examples/pmem_multithreads.c:24: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 error_message[MEMKIND_ERROR_MESSAGE_SIZE];
data/memkind-1.10.1/examples/pmem_multithreads_onekind.c:14:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char path[PATH_MAX]="/tmp/";
data/memkind-1.10.1/examples/pmem_multithreads_onekind.c:18: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 error_message[MEMKIND_ERROR_MESSAGE_SIZE];
data/memkind-1.10.1/examples/pmem_usable_size.c:12:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char path[PATH_MAX]="/tmp/";
data/memkind-1.10.1/examples/pmem_usable_size.c:16: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 error_message[MEMKIND_ERROR_MESSAGE_SIZE];
data/memkind-1.10.1/include/memkind/internal/memkind_private.h:82: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 name[MEMKIND_NAME_LENGTH_PRIV];
data/memkind-1.10.1/jemalloc/include/jemalloc/internal/arena_stats.h:134:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			assert(((char *)arena_stats)[i] == 0);
data/memkind-1.10.1/jemalloc/include/jemalloc/internal/emitter.h:128:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char fmt[FMT_SIZE];
data/memkind-1.10.1/jemalloc/include/jemalloc/internal/emitter.h:129:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[BUF_SIZE];
data/memkind-1.10.1/jemalloc/include/jemalloc/internal/hash.h:30: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(&ret, (uint8_t *)(p + i), sizeof(uint32_t));
data/memkind-1.10.1/jemalloc/include/jemalloc/internal/hash.h:43: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(&ret, (uint8_t *)(p + i), sizeof(uint64_t));
data/memkind-1.10.1/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h:156:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(p, ptr, copysize);
data/memkind-1.10.1/jemalloc/include/jemalloc/internal/log.h:38:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char log_var_names[JEMALLOC_LOG_VAR_BUFSIZE];
data/memkind-1.10.1/jemalloc/include/jemalloc/internal/log.h:90:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[JEMALLOC_LOG_BUFSIZE];
data/memkind-1.10.1/jemalloc/include/jemalloc/internal/prof_externs.h:18:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char	opt_prof_prefix[
data/memkind-1.10.1/jemalloc/include/jemalloc/internal/seq.h:25:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf, src, sizeof(type));					\
data/memkind-1.10.1/jemalloc/include/jemalloc/internal/seq.h:51:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(dst, buf, sizeof(type));					\
data/memkind-1.10.1/jemalloc/include/jemalloc/internal/stats.h:25:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char opt_stats_print_opts[stats_print_tot_num_options+1];
data/memkind-1.10.1/jemalloc/include/jemalloc/internal/test_hooks.h:9:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
#define open JEMALLOC_HOOK(open, test_hooks_libc_hook)
data/memkind-1.10.1/jemalloc/include/jemalloc/internal/test_hooks.h:9:28:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
#define open JEMALLOC_HOOK(open, test_hooks_libc_hook)
data/memkind-1.10.1/jemalloc/src/arena.c:684:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			assert(((char *)decay)[i] == 0);
data/memkind-1.10.1/jemalloc/src/arena.c:1848:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(ret, ptr, copysize);
data/memkind-1.10.1/jemalloc/src/ctl.c:1443: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(oldp, (void *)&(v), copylen);		\
data/memkind-1.10.1/jemalloc/src/ctl.c:1766:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const char *)
data/memkind-1.10.1/jemalloc/src/ctl.c:1768:39:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
CTL_RO_NL_GEN(opt_dss, opt_dss, const char *)
data/memkind-1.10.1/jemalloc/src/ctl.c:1778:65:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
CTL_RO_NL_GEN(opt_stats_print_opts, opt_stats_print_opts, const char *)
data/memkind-1.10.1/jemalloc/src/ctl.c:1779:55:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
CTL_RO_NL_CGEN(config_fill, opt_junk, opt_junk, const char *)
data/memkind-1.10.1/jemalloc/src/ctl.c:2821:61:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
CTL_RO_GEN(stats_arenas_i_dss, arenas_i(mib[2])->dss, const char *)
data/memkind-1.10.1/jemalloc/src/jemalloc.c:937:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *
data/memkind-1.10.1/jemalloc/src/jemalloc.c:938:43:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
obtain_malloc_conf(unsigned which_source, char buf[PATH_MAX + 1]) {
data/memkind-1.10.1/jemalloc/src/jemalloc.c:1022:30:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    bool initial_call, const char *opts_cache[MALLOC_CONF_NSOURCES],
data/memkind-1.10.1/jemalloc/src/jemalloc.c:1023: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 buf[PATH_MAX + 1]) {
data/memkind-1.10.1/jemalloc/src/jemalloc.c:1024:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static const char *opts_explain[MALLOC_CONF_NSOURCES] = {
data/memkind-1.10.1/jemalloc/src/jemalloc.c:1441:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	const char *opts_cache[MALLOC_CONF_NSOURCES] = {NULL, NULL, NULL, NULL};
data/memkind-1.10.1/jemalloc/src/jemalloc.c:1442:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[PATH_MAX + 1];
data/memkind-1.10.1/jemalloc/src/large.c:312:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(ret, extent_addr_get(extent), copysize);
data/memkind-1.10.1/jemalloc/src/log.c:6:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char log_var_names[JEMALLOC_LOG_VAR_BUFSIZE];
data/memkind-1.10.1/jemalloc/src/malloc_io.c:321: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(s, uppercase ? "0X" : "0x", 2);
data/memkind-1.10.1/jemalloc/src/malloc_io.c:340: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(&str[i], s, cpylen);				\
data/memkind-1.10.1/jemalloc/src/malloc_io.c:522: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 buf[D2S_BUFSIZE];
data/memkind-1.10.1/jemalloc/src/malloc_io.c:532: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 buf[O2S_BUFSIZE];
data/memkind-1.10.1/jemalloc/src/malloc_io.c:541: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 buf[U2S_BUFSIZE];
data/memkind-1.10.1/jemalloc/src/malloc_io.c:550: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 buf[X2S_BUFSIZE];
data/memkind-1.10.1/jemalloc/src/malloc_io.c:559: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 buf[2];
data/memkind-1.10.1/jemalloc/src/malloc_io.c:579: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 buf[X2S_BUFSIZE];
data/memkind-1.10.1/jemalloc/src/malloc_io.c:625:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[MALLOC_PRINTF_BUFSIZE];
data/memkind-1.10.1/jemalloc/src/pages.c:138: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[BUFERROR_BUF];
data/memkind-1.10.1/jemalloc/src/pages.c:471:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1];
data/memkind-1.10.1/jemalloc/src/pages.c:496:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open("/proc/sys/vm/overcommit_memory", O_RDONLY | O_CLOEXEC);
data/memkind-1.10.1/jemalloc/src/pages.c:498:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open("/proc/sys/vm/overcommit_memory", O_RDONLY);
data/memkind-1.10.1/jemalloc/src/pages.c:561:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[sizeof(sys_state_madvise)];
data/memkind-1.10.1/jemalloc/src/pages.c:567:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int fd = open("/sys/kernel/mm/transparent_hugepage/enabled", O_RDONLY);
data/memkind-1.10.1/jemalloc/src/prof.c:43:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char		opt_prof_prefix[
data/memkind-1.10.1/jemalloc/src/prof.c:95:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char log_filename[
data/memkind-1.10.1/jemalloc/src/prof.c:127:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[1];
data/memkind-1.10.1/jemalloc/src/prof.c:216:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char		prof_dump_buf[
data/memkind-1.10.1/jemalloc/src/prof.c:396: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(new_node->vec, bt->vec, bt->len * sizeof(void *));
data/memkind-1.10.1/jemalloc/src/prof.c:840:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(gctx->vec, bt->vec, bt->len * sizeof(void *));
data/memkind-1.10.1/jemalloc/src/prof.c:1302: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(&prof_dump_buf[prof_dump_buf_end], &s[i], n);
data/memkind-1.10.1/jemalloc/src/prof.c:1316:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[PROF_PRINTF_BUFSIZE];
data/memkind-1.10.1/jemalloc/src/prof.c:1340: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(&tctx->dump_cnts, &tctx->cnts, sizeof(prof_cnt_t));
data/memkind-1.10.1/jemalloc/src/prof.c:1678:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char filename[PATH_MAX + 1];
data/memkind-1.10.1/jemalloc/src/prof.c:1685:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	mfd = open(filename, O_RDONLY | O_CLOEXEC);
data/memkind-1.10.1/jemalloc/src/prof.c:1687:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	mfd = open(filename, O_RDONLY);
data/memkind-1.10.1/jemalloc/src/prof.c:2014:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char filename[DUMP_FILENAME_BUFSIZE];
data/memkind-1.10.1/jemalloc/src/prof.c:2073: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[PATH_MAX + 1];
data/memkind-1.10.1/jemalloc/src/prof.c:2090:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char filename_buf[DUMP_FILENAME_BUFSIZE];
data/memkind-1.10.1/jemalloc/src/prof.c:2130: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[DUMP_FILENAME_BUFSIZE];
data/memkind-1.10.1/jemalloc/src/prof.c:2613:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[2 * sizeof(intptr_t) + 3];
data/memkind-1.10.1/jemalloc/src/prof.c:2812:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(ret, thread_name, size);
data/memkind-1.10.1/jemalloc/src/prof.c:2923:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(opt_prof_prefix, PROF_PREFIX_DEFAULT,
data/memkind-1.10.1/jemalloc/src/safety_check.c:11:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[MALLOC_PRINTF_BUFSIZE];
data/memkind-1.10.1/jemalloc/src/stats.c:11: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 *global_mutex_names[mutex_prof_num_global_mutexes] = {
data/memkind-1.10.1/jemalloc/src/stats.c:17: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 *arena_mutex_names[mutex_prof_num_arena_mutexes] = {
data/memkind-1.10.1/jemalloc/src/stats.c:51:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char opt_stats_print_opts[stats_print_tot_num_options+1] = "";
data/memkind-1.10.1/jemalloc/src/stats.c:71:51:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
get_rate_str(uint64_t dividend, uint64_t divisor, char str[6]) {
data/memkind-1.10.1/jemalloc/src/stats.c:102:49:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
mutex_stats_init_cols(emitter_row_t *row, const char *table_name,
data/memkind-1.10.1/jemalloc/src/stats.c:137:31:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
mutex_stats_read_global(const char *name, emitter_col_t *col_name,
data/memkind-1.10.1/jemalloc/src/stats.c:141:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cmd[MUTEX_CTL_STR_MAX_LENGTH];
data/memkind-1.10.1/jemalloc/src/stats.c:167:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const char *name, emitter_col_t *col_name,
data/memkind-1.10.1/jemalloc/src/stats.c:171:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cmd[MUTEX_CTL_STR_MAX_LENGTH];
data/memkind-1.10.1/jemalloc/src/stats.c:200:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cmd[MUTEX_CTL_STR_MAX_LENGTH];
data/memkind-1.10.1/jemalloc/src/stats.c:413: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 util[6];
data/memkind-1.10.1/jemalloc/src/stats.c:1377:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
					char arena_ind_str[20];
data/memkind-1.10.1/jemalloc/test/include/test/test.h:7: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 prefix[ASSERT_BUFSIZE];				\
data/memkind-1.10.1/jemalloc/test/include/test/test.h:8: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 message[ASSERT_BUFSIZE];				\
data/memkind-1.10.1/jemalloc/test/include/test/test.h:217: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 prefix[ASSERT_BUFSIZE];				\
data/memkind-1.10.1/jemalloc/test/include/test/test.h:218: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 message[ASSERT_BUFSIZE];				\
data/memkind-1.10.1/jemalloc/test/include/test/test.h:233: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 prefix[ASSERT_BUFSIZE];				\
data/memkind-1.10.1/jemalloc/test/include/test/test.h:234: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 message[ASSERT_BUFSIZE];				\
data/memkind-1.10.1/jemalloc/test/include/test/test.h: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 prefix[ASSERT_BUFSIZE];				\
data/memkind-1.10.1/jemalloc/test/include/test/test.h: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 message[ASSERT_BUFSIZE];				\
data/memkind-1.10.1/jemalloc/test/include/test/test.h:263: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 prefix[ASSERT_BUFSIZE];				\
data/memkind-1.10.1/jemalloc/test/include/test/test.h:264:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char message[ASSERT_BUFSIZE];				\
data/memkind-1.10.1/jemalloc/test/include/test/test.h:276:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char prefix[ASSERT_BUFSIZE];					\
data/memkind-1.10.1/jemalloc/test/include/test/test.h:277:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char message[ASSERT_BUFSIZE];					\
data/memkind-1.10.1/jemalloc/test/integration/aligned_alloc.c:115:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
					char buf[BUFERROR_BUF];
data/memkind-1.10.1/jemalloc/test/integration/posix_memalign.c:96:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
					char buf[BUFERROR_BUF];
data/memkind-1.10.1/jemalloc/test/integration/thread_arena.c:20: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[BUFERROR_BUF];
data/memkind-1.10.1/jemalloc/test/integration/thread_arena.c:29: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[BUFERROR_BUF];
data/memkind-1.10.1/jemalloc/test/integration/thread_arena.c:42:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[BUFERROR_BUF];
data/memkind-1.10.1/jemalloc/test/stress/microbench.c:22:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ratio_buf[6];
data/memkind-1.10.1/jemalloc/test/unit/arena_reset.c:313:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&hooks_orig, &hooks, sizeof(extent_hooks_t));
data/memkind-1.10.1/jemalloc/test/unit/arena_reset.c:314:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&hooks, &hooks_unmap, sizeof(extent_hooks_t));
data/memkind-1.10.1/jemalloc/test/unit/arena_reset.c:338:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&hooks, &hooks_orig, sizeof(extent_hooks_t));
data/memkind-1.10.1/jemalloc/test/unit/base.c:72:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&hooks_orig, &hooks, sizeof(extent_hooks_t));
data/memkind-1.10.1/jemalloc/test/unit/base.c:73:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&hooks, &hooks_null, sizeof(extent_hooks_t));
data/memkind-1.10.1/jemalloc/test/unit/base.c:102:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&hooks, &hooks_orig, sizeof(extent_hooks_t));
data/memkind-1.10.1/jemalloc/test/unit/base.c:117:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&hooks_orig, &hooks, sizeof(extent_hooks_t));
data/memkind-1.10.1/jemalloc/test/unit/base.c:118:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&hooks, &hooks_not_null, sizeof(extent_hooks_t));
data/memkind-1.10.1/jemalloc/test/unit/base.c:224:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&hooks, &hooks_orig, sizeof(extent_hooks_t));
data/memkind-1.10.1/jemalloc/test/unit/emitter.c:71:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[MALLOC_PRINTF_BUFSIZE];
data/memkind-1.10.1/jemalloc/test/unit/extent_util.c:64: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(out_ref, out, out_sz);
data/memkind-1.10.1/jemalloc/test/unit/extent_util.c:235: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(out_ref, out, 3 * sizeof(size_t));
data/memkind-1.10.1/jemalloc/test/unit/hash.c:83: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(&hashes[i*hashbytes], &out, hashbytes);
data/memkind-1.10.1/jemalloc/test/unit/hash.c:88: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(&hashes[i*hashbytes], out, hashbytes);
data/memkind-1.10.1/jemalloc/test/unit/hash.c:93: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(&hashes[i*hashbytes], out, hashbytes);
data/memkind-1.10.1/jemalloc/test/unit/hash.c:103: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(final, &out, sizeof(out));
data/memkind-1.10.1/jemalloc/test/unit/hash.c:108: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(final, out, sizeof(out));
data/memkind-1.10.1/jemalloc/test/unit/hash.c:113: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(final, out, sizeof(out));
data/memkind-1.10.1/jemalloc/test/unit/hook.c:69:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(arg_args_raw, args_raw, sizeof(uintptr_t) * nargs);
data/memkind-1.10.1/jemalloc/test/unit/log.c:53:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(log_var_names, "l1");
data/memkind-1.10.1/jemalloc/test/unit/log.c:62:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(log_var_names, "l1.a");
data/memkind-1.10.1/jemalloc/test/unit/log.c:71:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(log_var_names, "l1.a|abc|l2|def");
data/memkind-1.10.1/jemalloc/test/unit/log.c:88:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(log_var_names, "l0|l1|abc|l2.b|def");
data/memkind-1.10.1/jemalloc/test/unit/log.c:138:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(log_var_names, "abc|.|def");
data/memkind-1.10.1/jemalloc/test/unit/malloc_io.c:109:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[BUFLEN];
data/memkind-1.10.1/jemalloc/test/unit/malloc_io.c:141:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[BUFLEN];
data/memkind-1.10.1/jemalloc/test/unit/prof_accum.c:12:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open("/dev/null", O_WRONLY);
data/memkind-1.10.1/jemalloc/test/unit/prof_gdump.c:11:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open("/dev/null", O_WRONLY);
data/memkind-1.10.1/jemalloc/test/unit/prof_idump.c:11:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open("/dev/null", O_WRONLY);
data/memkind-1.10.1/jemalloc/test/unit/prof_reset.c:7:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open("/dev/null", O_WRONLY);
data/memkind-1.10.1/jemalloc/test/unit/prof_reset.c:90:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&cnt_all_copy, cnt_all, sizeof(prof_cnt_t));
data/memkind-1.10.1/jemalloc/test/unit/prof_thread_name.c:76:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char thread_name[16] = "";
data/memkind-1.10.1/jemalloc/test/unit/stats.c:258:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cmd[128];
data/memkind-1.10.1/jemalloc/test/unit/stats_print.c:101:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&buf[parser->len], str, len + 1);
data/memkind-1.10.1/src/memkind.c:798: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 name[16];
data/memkind-1.10.1/src/memkind.c:822: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(priv->dir, dir, strlen(dir));
data/memkind-1.10.1/src/memkind_arena.c:32:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *const global_stats[MEMKIND_STAT_TYPE_MAX_VALUE] = {
data/memkind-1.10.1/src/memkind_arena.c:41:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const char *stats[ARENA_STAT_MAX];
data/memkind-1.10.1/src/memkind_arena.c:361:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char cmd[64];
data/memkind-1.10.1/src/memkind_arena.c:389:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char cmd[128];
data/memkind-1.10.1/src/memkind_arena.c:594:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char cmd[64];
data/memkind-1.10.1/src/memkind_arena.c:769: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 cmd[128];
data/memkind-1.10.1/src/memkind_arena.c:875: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(ptr_new, ptr, size);
data/memkind-1.10.1/src/memkind_hugetlb.c:146:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fid = fopen(entry_path, "r");
data/memkind-1.10.1/src/memkind_hugetlb.c:163: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 formatted_path[128];
data/memkind-1.10.1/src/memkind_log.c:21:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char *message_prefixes[MESSAGE_TYPE_MAX_VALUE] = {
data/memkind-1.10.1/src/memkind_pmem.c:204: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 fullname[dir_len + sizeof (template)];
data/memkind-1.10.1/src/memkind_pmem.c:212:16:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
    if ((*fd = mkstemp(fullname)) < 0) {
data/memkind-1.10.1/test/TestPolicy.hpp:42:34:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            address[page_num] = (char *)address[page_num-1] + page_size;
data/memkind-1.10.1/test/TestPolicy.hpp:75:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char buffer[1024];
data/memkind-1.10.1/test/alloc_benchmark.c:70:13:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        n = atol(argv[1]);
data/memkind-1.10.1/test/alloc_benchmark.c:71:16:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        size = atol(argv[2]);
data/memkind-1.10.1/test/alloc_benchmark.c:95:13:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        n = atol(argv[1]);
data/memkind-1.10.1/test/alloc_benchmark.c:96:16:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        size = atol(argv[2]);
data/memkind-1.10.1/test/allocator_perf_tool/HugePageOrganizer.hpp:41:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char path[128];
data/memkind-1.10.1/test/allocator_perf_tool/HugePageOrganizer.hpp:42: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(path,
data/memkind-1.10.1/test/allocator_perf_tool/HugePageOrganizer.hpp:55:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char cmd[128];
data/memkind-1.10.1/test/allocator_perf_tool/HugePageOrganizer.hpp:56: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(cmd, "sudo sh -c \"echo %d > \
data/memkind-1.10.1/test/allocator_perf_tool/Numastat.hpp:27:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buff[256];
data/memkind-1.10.1/test/allocator_perf_tool/StressIncreaseToMax.cpp:80:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        csv_file.open("stress_test_increase_to_max.csv");
data/memkind-1.10.1/test/check.cpp:153:16:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    pagesize = atol(token.c_str());
data/memkind-1.10.1/test/check.cpp:163:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    ip.open ("/proc/self/smaps");
data/memkind-1.10.1/test/error_message_tests.cpp:46: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 error_message[MEMKIND_ERROR_MESSAGE_SIZE];
data/memkind-1.10.1/test/error_message_tests.cpp:58: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 error_message[MEMKIND_ERROR_MESSAGE_SIZE];
data/memkind-1.10.1/test/error_message_tests.cpp:68: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 error_message[MEMKIND_ERROR_MESSAGE_SIZE];
data/memkind-1.10.1/test/fragmentation_benchmark_pmem.cpp:122: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 file_name[100] = {'\0'};
data/memkind-1.10.1/test/fragmentation_benchmark_pmem.cpp:128: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).
    if ((log_file = fopen(file_name, "w+")) == nullptr) {
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:2319:7:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
      MultiByteToWideChar(CP_ACP, 0, ansi, length,
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:2322:3:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  MultiByteToWideChar(CP_ACP, 0, ansi, length,
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:3137: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 error_text[kBufSize] = { '\0' };
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:3221:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char str[5];  // Big enough for the largest valid code point.
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:7266: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[256];
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:7682: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 executable_path[_MAX_PATH + 1];  // NOLINT
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:7967:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  const int cwd_fd = open(".", O_RDONLY);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:8383: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 cwd[GTEST_PATH_MAX_ + 1] = { '\0' };
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:8386: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 cwd[GTEST_PATH_MAX_ + 1] = { '\0' };
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:8798:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  const int fd = open("/proc/self/as", O_RDONLY);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:9524: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(buffer, regex, len);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:9597: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 temp_dir_path[MAX_PATH + 1] = { '\0' };  // NOLINT
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:9598: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 temp_file_path[MAX_PATH + 1] = { '\0' };  // NOLINT
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:9635:29:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
    const int captured_fd = mkstemp(name_template);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:9963: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 text[5] = "";
data/memkind-1.10.1/test/gtest_fused/gtest/gtest.h:4062:24:  [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).
                return fopen(path, mode);
data/memkind-1.10.1/test/locality_test.cpp:49:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char property_name[50];
data/memkind-1.10.1/test/memkind_dax_kmem_test.cpp:123:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(default_str, "memkind_realloc with size %zu\n", size1);
data/memkind-1.10.1/test/memkind_dax_kmem_test.cpp:129:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(default_str, "memkind_realloc with size %zu\n", size2);
data/memkind-1.10.1/test/memkind_pmem_tests.cpp:160:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(default_str, "memkind_malloc MEMKIND_PMEM\n");
data/memkind-1.10.1/test/memkind_pmem_tests.cpp:201: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(default_str, "memkind_calloc MEMKIND_PMEM\n");
data/memkind-1.10.1/test/memkind_pmem_tests.cpp:264: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(default_str, "memkind_calloc MEMKIND_PMEM\n");
data/memkind-1.10.1/test/memkind_pmem_tests.cpp:338:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(default_str, "memkind_realloc MEMKIND_PMEM with size %zu\n", size1);
data/memkind-1.10.1/test/memkind_pmem_tests.cpp:344:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(default_str, "memkind_realloc MEMKIND_PMEM with size %zu\n", size2);
data/memkind-1.10.1/test/memkind_pmem_tests.cpp:1050: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 pmem_middle_name[MEMKIND_NAME_LENGTH_PRIV];
data/memkind-1.10.1/test/memkind_pmem_tests.cpp:1063: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(pmem_middle_name, pmem_kind_array[5]->name, MEMKIND_NAME_LENGTH_PRIV);
data/memkind-1.10.1/test/performance/framework.cpp:251: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).
            if((f = fopen(fileName.c_str(), "a+"))) {
data/memkind-1.10.1/test/proc_stat.h:32:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char line[1024];
data/memkind-1.10.1/test/proc_stat.h:33: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 current_entry_name[1024];
data/memkind-1.10.1/test/proc_stat.h:34:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char str_value[1024];
data/memkind-1.10.1/autohbw/autohbw.c:178: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).
    if (log_str && strlen(log_str)) {
data/memkind-1.10.1/autohbw/autohbw.c:199: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).
    if (memtype_str && strlen(memtype_str)) {
data/memkind-1.10.1/autohbw/autohbw.c:422:22:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
AUTOHBW_EXPORT void *memalign(size_t boundary, size_t size)
data/memkind-1.10.1/include/memkind/internal/memkind_private.h:40:47:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
#define jemk_memalign               JE_SYMBOL(memalign)
data/memkind-1.10.1/jemalloc/include/jemalloc/internal/malloc_io.h:93:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t result = read(fd, buf,
data/memkind-1.10.1/jemalloc/include/jemalloc/internal/test_hooks.h:10:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define read JEMALLOC_HOOK(read, test_hooks_libc_hook)
data/memkind-1.10.1/jemalloc/include/jemalloc/internal/test_hooks.h:10:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define read JEMALLOC_HOOK(read, test_hooks_libc_hook)
data/memkind-1.10.1/jemalloc/msvc/test_threads/test_threads.cpp:37:3:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  getchar();
data/memkind-1.10.1/jemalloc/msvc/test_threads/test_threads.cpp:86:3:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  getchar();
data/memkind-1.10.1/jemalloc/src/ckh.c:544:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	hash(key, strlen((const char *)key), 0x94122f33U, r_hash);
data/memkind-1.10.1/jemalloc/src/jemalloc.c:160:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#  pragma section(".CRT$XCU", read)
data/memkind-1.10.1/jemalloc/src/jemalloc.c:755: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).
	size_t opts_len = strlen(opt_stats_print_opts);
data/memkind-1.10.1/jemalloc/src/jemalloc.c:775: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).
	assert(opts_len == strlen(opt_stats_print_opts));
data/memkind-1.10.1/jemalloc/src/jemalloc.c:912:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strncmp(k, experimental, strlen(experimental)) == 0) {
data/memkind-1.10.1/jemalloc/src/jemalloc.c:1163:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(o, v, cpylen);			\
data/memkind-1.10.1/jemalloc/src/jemalloc.c:1388:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
					strncpy(log_var_names, v, cpylen);
data/memkind-1.10.1/jemalloc/src/log.c:46:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	const char *log_var_end = log_var->name + strlen(log_var->name);
data/memkind-1.10.1/jemalloc/src/malloc_io.c:73: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).
	malloc_write_fd(STDERR_FILENO, s, strlen(s));
data/memkind-1.10.1/jemalloc/src/malloc_io.c:104:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf, b, buflen);
data/memkind-1.10.1/jemalloc/src/malloc_io.c:573: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).
				slen = (prec < 0) ? strlen(s) : (size_t)prec;
data/memkind-1.10.1/jemalloc/src/prof.c:418: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).
		size_t sz = offsetof(prof_thr_node_t, name) + strlen(name) + 1;
data/memkind-1.10.1/jemalloc/src/prof.c:1286: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).
	slen = strlen(s);
data/memkind-1.10.1/jemalloc/src/prof.c:2535:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	} else if (strlen(filename) >= buf_size) {
data/memkind-1.10.1/jemalloc/src/prof.c:2567:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t bytes = strlen(to_write);
data/memkind-1.10.1/jemalloc/src/prof.c:2802: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).
	size = strlen(thread_name) + 1;
data/memkind-1.10.1/jemalloc/src/prof.c:2848:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(s) > 0) {
data/memkind-1.10.1/jemalloc/src/tsd.c:466:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#ifdef read
data/memkind-1.10.1/jemalloc/src/tsd.c:467:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#  undef read
data/memkind-1.10.1/jemalloc/src/tsd.c:478:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#  pragma section(".CRT$XLY",long,read)
data/memkind-1.10.1/jemalloc/src/zone.c:29:10:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
	void *(*memalign)(struct _malloc_zone_t *, size_t, size_t);
data/memkind-1.10.1/jemalloc/test/unit/emitter.c:61: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).
	assert_zu_eq(written, strlen(str), "Buffer overflow!");
data/memkind-1.10.1/jemalloc/test/unit/hook.c:290:8:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
	ptr = memalign(1024, 1);
data/memkind-1.10.1/jemalloc/test/unit/mallctl.c:13: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).
	assert_d_eq(mallctl("version", NULL, NULL, "0.0.0", strlen("0.0.0")),
data/memkind-1.10.1/jemalloc/test/unit/mallctl.c:54:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    strlen("0.0.0")), EPERM, "mallctl() should return EPERM on "
data/memkind-1.10.1/jemalloc/test/unit/malloc_io.c:117: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).
	assert_zu_eq(result, strlen(expected_str_untruncated),		\
data/memkind-1.10.1/jemalloc/test/unit/malloc_io.c:146: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).
	assert_zu_eq(result, strlen(expected_str), "Unexpected result");\
data/memkind-1.10.1/jemalloc/test/unit/stats_print.c:94:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len = strlen(str);
data/memkind-1.10.1/src/memkind.c:411:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
            strncpy(msg, "<memkind> Requested memory kind is not available", size);
data/memkind-1.10.1/src/memkind.c:414:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
            strncpy(msg, "<memkind> Call to mbind() failed", size);
data/memkind-1.10.1/src/memkind.c:417:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
            strncpy(msg, "<memkind> Call to mmap() failed", size);
data/memkind-1.10.1/src/memkind.c:420:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
            strncpy(msg, "<memkind> Call to malloc() failed", size);
data/memkind-1.10.1/src/memkind.c:423:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
            strncpy(msg, "<memkind> Error parsing environment variable (MEMKIND_*)", size);
data/memkind-1.10.1/src/memkind.c:426:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
            strncpy(msg, "<memkind> Invalid input arguments to memkind routine", size);
data/memkind-1.10.1/src/memkind.c:434:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
            strncpy(msg, "<memkind> Unspecified run-time error", size);
data/memkind-1.10.1/src/memkind.c:437:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
            strncpy(msg,
data/memkind-1.10.1/src/memkind.c:442:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
            strncpy(msg, "<memkind> Call to jemk_mallocx() failed", size);
data/memkind-1.10.1/src/memkind.c:445:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
            strncpy(msg, "<memkind> unable to allocate huge pages", size);
data/memkind-1.10.1/src/memkind.c:448:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
            strncpy(msg,
data/memkind-1.10.1/src/memkind.c:453:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
            strncpy(msg, "<memkind> Requested memory type is not available", size);
data/memkind-1.10.1/src/memkind.c:456:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
            strncpy(msg, "<memkind> Operation failed", size);
data/memkind-1.10.1/src/memkind.c:459:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
            strncpy(msg, "<memkind> Call to jemalloc's arenas.create () failed", size);
data/memkind-1.10.1/src/memkind.c:818: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).
    priv->dir = malloc(strlen(dir)+1);
data/memkind-1.10.1/src/memkind.c:822: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).
    memcpy(priv->dir, dir, strlen(dir));
data/memkind-1.10.1/src/memkind_default.c:51:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(name) >= MEMKIND_NAME_LENGTH_PRIV) {
data/memkind-1.10.1/src/memkind_pmem.c:197:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int dir_len = strlen(dir);
data/memkind-1.10.1/test/Allocator.hpp:17:17:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
    virtual int memalign(void **ptr, size_t alignment, size_t size) = 0;
data/memkind-1.10.1/test/Allocator.hpp:63:17:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
    virtual int memalign(void **ptr, size_t alignment, size_t size)
data/memkind-1.10.1/test/Allocator.hpp:158:17:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
    virtual int memalign(void **ptr, size_t alignment, size_t size)
data/memkind-1.10.1/test/allocator_perf_tool/main.cpp:64:9:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        getchar();
data/memkind-1.10.1/test/bat_tests.cpp:148:10:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
    void memalign(size_t alignment, size_t size)
data/memkind-1.10.1/test/bat_tests.cpp:151:30:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
        int ret = allocator->memalign(&ptr, alignment, size);
data/memkind-1.10.1/test/bat_tests.cpp:191:31:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
    BasicAllocTest(allocator).memalign(4096, size);
data/memkind-1.10.1/test/bat_tests.cpp:313:31:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
TEST_P(HBWPolicyHugePageTest, memalign)
data/memkind-1.10.1/test/bat_tests.cpp:318:42:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
    BasicAllocTest(&hbwmalloc_allocator).memalign(4096, get_size(GetParam()));
data/memkind-1.10.1/test/check.cpp:179:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    string read;
data/memkind-1.10.1/test/check.cpp:185:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ip >> read;
data/memkind-1.10.1/test/check.cpp:189:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        get_address_range (read,
data/memkind-1.10.1/test/check.cpp:193:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        getline(ip, read);
data/memkind-1.10.1/test/check.cpp:194:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        lpagesize = get_kpagesize(read);
data/memkind-1.10.1/test/check.cpp:201:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read.empty()) {
data/memkind-1.10.1/test/check.cpp:217:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    string read;
data/memkind-1.10.1/test/error_message_tests.cpp:50: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).
        EXPECT_TRUE(strlen(error_message) < MEMKIND_ERROR_MESSAGE_SIZE - 1);
data/memkind-1.10.1/test/error_message_tests.cpp:62:57:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        EXPECT_TRUE(strncmp(error_message, "<memkind>", strlen("<memkind>")) == 0);
data/memkind-1.10.1/test/error_message_tests.cpp:71: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).
                        strlen("<memkind> Undefined error number:")) == 0);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:2317: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).
  const int length = strlen(ansi);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:3282:34:  [1] (buffer) wcslen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    num_chars = static_cast<int>(wcslen(str));
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:5117:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      segment = next_segment + strlen("]]>");
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:5287: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).
  result.reserve(strlen(str) + 1);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:6540:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  const size_t prefix_len = strlen(prefix);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:6936: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).
  else if (temp_dir[strlen(temp_dir) - 1] == '\\')
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:9258:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  const size_t full_regex_len = strlen(regex) + 10;
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:9512: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).
  const size_t len = strlen(regex);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:10223:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    PrintCharsAsStringTo(s, strlen(s), os);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc:10240:34:  [1] (buffer) wcslen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    PrintCharsAsStringTo(s, std::wcslen(s), os);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest.h:4047:24:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                return strncpy(dest, src, n);
data/memkind-1.10.1/test/gtest_fused/gtest/gtest.h:4081:41:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                return static_cast<int>(read(fd, buf, count));
data/memkind-1.10.1/test/performance/operations.hpp:39:50:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
#define jexx_memalign JE(SYSTEM_JEMALLOC_PREFIX, memalign)
data/memkind-1.10.1/test/performance/operations.hpp:201:27:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
                    mem = memalign(alignment, size);

ANALYSIS SUMMARY:

Hits = 403
Lines analyzed = 115153 in approximately 2.65 seconds (43396 lines/second)
Physical Source Lines of Code (SLOC) = 84732
Hits@level = [0] 371 [1]  88 [2] 238 [3]  40 [4]  33 [5]   4
Hits@level+ = [0+] 774 [1+] 403 [2+] 315 [3+]  77 [4+]  37 [5+]   4
Hits/KSLOC@level+ = [0+] 9.13468 [1+] 4.75617 [2+] 3.7176 [3+] 0.908748 [4+] 0.436671 [5+] 0.0472077
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.