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/freecell-solver-5.0.0/likely.h
Examining data/freecell-solver-5.0.0/split_cmd_line.h
Examining data/freecell-solver-5.0.0/depth_dbm_procs.h
Examining data/freecell-solver-5.0.0/fcs_hash.h
Examining data/freecell-solver-5.0.0/var_base_writer.h
Examining data/freecell-solver-5.0.0/fcs_conf.h
Examining data/freecell-solver-5.0.0/fcs_base64.h
Examining data/freecell-solver-5.0.0/trace_mem.h
Examining data/freecell-solver-5.0.0/dbm_cache.h
Examining data/freecell-solver-5.0.0/rinutils.h
Examining data/freecell-solver-5.0.0/game_type_limit.h
Examining data/freecell-solver-5.0.0/delta_states_test_common.h
Examining data/freecell-solver-5.0.0/dbm_kaztree_compare.h
Examining data/freecell-solver-5.0.0/delta_states_impl.h
Examining data/freecell-solver-5.0.0/gen_ms_boards__hll_iface.c
Examining data/freecell-solver-5.0.0/fcc_brfs_test.h
Examining data/freecell-solver-5.0.0/trim_trailing_whitespace.h
Examining data/freecell-solver-5.0.0/multi_cl_callback.h
Examining data/freecell-solver-5.0.0/meta_alloc.c
Examining data/freecell-solver-5.0.0/dbm_calc_derived_iface.h
Examining data/freecell-solver-5.0.0/dbm_leveldb.cpp
Examining data/freecell-solver-5.0.0/instance.c
Examining data/freecell-solver-5.0.0/preset.c
Examining data/freecell-solver-5.0.0/lock.h
Examining data/freecell-solver-5.0.0/rank2str.h
Examining data/freecell-solver-5.0.0/internal_move_struct.h
Examining data/freecell-solver-5.0.0/output_to_file.h
Examining data/freecell-solver-5.0.0/board_gen/pi_make_microsoft_freecell_board.c
Examining data/freecell-solver-5.0.0/board_gen/find_deal.c
Examining data/freecell-solver-5.0.0/include/freecell-solver/fcs_dllexport.h
Examining data/freecell-solver-5.0.0/include/freecell-solver/fcs_enums.h
Examining data/freecell-solver-5.0.0/include/freecell-solver/fcs_user.h
Examining data/freecell-solver-5.0.0/include/freecell-solver/fcs_limit.h
Examining data/freecell-solver-5.0.0/include/freecell-solver/fcs_move.h
Examining data/freecell-solver-5.0.0/include/freecell-solver/fcs_cl.h
Examining data/freecell-solver-5.0.0/offloading_queue.h
Examining data/freecell-solver-5.0.0/scans_impl.h
Examining data/freecell-solver-5.0.0/simpsim.h
Examining data/freecell-solver-5.0.0/fcc_brfs_test.c
Examining data/freecell-solver-5.0.0/cl_callback_range.h
Examining data/freecell-solver-5.0.0/range_solvers_binary_output.h
Examining data/freecell-solver-5.0.0/pruner-main.c
Examining data/freecell-solver-5.0.0/dbm_solver_head.h
Examining data/freecell-solver-5.0.0/generic_tree.h
Examining data/freecell-solver-5.0.0/typeof_wrap.h
Examining data/freecell-solver-5.0.0/dbm_calc_derived.h
Examining data/freecell-solver-5.0.0/cl_callback_common.h
Examining data/freecell-solver-5.0.0/preset.h
Examining data/freecell-solver-5.0.0/google_hash.h
Examining data/freecell-solver-5.0.0/delta_states.c
Examining data/freecell-solver-5.0.0/threaded_range_solver.c
Examining data/freecell-solver-5.0.0/lib.c
Examining data/freecell-solver-5.0.0/dbm_trace.h
Examining data/freecell-solver-5.0.0/delta_states_any.h
Examining data/freecell-solver-5.0.0/dbm_lru_cache.h
Examining data/freecell-solver-5.0.0/move.c
Examining data/freecell-solver-5.0.0/rand.h
Examining data/freecell-solver-5.0.0/main_cl_callback_common.h
Examining data/freecell-solver-5.0.0/cmd_line.c
Examining data/freecell-solver-5.0.0/check_and_add_state.c
Examining data/freecell-solver-5.0.0/simpsim.c
Examining data/freecell-solver-5.0.0/delta_states_debondt.c
Examining data/freecell-solver-5.0.0/main.c
Examining data/freecell-solver-5.0.0/handle_parsing.h
Examining data/freecell-solver-5.0.0/fc_pro_iface_pos.h
Examining data/freecell-solver-5.0.0/pseudo_dfs_atomic_moves_solver.c
Examining data/freecell-solver-5.0.0/fc_pro_range_solver.c
Examining data/freecell-solver-5.0.0/pqueue.h
Examining data/freecell-solver-5.0.0/iter_handler_base.h
Examining data/freecell-solver-5.0.0/summarizing_solver.c
Examining data/freecell-solver-5.0.0/move_funcs_order.h
Examining data/freecell-solver-5.0.0/depth_dbm_solver.c
Examining data/freecell-solver-5.0.0/str_utils.h
Examining data/freecell-solver-5.0.0/unused.h
Examining data/freecell-solver-5.0.0/fc_pro_iface_aux.c
Examining data/freecell-solver-5.0.0/meta_alloc.h
Examining data/freecell-solver-5.0.0/dbm_solver.h
Examining data/freecell-solver-5.0.0/dbm_bdb.c
Examining data/freecell-solver-5.0.0/freecell.h
Examining data/freecell-solver-5.0.0/bool.h
Examining data/freecell-solver-5.0.0/gen_ms_boards__hll_iface.h
Examining data/freecell-solver-5.0.0/kaz_tree.c
Examining data/freecell-solver-5.0.0/dbm_move_to_string.h
Examining data/freecell-solver-5.0.0/kaz_tree.h
Examining data/freecell-solver-5.0.0/state.h
Examining data/freecell-solver-5.0.0/gen_boards_lib.c
Examining data/freecell-solver-5.0.0/xxHash-wrapper/xxHash-0.6.4/xxhash.c
Examining data/freecell-solver-5.0.0/xxHash-wrapper/xxHash-0.6.4/xxhash.h
Examining data/freecell-solver-5.0.0/xxHash-wrapper/wrap_xxhash.h
Examining data/freecell-solver-5.0.0/var_base_int.h
Examining data/freecell-solver-5.0.0/t/debondt-delta-states-test.c
Examining data/freecell-solver-5.0.0/t/dbm-kaztree-compare-records-test.c
Examining data/freecell-solver-5.0.0/t/bit-reader-and-writer-test.c
Examining data/freecell-solver-5.0.0/t/delta-states-test.c
Examining data/freecell-solver-5.0.0/count.h
Examining data/freecell-solver-5.0.0/measure_depth_dep_tests_order_performance.c
Examining data/freecell-solver-5.0.0/game_type_params.h
Examining data/freecell-solver-5.0.0/meta_move_funcs_helpers.h
Examining data/freecell-solver-5.0.0/state.c
Examining data/freecell-solver-5.0.0/pseudo_dfs_cache.h
Examining data/freecell-solver-5.0.0/dbm_solver.c
Examining data/freecell-solver-5.0.0/move_funcs_order.c
Examining data/freecell-solver-5.0.0/set_weights.h
Examining data/freecell-solver-5.0.0/split_cmd_line.c
Examining data/freecell-solver-5.0.0/gen_ms_boards__find_deal.h
Examining data/freecell-solver-5.0.0/split_fcc_solver.c
Examining data/freecell-solver-5.0.0/depth_multi_queue.h
Examining data/freecell-solver-5.0.0/delta_states.h
Examining data/freecell-solver-5.0.0/instance_for_lib.h
Examining data/freecell-solver-5.0.0/var_base_reader.h
Examining data/freecell-solver-5.0.0/alloc_wrap.h
Examining data/freecell-solver-5.0.0/fcc_brfs.h
Examining data/freecell-solver-5.0.0/default_iter_handler.h
Examining data/freecell-solver-5.0.0/fc_pro_iface.c
Examining data/freecell-solver-5.0.0/freecell.c
Examining data/freecell-solver-5.0.0/scans.c
Examining data/freecell-solver-5.0.0/sys/tree.h
Examining data/freecell-solver-5.0.0/try_param.h
Examining data/freecell-solver-5.0.0/cl_callback.h
Examining data/freecell-solver-5.0.0/fcs_err.h
Examining data/freecell-solver-5.0.0/scans.h
Examining data/freecell-solver-5.0.0/range_solvers_gen_ms_boards.h
Examining data/freecell-solver-5.0.0/fcs-libavl/rb.h
Examining data/freecell-solver-5.0.0/fcs-libavl/rb.c
Examining data/freecell-solver-5.0.0/patsolve/patsolve/fnv.h
Examining data/freecell-solver-5.0.0/patsolve/patsolve/include/freecell-solver/fcs_pats_xy_param.h
Examining data/freecell-solver-5.0.0/patsolve/patsolve/msg.h
Examining data/freecell-solver-5.0.0/patsolve/patsolve/print_card.h
Examining data/freecell-solver-5.0.0/patsolve/patsolve/patsolve.c
Examining data/freecell-solver-5.0.0/patsolve/patsolve/msdeal.c
Examining data/freecell-solver-5.0.0/patsolve/patsolve/tree.h
Examining data/freecell-solver-5.0.0/patsolve/patsolve/pat.c
Examining data/freecell-solver-5.0.0/patsolve/patsolve/pat.h
Examining data/freecell-solver-5.0.0/patsolve/patsolve/tree.c
Examining data/freecell-solver-5.0.0/dbm_calc_derived_test.c
Examining data/freecell-solver-5.0.0/portable_time.h
Examining data/freecell-solver-5.0.0/asprintf-1.0/vasprintf-novacopy.c
Examining data/freecell-solver-5.0.0/asprintf-1.0/asprintf.h
Examining data/freecell-solver-5.0.0/asprintf-1.0/vasprintf-msvc-nofuture.c
Examining data/freecell-solver-5.0.0/asprintf-1.0/vasprintf-c99.c
Examining data/freecell-solver-5.0.0/asprintf-1.0/vasprintf-msvc.c
Examining data/freecell-solver-5.0.0/asprintf-1.0/vasprintf-c99-loop.c
Examining data/freecell-solver-5.0.0/asprintf-1.0/asprintf.c
Examining data/freecell-solver-5.0.0/asprintf-1.0/test.c
Examining data/freecell-solver-5.0.0/range_solvers.h
Examining data/freecell-solver-5.0.0/bit_rw.h
Examining data/freecell-solver-5.0.0/render_state.h
Examining data/freecell-solver-5.0.0/serial_range_solver.c
Examining data/freecell-solver-5.0.0/dbm_procs_inner.h
Examining data/freecell-solver-5.0.0/move_stack_compact_alloc.h
Examining data/freecell-solver-5.0.0/indirect_buffer.h
Examining data/freecell-solver-5.0.0/google_hash.cpp
Examining data/freecell-solver-5.0.0/multi_fc_solve_main.c
Examining data/freecell-solver-5.0.0/forking_range_solver.c
Examining data/freecell-solver-5.0.0/dbm_procs.h
Examining data/freecell-solver-5.0.0/dbm_kaztree.c
Examining data/freecell-solver-5.0.0/fcs_user_internal.h
Examining data/freecell-solver-5.0.0/dbm_common.h
Examining data/freecell-solver-5.0.0/move.h
Examining data/freecell-solver-5.0.0/delta_states_iface.h
Examining data/freecell-solver-5.0.0/min_and_max.h
Examining data/freecell-solver-5.0.0/read_state.h
Examining data/freecell-solver-5.0.0/hacks_for_hlls.c
Examining data/freecell-solver-5.0.0/delta_states_debondt_impl.h
Examining data/freecell-solver-5.0.0/gen_ms_boards__rand.h
Examining data/freecell-solver-5.0.0/card.c
Examining data/freecell-solver-5.0.0/instance.h

FINAL RESULTS:

data/freecell-solver-5.0.0/asprintf-1.0/vasprintf-c99-loop.c:44:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      r = vsnprintf(*strp, size, fmt, ap2);
data/freecell-solver-5.0.0/asprintf-1.0/vasprintf-c99.c:36: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.
  size = vsnprintf(0, 0, fmt, ap2);
data/freecell-solver-5.0.0/asprintf-1.0/vasprintf-c99.c:43:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      r = vsnprintf(*strp, size+1, fmt, ap);  //+1 for null
data/freecell-solver-5.0.0/asprintf-1.0/vasprintf-msvc-nofuture.c:30:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      r = vsnprintf(*strp, size+1, fmt, ap);  //+1 for null
data/freecell-solver-5.0.0/asprintf-1.0/vasprintf-msvc.c:31:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      r = vsnprintf(*strp, size+1, fmt, ap);  //+1 for null
data/freecell-solver-5.0.0/asprintf-1.0/vasprintf-novacopy.c:24:22:  [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.
  int r = -1, size = vsnprintf(0, 0, fmt, ap);
data/freecell-solver-5.0.0/asprintf-1.0/vasprintf-novacopy.c:31:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      r = vsnprintf(*strp, size+1, fmt, ap);  //+1 for null
data/freecell-solver-5.0.0/cmd_line.c:73:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(windows_global_presetc, "%s/../share/freecell-solver/presetrc",
data/freecell-solver-5.0.0/cmd_line.c:157:37:  [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.
static inline __attribute__((format(printf, 1, 2))) char *calc_errstr_s(
data/freecell-solver-5.0.0/cmd_line.c:658:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    sprintf(complete_path, "%s%s", opened_files_dir, s);
data/freecell-solver-5.0.0/dbm_move_to_string.h:47:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            s += sprintf(s, "%s", " -> ");
data/freecell-solver-5.0.0/dbm_procs.h:219: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(out_fh,
data/freecell-solver-5.0.0/dbm_trace.h:20: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(out_fh, my_format, __VA_ARGS__);                                   \
data/freecell-solver-5.0.0/fc_pro_range_solver.c:113:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(command,
data/freecell-solver-5.0.0/fc_pro_range_solver.c:117:43:  [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.
            FILE *const from_make_pysol = popen(command, "r");
data/freecell-solver-5.0.0/fcs_err.h:17:23:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
__attribute__((format(printf, 1, 2))) void
data/freecell-solver-5.0.0/fcs_err.h:23:5:  [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, msg, ap);
data/freecell-solver-5.0.0/lib.c:2601:22:  [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).
#define SET_ERROR(s) strcpy(user->error_string, s)
data/freecell-solver-5.0.0/lib.c:2790: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(s, orig_str);
data/freecell-solver-5.0.0/lib.c:3932:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(string, "%s%s.",
data/freecell-solver-5.0.0/move_funcs_order.c:33:20:  [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).
#define SET_ERR(s) strcpy(error_string, s);
data/freecell-solver-5.0.0/offloading_queue.h:196:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buffer, "%s/fcs_queue%lXq_%020lX.page", offload_dir_path,
data/freecell-solver-5.0.0/output_to_file.h:99:17:  [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(output_fh,
data/freecell-solver-5.0.0/patsolve/patsolve/msg.h:23:5:  [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, msg, ap);
data/freecell-solver-5.0.0/patsolve/patsolve/patsolve.c:57:19:  [4] (buffer) strecpy:
  This function does not protect against buffer overflows (CWE-120). Ensure
  the destination has 4 times the size of the source, to leave room for
  expansion.
static inline int strecpy(char *dest, const char *src)
data/freecell-solver-5.0.0/patsolve/patsolve/patsolve.c:123:17:  [4] (buffer) strecpy:
  This function does not protect against buffer overflows (CWE-120). Ensure
  the destination has 4 times the size of the source, to leave room for
  expansion.
            i = strecpy(w_col + 1, (char *)(l->pile));
data/freecell-solver-5.0.0/portable_time.h:100:5:  [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.
    printf(("Finished at " FCS_T_FMT " (total_num_iters=" FCS_LL_FMT ")\n"),
data/freecell-solver-5.0.0/pseudo_dfs_atomic_moves_solver.c:316:32:  [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.
    FILE *const last_line_fh = popen(("tail -1 " LOG_FILENAME), "r");
data/freecell-solver-5.0.0/range_solvers.h:19:56:  [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.
static __attribute__((noreturn)) __attribute__((format(printf, 1, 2))) void
data/freecell-solver-5.0.0/range_solvers.h:24:5:  [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, msg, ap);
data/freecell-solver-5.0.0/rank2str.h:40:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(str, (display_T ? card_map_3_T : card_map_3_10)[rank_idx]);
data/freecell-solver-5.0.0/scans_impl.h:139:37:  [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.
static inline __attribute__((format(printf, 1, 2))) void fcs_trace(
data/freecell-solver-5.0.0/scans_impl.h:147: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(stdout, format, my_va_list);
data/freecell-solver-5.0.0/serial_range_solver.c:118:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(solution_fn, "%s" FCS_LL9_FMT ".sol", solutions_directory,
data/freecell-solver-5.0.0/state.c:175:17:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    output_s += sprintf(output_s, __VA_ARGS__)
data/freecell-solver-5.0.0/state.c:238:36:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                freecells_s_end += sprintf(freecells_s_end, "%3s ", freecell);
data/freecell-solver-5.0.0/summarizing_solver.c:134:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(command, "make_pysol_freecell_board.py -F -t %ld %s",
data/freecell-solver-5.0.0/summarizing_solver.c:137:43:  [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.
            FILE *const from_make_pysol = popen(command, "r");
data/freecell-solver-5.0.0/check_and_add_state.c:417:13:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        if (getenv("FCS_DEBUG2"))
data/freecell-solver-5.0.0/cl_callback.h:19:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        if (!getenv("FREECELL_SOLVER_QUIET"))
data/freecell-solver-5.0.0/cmd_line.c:48:28:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    char *const home_dir = getenv("HOME");
data/freecell-solver-5.0.0/cmd_line.c:85:23:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        (const char *)getenv("FREECELL_SOLVER_PRESETRC"),
data/freecell-solver-5.0.0/main_cl_callback_common.h:140:32:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        const char *help_key = getenv("FREECELL_SOLVER_DEFAULT_HELP");
data/freecell-solver-5.0.0/scans_impl.h:145: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.
    if (getenv("FCS_TRACE"))
data/freecell-solver-5.0.0/board_gen/find_deal.c:36: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 ret[128];
data/freecell-solver-5.0.0/board_gen/find_deal.c:59:24:  [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).
        ret->ints[i] = atol(str + WIDTH * i);
data/freecell-solver-5.0.0/board_gen/find_deal.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(obj->ret, "%lld",
data/freecell-solver-5.0.0/check_and_add_state.c:253:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(new_ptr, column, col_len);
data/freecell-solver-5.0.0/cl_callback.h:41:25:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE *const f = fopen(argv[arg], "r");
data/freecell-solver-5.0.0/cl_callback.h:79: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 error_string[120];
data/freecell-solver-5.0.0/cl_callback.h:102:31:  [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 (!(output_fh = fopen(display_context.output_filename, "wt")))
data/freecell-solver-5.0.0/cmd_line.c:47:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char home_dir_presetrc[MAX_PATH_LEN];
data/freecell-solver-5.0.0/cmd_line.c:56: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 windows_exe_dir[MAX_PATH] = "";
data/freecell-solver-5.0.0/cmd_line.c:57: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 windows_global_presetc[MAX_PATH + 100] = "";
data/freecell-solver-5.0.0/cmd_line.c:84: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 *const presetrc_pathes[4] = {
data/freecell-solver-5.0.0/cmd_line.c:98:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE *f = fopen(path, "rt");
data/freecell-solver-5.0.0/cmd_line.c:105:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char line[8192];
data/freecell-solver-5.0.0/cmd_line.c:205: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 dir[MAX_PATH_LEN + 1];
data/freecell-solver-5.0.0/cmd_line.c:295:66:  [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).
            freecell_solver_user_limit_iterations_long(instance, atol((*arg)));
data/freecell-solver-5.0.0/cmd_line.c:313:66:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            if (freecell_solver_user_set_num_freecells(instance, atoi(*arg)) !=
data/freecell-solver-5.0.0/cmd_line.c:328:63:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            if (freecell_solver_user_set_num_stacks(instance, atoi(*arg)) != 0)
data/freecell-solver-5.0.0/cmd_line.c:342:62:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            if (freecell_solver_user_set_num_decks(instance, atoi(*arg)) != 0)
data/freecell-solver-5.0.0/cmd_line.c:490:60:  [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).
            freecell_solver_user_set_random_seed(instance, atoi(*arg));
data/freecell-solver-5.0.0/cmd_line.c:498:27:  [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).
                instance, atol((*arg)));
data/freecell-solver-5.0.0/cmd_line.c:508:27:  [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).
                instance, atol((*arg)));
data/freecell-solver-5.0.0/cmd_line.c:544:65:  [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).
            freecell_solver_user_set_soft_thread_step(instance, atoi(*arg));
data/freecell-solver-5.0.0/cmd_line.c:650:45:  [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).
                    num_file_args_to_skip = atoi(*arg);
data/freecell-solver-5.0.0/cmd_line.c:656:21:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                    char
data/freecell-solver-5.0.0/cmd_line.c:659:25:  [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).
                    f = fopen(complete_path, "rt");
data/freecell-solver-5.0.0/cmd_line.c:672:25:  [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).
                    f = fopen(s, "rt");
data/freecell-solver-5.0.0/cmd_line.c:764:29:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                min_depth = atoi(*arg);
data/freecell-solver-5.0.0/cmd_line.c:803:60:  [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).
            freecell_solver_user_set_cache_limit(instance, atol(*arg));
data/freecell-solver-5.0.0/dbm_bdb.c:42:25:  [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).
    if ((ret = db->dbp->open(
data/freecell-solver-5.0.0/dbm_bdb.c:60: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.
    unsigned char dummy[100];
data/freecell-solver-5.0.0/dbm_cache.h:145: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(moves, moves_to_parent, len);
data/freecell-solver-5.0.0/dbm_calc_derived.h:76: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_state->indirect_stacks_buffer[copy_col_idx << 7]),    \
data/freecell-solver-5.0.0/dbm_calc_derived_iface.h:21: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.
    unsigned char s[RANK_KING];
data/freecell-solver-5.0.0/dbm_leveldb.cpp:42: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(parent_and_move + 1, value.data() + 1,
data/freecell-solver-5.0.0/dbm_move_to_string.h:30:18:  [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.
            s += sprintf(s, "Column %d", val_to_inspect);
data/freecell-solver-5.0.0/dbm_move_to_string.h:37:22:  [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.
                s += sprintf(s, "Freecell %d", val_to_inspect);
data/freecell-solver-5.0.0/dbm_move_to_string.h:42:22:  [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.
                s += sprintf(s, "Foundation %d", val_to_inspect);
data/freecell-solver-5.0.0/dbm_procs.h:422:41:  [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).
        if ((inp->pre_cache_max_count = atol(param)) < 1000)
data/freecell-solver-5.0.0/dbm_procs.h:451:41:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        if ((inp->num_threads = (size_t)atoi(param)) < 1)
data/freecell-solver-5.0.0/dbm_procs.h:459:34:  [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).
        inp->iters_delta_limit = atol(param);
data/freecell-solver-5.0.0/dbm_procs.h:464:34:  [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).
        if ((inp->caches_delta = atol(param)) < 1000)
data/freecell-solver-5.0.0/dbm_procs_inner.h:115:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char move_buffer[500];
data/freecell-solver-5.0.0/dbm_procs_inner.h:149:22:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *const fh = fopen(filename, "r");
data/freecell-solver-5.0.0/dbm_procs_inner.h:172:42:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *const out_fh = (out_filename ? fopen(out_filename, "at") : stdout);
data/freecell-solver-5.0.0/dbm_solver.c:557:26:  [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).
            start_line = atol(param);
data/freecell-solver-5.0.0/dbm_solver.c:596:30:  [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).
        intermediate_in_fh = fopen(intermediate_input_filename, "rt");
data/freecell-solver-5.0.0/default_iter_handler.h:33: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 state_string[1000];
data/freecell-solver-5.0.0/delta_states.h:62: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.
    unsigned char s[FCS_ENCODED_STATE_COUNT_CHARS];
data/freecell-solver-5.0.0/delta_states_test_common.h:44: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 as_str[1000];
data/freecell-solver-5.0.0/depth_dbm_solver.c:315:46:  [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).
            max_batch_size = (fcs_batch_size)atol(param);
data/freecell-solver-5.0.0/fc_pro_iface_aux.c:20:19:  [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.
        string += sprintf(string, "%d%d", 1 + fcs_move_get_src_stack(move.move),
data/freecell-solver-5.0.0/fc_pro_iface_aux.c:25:13:  [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(string, "v%x", fcs_move_get_num_cards_in_seq(move.move));
data/freecell-solver-5.0.0/fc_pro_range_solver.c:64:48:  [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).
            total_iterations_limit_per_board = atol(param);
data/freecell-solver-5.0.0/fc_pro_range_solver.c:99:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[2000];
data/freecell-solver-5.0.0/fc_pro_range_solver.c:111:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char command[1000];
data/freecell-solver-5.0.0/fc_pro_range_solver.c:187: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 temp_str[10];
data/freecell-solver-5.0.0/fcs-libavl/rb.c:137:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char da[RB_MAX_HEIGHT];   /* Directions moved from stack nodes. */
data/freecell-solver-5.0.0/fcs-libavl/rb.c:294:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char da[RB_MAX_HEIGHT];   /* Directions moved from stack nodes. */
data/freecell-solver-5.0.0/fcs-libavl/rb.c:671:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy (trav->rb_stack, (const void *) src->rb_stack,
data/freecell-solver-5.0.0/fcs_base64.h:23:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char decoding_table[256];
data/freecell-solver-5.0.0/forking_range_solver.c:117:27:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            num_workers = atoi(param);
data/freecell-solver-5.0.0/include/freecell-solver/fcs_move.h:41: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.
    unsigned char c[4];
data/freecell-solver-5.0.0/indirect_buffer.h:15:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef char dll_ind_buf[MAX_NUM_STACKS << 7];
data/freecell-solver-5.0.0/instance.h:513: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[FCS_MAX_IDENT_LEN];
data/freecell-solver-5.0.0/instance.h:826:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(dest, src, my_size);
data/freecell-solver-5.0.0/lib.c:182:40:  [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).
        const size_t p_quota = (size_t)atol(p);
data/freecell-solver-5.0.0/lib.c:202: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 p_scan_copy[FCS_MAX_IDENT_LEN];
data/freecell-solver-5.0.0/lib.c:1921: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[30];
data/freecell-solver-5.0.0/lib.c:2065: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 state_string_copy[MAX_STATE_STRING_COPY_LEN];
data/freecell-solver-5.0.0/lib.c:2586: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[MAX_FLARE_LEN_NAME];
data/freecell-solver-5.0.0/lib.c:2661:46:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            const int_fast32_t count_iters = atoi(++cmd_end);
data/freecell-solver-5.0.0/lib.c:3914:9:  [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(string, "There's an empty slot in one of the stacks.");
data/freecell-solver-5.0.0/lib.c:3924: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 card_str[4];
data/freecell-solver-5.0.0/lib.c:3941:9:  [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(string, "Not enough input.");
data/freecell-solver-5.0.0/main_cl_callback_common.h:159: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.
        display_context->output_filename = (const char *)argv[next_arg];
data/freecell-solver-5.0.0/main_cl_callback_common.h:170:55:  [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).
        display_context->iters_display_step = (size_t)atol(argv[next_arg]);
data/freecell-solver-5.0.0/measure_depth_dep_tests_order_performance.c:115:44:  [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).
            iters_limit = (fcs_int_limit_t)atol(param);
data/freecell-solver-5.0.0/measure_depth_dep_tests_order_performance.c:120:38:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            max_var_depth_to_check = atoi(param);
data/freecell-solver-5.0.0/measure_depth_dep_tests_order_performance.c:149:29:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *const output_fh = fopen(output_filename, "wt");
data/freecell-solver-5.0.0/meta_alloc.c:26:42:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
#define OLD_LIST_DATA(ptr) ((char *)(&(((char **)(ptr))[1])))
data/freecell-solver-5.0.0/move.h:228:13:  [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(string, "%d%dv%x", 1 + fcs_move_get_src_stack(move),
data/freecell-solver-5.0.0/move.h:234:13:  [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(string, "%d%d", 1 + fcs_move_get_src_stack(move),
data/freecell-solver-5.0.0/move.h:239:13:  [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(string, "Move %d cards from stack %d to stack %d",
data/freecell-solver-5.0.0/move.h:248:13:  [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(string, "%c%i",
data/freecell-solver-5.0.0/move.h:254:13:  [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(string, "Move a card from freecell %i to stack %i",
data/freecell-solver-5.0.0/move.h:263:13:  [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(string, "%c%c",
data/freecell-solver-5.0.0/move.h:269:13:  [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(string, "Move a card from freecell %i to freecell %i",
data/freecell-solver-5.0.0/move.h:279:13:  [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(string, "%d%c", 1 + fcs_move_get_src_stack(move),
data/freecell-solver-5.0.0/move.h:284:13:  [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(string, "Move a card from stack %d to freecell %d",
data/freecell-solver-5.0.0/move.h:293:13:  [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(string, "%dh", 1 + fcs_move_get_src_stack(move));
data/freecell-solver-5.0.0/move.h:297:13:  [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(string, "Move a card from stack %d to the foundations",
data/freecell-solver-5.0.0/move.h:306:13:  [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(string, "%ch",
data/freecell-solver-5.0.0/move.h:311:13:  [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(string, "Move a card from freecell %i to the foundations",
data/freecell-solver-5.0.0/move.h:320:13:  [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(string, "%dh", fcs_move_get_src_stack(move));
data/freecell-solver-5.0.0/move.h:324:13:  [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(string,
data/freecell-solver-5.0.0/move.h:353: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 c[sizeof(void *) / sizeof(char)];
data/freecell-solver-5.0.0/move_stack_compact_alloc.h:32:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(new_moves_to_parent, old_move_stack_to_parent->moves,
data/freecell-solver-5.0.0/multi_cl_callback.h:16: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).
    FILE *const f = fopen(fn, "r");
data/freecell-solver-5.0.0/multi_cl_callback.h:35:27:  [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 (!(output_fh = fopen(display_context.output_filename, "wt")))
data/freecell-solver-5.0.0/multi_cl_callback.h:72:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char error_string[120];
data/freecell-solver-5.0.0/offloading_queue.h:174: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(out_item,
data/freecell-solver-5.0.0/offloading_queue.h:188: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(page->data + ((page->write_to_idx)++) * sizeof(*in_item), in_item,
data/freecell-solver-5.0.0/offloading_queue.h:216: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 page_filename[PATH_MAX + 1];
data/freecell-solver-5.0.0/offloading_queue.h:220:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    const int f = open(page_filename, O_RDONLY);
data/freecell-solver-5.0.0/offloading_queue.h:224: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).
    FILE *const f = fopen(page_filename, "rb");
data/freecell-solver-5.0.0/offloading_queue.h:241: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 page_filename[PATH_MAX + 1];
data/freecell-solver-5.0.0/offloading_queue.h:249: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).
    FILE *const f = fopen(page_filename, "wb");
data/freecell-solver-5.0.0/output_to_file.h:72: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 state_as_string[1000];
data/freecell-solver-5.0.0/patsolve/patsolve/pat.c:493: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((char *)list_iter->pile, w_col_data, w_col_len + 1);
data/freecell-solver-5.0.0/preset.c:45: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[32];
data/freecell-solver-5.0.0/preset.h:30: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 moves_order[FCS_MOVE_FUNCS_NUM * 3 + 1];
data/freecell-solver-5.0.0/pruner-main.c:29: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 state_string[1000];
data/freecell-solver-5.0.0/pseudo_dfs_atomic_moves_solver.c:260: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 state_as_string[2000];
data/freecell-solver-5.0.0/pseudo_dfs_atomic_moves_solver.c:268: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 state_as_string[2000];
data/freecell-solver-5.0.0/pseudo_dfs_atomic_moves_solver.c:301:22:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *const fh = fopen(filename, "r");
data/freecell-solver-5.0.0/pseudo_dfs_atomic_moves_solver.c:346:30:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE *const log_fh = fopen(LOG_FILENAME, "at");
data/freecell-solver-5.0.0/range_solvers_binary_output.h:77: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.
    unsigned char buffer[SIZE_INT];
data/freecell-solver-5.0.0/range_solvers_binary_output.h:107:26:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE *const in = fopen(bin->filename, "rb");
data/freecell-solver-5.0.0/range_solvers_binary_output.h:110:29:  [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 (!(bin->fh = fopen(bin->filename, "wb")))
data/freecell-solver-5.0.0/range_solvers_binary_output.h:144:29:  [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 (!(bin->fh = fopen(bin->filename, "ab")))
data/freecell-solver-5.0.0/range_solvers_gen_ms_boards.h:56:5:  [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(ret, "XX XX XX XX XX XX XX\n"
data/freecell-solver-5.0.0/range_solvers_gen_ms_boards.h:91:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef char fcs_state_string[52 * 3 + 8 + 1];
data/freecell-solver-5.0.0/rank2str.h:34:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 cards_char_map[15] = (CARD_ZERO() "A23456789TJQK");
data/freecell-solver-5.0.0/rank2str.h:38:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 card_map_3_10[14][4] = GEN_CARD_MAP("10");
data/freecell-solver-5.0.0/rank2str.h:39:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 card_map_3_T[14][4] = GEN_CARD_MAP("T");
data/freecell-solver-5.0.0/read_state.h: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 s[USER_STATE_SIZE];
data/freecell-solver-5.0.0/render_state.h:13:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef char fcs_render_state_str[2000];
data/freecell-solver-5.0.0/serial_range_solver.c:46:65:  [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).
            total_iterations_limit_per_board = (fcs_int_limit_t)atol(param);
data/freecell-solver-5.0.0/serial_range_solver.c:120:37:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            FILE *const output_fh = fopen(solution_fn, "wt");
data/freecell-solver-5.0.0/split_fcc_solver.c:527:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char fingerprint_base64[100];
data/freecell-solver-5.0.0/split_fcc_solver.c:528:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char state_base64[100];
data/freecell-solver-5.0.0/split_fcc_solver.c:675:28:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *fingerprint_fh = fopen(fingerprint_input_location_path, "rt");
data/freecell-solver-5.0.0/split_fcc_solver.c:704: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 state_base64[100];
data/freecell-solver-5.0.0/split_fcc_solver.c:771: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 fcc_exit_points_out_fn[PATH_MAX - 40],
data/freecell-solver-5.0.0/split_fcc_solver.c:777:39:  [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).
    instance.fcc_exit_points_out_fh = fopen(fcc_exit_points_out_fn_temp, "wt");
data/freecell-solver-5.0.0/state.c:25: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.
#define DECLARE_TEMP_STACK() char temp_stack[MAX_NUM_CARDS_IN_A_STACK + 1]
data/freecell-solver-5.0.0/state.c:28:27:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define COPY_STACK(d, s) (memcpy(d, s, (MAX_NUM_CARDS_IN_A_STACK + 1)))
data/freecell-solver-5.0.0/state.c:171: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.
    typedef char one_card_buffer[4];
data/freecell-solver-5.0.0/state.c:172: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 founds[MAX_NUM_DECKS * 4][10];
data/freecell-solver-5.0.0/state.c:227:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char dashes_s[128];
data/freecell-solver-5.0.0/state.c:228:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char freecells_s[128];
data/freecell-solver-5.0.0/state.c:239:17:  [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(dashes_ptr, "--- ");
data/freecell-solver-5.0.0/state.h:116:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&buffer[idx << 7], copy_stack_col,                          \
data/freecell-solver-5.0.0/state.h:271: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.
    unsigned char scan_visited[FCS_MAX_NUM_SCANS_BUCKETS];
data/freecell-solver-5.0.0/state.h:1042: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(&fcs_col_get_card(dest_col, fcs_col_len(dest_col)), src_cards_ptr,
data/freecell-solver-5.0.0/summarizing_solver.c:59:32:  [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).
            const long start = atol(argv[arg]);
data/freecell-solver-5.0.0/summarizing_solver.c:64:30:  [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).
            const long end = atol(argv[arg++]);
data/freecell-solver-5.0.0/summarizing_solver.c:76:29:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            FILE *const f = fopen(argv[arg++], "rt");
data/freecell-solver-5.0.0/summarizing_solver.c:93:20:  [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).
            append(atol(argv[arg++]));
data/freecell-solver-5.0.0/summarizing_solver.c: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 buffer[2000];
data/freecell-solver-5.0.0/summarizing_solver.c:133:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char command[1000];
data/freecell-solver-5.0.0/t/bit-reader-and-writer-test.c:21:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char buffer[10];
data/freecell-solver-5.0.0/threaded_range_solver.c:107:35:  [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).
            num_workers = (size_t)atol(param);
data/freecell-solver-5.0.0/trace_mem.h:27: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 stat_fn[1024], unused_str[1024];
data/freecell-solver-5.0.0/trace_mem.h:32: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).
    FILE *const stat = fopen(stat_fn, "r");
data/freecell-solver-5.0.0/xxHash-wrapper/xxHash-0.6.4/xxhash.c:112:76:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
static void* XXH_memcpy(void* dest, const void* src, size_t size) { return memcpy(dest,src,size); }
data/freecell-solver-5.0.0/xxHash-wrapper/xxHash-0.6.4/xxhash.c:370: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(dstState, srcState, sizeof(*dstState));
data/freecell-solver-5.0.0/xxHash-wrapper/xxHash-0.6.4/xxhash.c:382: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(statePtr, &state, sizeof(state) - sizeof(state.reserved));
data/freecell-solver-5.0.0/xxHash-wrapper/xxHash-0.6.4/xxhash.c:523: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(dst, &hash, sizeof(*dst));
data/freecell-solver-5.0.0/xxHash-wrapper/xxHash-0.6.4/xxhash.c:751: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(dstState, srcState, sizeof(*dstState));
data/freecell-solver-5.0.0/xxHash-wrapper/xxHash-0.6.4/xxhash.c:763: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(statePtr, &state, sizeof(state) - sizeof(state.reserved));
data/freecell-solver-5.0.0/xxHash-wrapper/xxHash-0.6.4/xxhash.c:904: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(dst, &hash, sizeof(*dst));
data/freecell-solver-5.0.0/xxHash-wrapper/xxHash-0.6.4/xxhash.h:204:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef struct { unsigned char digest[4]; } XXH32_canonical_t;
data/freecell-solver-5.0.0/xxHash-wrapper/xxHash-0.6.4/xxhash.h:239:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
typedef struct { unsigned char digest[8]; } XXH64_canonical_t;
data/freecell-solver-5.0.0/board_gen/find_deal.c:53: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(str) != WIDTH * NUM_CARDS)
data/freecell-solver-5.0.0/cmd_line.c:64:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        char *s = windows_exe_dir + strlen(windows_exe_dir) - 1;
data/freecell-solver-5.0.0/cmd_line.c:125:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(opened_files_dir, s, MAX_PATH_LEN);
data/freecell-solver-5.0.0/cmd_line.c:129:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(opened_files_dir, s, MAX_PATH_LEN);
data/freecell-solver-5.0.0/cmd_line.c:278:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            const_AUTO(word, in_word_set(p, strlen(p)));
data/freecell-solver-5.0.0/cmd_line.c:657:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                        complete_path[strlen(opened_files_dir) + strlen(s) + 1];
data/freecell-solver-5.0.0/cmd_line.c:657:66:  [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).
                        complete_path[strlen(opened_files_dir) + strlen(s) + 1];
data/freecell-solver-5.0.0/dbm_cache.h:142: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).
        const_AUTO(len, strlen((const char *)moves_to_parent));
data/freecell-solver-5.0.0/fc_pro_range_solver.c:47: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).
            if (strlen(variant = param) > 50)
data/freecell-solver-5.0.0/forking_range_solver.c:90:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(read_fd, &response, sizeof(response)) <
data/freecell-solver-5.0.0/forking_range_solver.c:159:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            while (read(w.parent_to_child_pipe[READ_FD], &req, sizeof(req)),
data/freecell-solver-5.0.0/lib.c:203:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(p_scan_copy, p_scan, COUNT(p_scan_copy));
data/freecell-solver-5.0.0/lib.c:2587:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(name, proto_name, MAX_FLARE_LEN_NAME - 1);
data/freecell-solver-5.0.0/lib.c:2779: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).
    const size_t len = strlen(orig_str);
data/freecell-solver-5.0.0/lib.c:4244:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(soft_thread->name, name, COUNT(soft_thread->name));
data/freecell-solver-5.0.0/lib.c:4256:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(flare->name, name, COUNT(flare->name));
data/freecell-solver-5.0.0/move_funcs_order.c:28: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).
    const_AUTO(len, strlen(string));
data/freecell-solver-5.0.0/offloading_queue.h:221:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read(f, page->data, sizeof(offloading_queue_item) * NUM_ITEMS_PER_PAGE);
data/freecell-solver-5.0.0/patsolve/patsolve/pat.h:371: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).
                strlen((const char *)l->pile) + 1);
data/freecell-solver-5.0.0/serial_range_solver.c:53:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                SREALLOC(solution_fn, strlen(solutions_directory) + 1024);
data/freecell-solver-5.0.0/split_cmd_line.c:55:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(new_arg, manager->last_arg, len);
data/freecell-solver-5.0.0/split_fcc_solver.c:492:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                const size_t string_len = strlen(moves_to_state_enc);
data/freecell-solver-5.0.0/split_fcc_solver.c:647: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).
            strlen(mod_base64_fcc_fingerprint),
data/freecell-solver-5.0.0/split_fcc_solver.c:706:9:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
        sscanf(
data/freecell-solver-5.0.0/split_fcc_solver.c:709:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        base64_decode(state_base64, strlen(state_base64),
data/freecell-solver-5.0.0/state.h:635:42:  [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 (!strncasecmp(str, (*prefix), strlen(*prefix)))
data/freecell-solver-5.0.0/state.h:637:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            return str + strlen(*prefix);
data/freecell-solver-5.0.0/str_utils.h:26: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).
        (check_len == strlen(prefix)) && (!strncmp(str, prefix, check_len)));
data/freecell-solver-5.0.0/str_utils.h:32: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).
    register const size_t len = strlen(prefix);
data/freecell-solver-5.0.0/summarizing_solver.c:107: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).
            if (strlen(variant = param) > 50)
data/freecell-solver-5.0.0/trace_mem.h:34:26:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
#define readstr(unused) (fscanf(stat, "%1000s ", unused_str))

ANALYSIS SUMMARY:

Hits = 239
Lines analyzed = 38098 in approximately 0.87 seconds (43566 lines/second)
Physical Source Lines of Code (SLOC) = 28982
Hits@level = [0] 117 [1]  31 [2] 164 [3]   6 [4]  38 [5]   0
Hits@level+ = [0+] 356 [1+] 239 [2+] 208 [3+]  44 [4+]  38 [5+]   0
Hits/KSLOC@level+ = [0+] 12.2835 [1+] 8.2465 [2+] 7.17687 [3+] 1.51818 [4+] 1.31116 [5+]   0
Dot directories skipped = 2 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.