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/sphinxtrain-1.0.8+5prealpha+1/include/sys_compat/misc.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/sys_compat/file.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/sys_compat/time.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/mk_trans_seq.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/itree.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/s3mixw_io.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/model_inventory.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/acmod_set.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/s3.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/s3cb2mllr_io.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/model_def_io.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/best_q.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/ts2cb.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/model_def.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/s3gau_io.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/s3acc_io.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/s3tmat_io.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/kdtree.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/segdmp.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/pset_io.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/state_seq.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/common.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/mk_ts2ci.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/mllr_io.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/mllr.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/vector.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/kmeans.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/s3lamb_io.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/dtree.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/swap.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/s3phseg_io.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/s3map_io.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/ck_seg.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/mk_phone_seq.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/metric.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/gauden.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/lexicon.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/s3io.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/remap.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/div.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/mllr_class_io.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/state.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/was_added.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/s3ts2cb_io.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/topo_read.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/mk_phone_list.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/corpus.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/quest.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/heap.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/cvt2triphone.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/include/s3/mk_sseq.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mllr_solve/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mllr_solve/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mllr_solve/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mllr_solve/cmd_ln_defn.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bldtree/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bldtree/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bldtree/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/mk_s2sendump.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/senone.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/senone.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/make_quests/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/make_quests/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/make_quests/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/make_quests/new_quest.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/make_quests/make_tree.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/param_cnt/ts_cnt.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/param_cnt/param_cnt.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/param_cnt/cb_cnt.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/param_cnt/cb_cnt.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/param_cnt/enum_corpus.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/param_cnt/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/param_cnt/cnt_fn.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/param_cnt/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/param_cnt/phone_cnt.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/param_cnt/phone_cnt.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/param_cnt/ts_cnt.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/param_cnt/param_cnt.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/param_cnt/enum_corpus.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/param_cnt/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_ts2cb/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_ts2cb/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_ts2cb/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mllr_class/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mllr_class/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mllr_class/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/inc_comp/inc_densities.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/inc_comp/accum_wt_param.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/inc_comp/accum_wt_param.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/inc_comp/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/inc_comp/inc_densities.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/inc_comp/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/inc_comp/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/header.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/cepdist.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/norm_utt.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/rsfft.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/resfft.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/max_q.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/readdistribution.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/initialize.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/mmse_x.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/correction.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/two_D_ize.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mllr_transform/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mllr_transform/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mllr_transform/cmd_ln_defn.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mllr_transform/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/kdtree/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/kdtree/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/kdtree/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/delint/interp_fn.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/delint/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/delint/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/delint/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/delint/interp_fn.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/norm/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/norm/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/norm/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_train/header.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_train/gauss.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_train/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_train/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_train/vq.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_train/store_distribution.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_train/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_train/read_backup_distributions.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_train/em_full_vars.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/agg_seg/cnt_phn_seg.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/agg_seg/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/agg_seg/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/agg_seg/agg_st_seg.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/agg_seg/mk_seg.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/agg_seg/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/agg_seg/add_seg.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/agg_seg/agg_all_seg.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/agg_seg/agg_phn_seg.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/agg_seg/agg_st_seg.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/agg_seg/cnt_st_seg.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/agg_seg/mk_seg.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/agg_seg/agg_all_seg.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/agg_seg/cnt_phn_seg.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/agg_seg/agg_phn_seg.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/agg_seg/cnt_st_seg.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/init_gau/accum.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/init_gau/init_gau.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/init_gau/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/init_gau/init_gau.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/init_gau/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/init_gau/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/init_gau/accum.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/prunetree/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/prunetree/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/prunetree/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/kmeans_init/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/kmeans_init/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/kmeans_init/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/baum_welch.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/forward.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/forward.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/backward.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/backward.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/next_utt_states.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/next_utt_states.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/baum_welch.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/train_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/train_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/viterbi.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/viterbi.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_eval/Phonetisaurus.hpp
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_eval/utf8/unchecked.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_eval/utf8/core.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_eval/utf8/checked.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_eval/util.hpp
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_eval/phonetisaurus-g2p.cpp
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_eval/Phonetisaurus.cpp
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_eval/main.cpp
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_eval/utf8.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_eval/phonetisaurus-g2p.hpp
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_flat/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_flat/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_flat/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_train/M2MFstAligner.cpp
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_train/FstPathFinder.cpp
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_train/main.cpp
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_train/FstPathFinder.hpp
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_train/M2MFstAligner.hpp
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_train/g2p_train.hpp
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_train/g2p_train.cpp
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/hash.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/heap.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_untied.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/hash.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/heap.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/tiestate/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/tiestate/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/tiestate/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/map_adapt/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/map_adapt/cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/map_adapt/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/map_adapt/cmd_ln_defn.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/init_mixw/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/init_mixw/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/init_mixw/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mixw_interp/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mixw_interp/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mixw_interp/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mixw_interp/cmd_ln_defn.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cp_parm/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cp_parm/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cp_parm/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cp_parm/cmd_ln_defn.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/printp/main.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/printp/parse_cmd_ln.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/programs/printp/parse_cmd_ln.h
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/mk_ts2ci.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/cvt2triphone.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/mk_phone_seq.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/mk_phone_list.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/vector.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/dtree.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/heap.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/lexicon.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/remap.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/itree.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/best_q.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/ck_seg.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/ts2cb.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/was_added.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/mk_sseq.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/quest.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/mk_trans_seq.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/state_seq.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libclust/kmeans.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libclust/kdtree.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libclust/metric.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libclust/div.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libmodinv/mod_inv.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libmodinv/gauden.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3map_io.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3lamb_io.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/pset_io.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/swap.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3gau_io.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/topo_read.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3gau_full_io.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3tmat_io.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3phseg_io.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3mixw_io.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3cb2mllr_io.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3acc_io.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3ts2cb_io.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/segdmp.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/model_def_io.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libmllr/mllr.c
Examining data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libmllr/mllr_io.c

FINAL RESULTS:

data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:438: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(tmp_store, name);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:442:16:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    n_assign = sscanf(tmp, "%s%n", base, &n_scan);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:450:16:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    n_assign = sscanf(tmp, "%s%n", left, &n_scan);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:462:13:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	n_assign = sscanf(tmp, "%s%n", right, &n_scan);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:471:13:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	n_assign = sscanf(tmp, "%s%n", posn, &n_scan);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:544:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(str, "%s(%s,%s)%c",
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:599:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(str, "%s %s %s %c",
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:649:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(str, "%s - - -", acmod_set->ci[id].name);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:657:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(str, "%s %s %s %c",
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/dtree.c:278:5:  [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(s, "%s%n", str, &n_scan);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/dtree.c:300:2:  [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(s, "%s%n", str, &n_scan);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/dtree.c:308:2:  [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(s, "%s%n", str, &n_scan);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/mk_phone_list.c:105:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(fmt, "%%%ds%%s", mpl);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/mk_phone_list.c:112:6:  [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(fmt, "", (btw[j] ? "+" : " "));
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/mk_phone_list.c:117:6:  [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(fmt, acmod_set_id2name(acmod_set, p[j]), " ");
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/quest.c:364: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(t_str, q_str);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/state_seq.c:134:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(oprob_format, "%%%uu:%%%uu(%%3s:%%1u) %%%uu:%%%uu ",
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/state_seq.c:157:6:  [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(oprob_format,
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/state_seq.c:164:6:  [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(non_e_format, "<ne>");
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:232: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(sv_line, line);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1206:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(fn, "%s/%s.%s",
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1217:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(fn, "%s/%s.%s",  r, tt, e);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1222:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(fn, "%s/%s",
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1233:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(fn, "%s/%s",  r, tt);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1237:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s.%s",
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1241: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(fn, rel_path);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1445: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(utt_id, s+1);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1514:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(mllrfn, "%s/%s", data_dir[DATA_TYPE_MLLR], mllr_line);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1516: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(mllrfn, mllr_line);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1544:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(fn, "%s/%s.%s",  lat_dir, rel_path, lat_ext);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/model_def_io.c:460:2:  [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(li->buf, "%u %s", &n, tag);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3acc_io.c:77:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(fn, "%s/tmat_counts", dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3acc_io.c:130:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(fn, "%s/mixw_counts", dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3acc_io.c:201:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(fn, "%s/gauden_counts", dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3acc_io.c:325:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(fn, "%s/gauden_counts", dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3acc_io.c:450:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(fn, "%s/%s_gauden_counts", dir, lat_name);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:139:5:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    fscanf(fp, "%s", attr);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:552: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(p_file, file);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3phseg_io.c:241:5:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    fscanf(fp, "%s", out_lattice->arc[i].word);/* word */
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3phseg_io.c:249:5:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    fscanf(fp, "%s", temp);/* move over '<' */
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3phseg_io.c:259:5:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    fscanf(fp, "%s", temp);/* move over '<' */
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/segdmp.c:397:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s/%s", dirs[i], ifn);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/segdmp.c:405:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s/%s", dirs[i], dfn);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/segdmp.c:572:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(dmp_fn, "%s/%s", dirs[i], dfn);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/segdmp.c:588:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(idx_fn, "%s/%s", dirs[i], ifn);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libmodinv/mod_inv.c:450:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s/mixw_counts", accumdir);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libmodinv/mod_inv.c:480:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s/tmat_counts", accumdir);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libmodinv/mod_inv.c:500:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s/gauden_counts", accumdir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:677:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s/mixw_counts", out_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:678:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn_bkp, "%s/mixw_counts.bkp", out_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:690:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s/tmat_counts", out_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:691:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn_bkp, "%s/tmat_counts.bkp", out_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:703:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s/gauden_counts", out_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:704:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn_bkp, "%s/gauden_counts.bkp", out_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:729:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s/mixw_counts", out_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:730:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn_bkp, "%s/mixw_counts.bkp", out_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:739:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s/tmat_counts", out_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:740:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn_bkp, "%s/tmat_counts.bkp", out_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:748:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s/gauden_counts", out_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:749:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn_bkp, "%s/gauden_counts.bkp", out_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:774:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn_bkp, "%s/mixw_counts.bkp", out_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:779:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn_bkp, "%s/tmat_counts.bkp", out_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:784:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn_bkp, "%s/gauden_counts.bkp", out_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:790:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(fn, "%s/ckpt", out_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:875:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s/mixw_counts", out_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:900:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s/tmat_counts", out_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:925:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s/gauden_counts", out_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:1077:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(fn, "%s/%s_gauden_counts", out_dir, lat_ext);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/baum_welch.c:213:6:  [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(segfn, phsegdir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/baum_welch.c:215:6:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	    strcat(segfn, uttid);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:107: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(out, base);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:109:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(out, c);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:505:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s/ckpt", cmd_ln_str("-accumdir"));
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:806: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(pdumpfn, pdumpdir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:808:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(pdumpfn, uttid);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:922:7:  [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(time_str, (const char *)ctime((const time_t *)&t));
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:973:6:  [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(time_str, (const char *)ctime((const time_t *)&t));
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1173:7:  [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(cword, lat->arc[n].word);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1177: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(pword, lat->arc[rand_prev_id-1].word);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1182: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(nword, lat->arc[rand_next_id-1].word);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1231:7:  [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(cword, lat->arc[n].word);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1235: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(pword, lat->arc[rand_prev_id-1].word);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1240: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(nword, lat->arc[rand_next_id-1].word);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1305: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(cword, lat->arc[n].word);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1318: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(pword, lat->arc[prev_id-1].word);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1337:6:  [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(nword, lat->arc[next_id-1].word);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1404:7:  [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(cword, lat->arc[n].word);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1408: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(pword, lat->arc[prev_id-1].word);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1413: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(nword, lat->arc[next_id-1].word);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1806:7:  [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(time_str, (const char *)ctime((const time_t *)&t));
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/viterbi.c:349:6:  [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(segfn, phsegdir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/viterbi.c:351:6:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	    strcat(segfn, uttid);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c:54:20:  [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  QUIT(x)  {printf x; fflush (stdout); exit(-1);}
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c:92:3:  [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(DESCRIPTION);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c:104: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(ctl_file, argv[++i]);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c:110: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(infileext, argv[++i]);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c:116: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(outfileext, argv[++i]);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c:122: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(inpath, argv[++i]);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c:128: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(outpath, argv[++i]);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c:134: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(code_file, argv[++i]);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c:147: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(outpath, inpath);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c:166:20:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	for (num_utt = 0; fscanf(fp, "%s\n", buff) != EOF; num_utt++) {
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c:167:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(in_cepfile, "%s/%s.%s", inpath, buff, infileext);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c:181:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(out_cepfile, "%s/%s.%s", outpath, buff,
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/readdistribution.c:49:18:  [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 QUIT(x) {printf x; fflush (stdout); exit(-1);}
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_train/em_full_vars.c:81:20:  [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  QUIT(x)  {printf x; fflush (stdout); exit(-1);}
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_train/vq.c:65:20:  [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  QUIT(x)  {printf x; fflush (stdout); exit(-1);}
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/delint/main.c:472:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(fn, "%s/mixw_counts", accum_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/inc_comp/accum_wt_param.c:88:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s/gauden_counts", accum_dir[i]);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/inc_comp/accum_wt_param.c:90:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(fn, F_OK) == 0) {
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/init_gau/init_gau.c:297:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(fn, "%s/gauden_counts", cmd_ln_str("-accumdir"));
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/make_quests/main.c:800: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(phone[id],acmod_set_id2name(mdef->acmod_set,id));
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/make_quests/main.c:948:17:  [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(phone[j],phone[i]);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/make_quests/main.c:967:17:  [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(phone[j],phone[i]);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/make_quests/make_tree.c:88:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(phoneid[i],"%s",phones[i]); //Phone ids
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/make_quests/make_tree.c:107:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(newphoneid[set],"%s",phoneid[i]); //Phone ids
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/make_quests/make_tree.c:117:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(newphoneid[set],"%s_%s",phoneid[a],phoneid[b]);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:91: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(cilist[id],acmod_set_id2name(mdef->acmod_set,id));
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:128:16:  [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.
        nwds = sscanf(line->buf,"%s %s %s %s",bphn,lctx,rctx,wdpos);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:184: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(cilist[i],addciphone->basephone);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:228: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(cilist[id],acmod_set_id2name(mdef->acmod_set,id));
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:234:2:  [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(acmod_set_id2name(mdef->acmod_set, id),"%s %s %s %s",
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:315:10:  [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(sptr->phones[nphns],phone);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/norm/main.c:265:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(file_name, "%s/mixw_counts", oaccum_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/norm/main.c:326:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(file_name, "%s/gauden_counts", oaccum_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/norm/main.c:369:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(file_name, "%s/tmat_counts", oaccum_dir);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/printp/main.c:188:7:  [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(e_fmt, mean[i][j][k][l]);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/printp/main.c:228:4:  [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(e_fmt, var[i][j][k][l][m]);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/printp/main.c:328:3:  [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(e_fmt, dnom[i][j][k]);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/printp/main.c:330:7:  [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(mv_fmt,
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/printp/main.c:396:7:  [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(e_fmt_ld_sp, tmat[i][j][k]/sum);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/printp/main.c:479:3:  [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(e_fmt, mixw[i][j][k]/sum);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/prunetree/main.c:162:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s/%s-%u.dtree",
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/prunetree/main.c:388:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(fn, "%s/%s-%u.dtree", otreedir, pname, s);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/tiestate/main.c:126:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(fn, "%s/%s-%u.dtree",
data/sphinxtrain-1.0.8+5prealpha+1/include/sys_compat/misc.h:60:9:  [3] (random) drand48:
  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.
#define drand48() ((double)rand()/RAND_MAX)
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1149:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand( (unsigned)time( NULL ) );
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/kmeans_init/main.c:586:8:  [3] (random) drand48:
  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.
		rr = drand48();	/* random numbers in the interval [0, 1) */
data/sphinxtrain-1.0.8+5prealpha+1/include/s3/s3phseg_io.h:76: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 word[128];                   /* current word */
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libclust/kdtree.c:240: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(node->left, node, sizeof(*node->left));
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libclust/kdtree.c:245: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(node->left->lower, node->lower, sizeof(*node->left->lower) * node->n_comp);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libclust/kdtree.c:246: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(node->left->upper, node->upper, sizeof(*node->left->upper) * node->n_comp);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libclust/kdtree.c:250: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(node->right, node, sizeof(*node->right));
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libclust/kdtree.c:255: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(node->right->lower, node->lower, sizeof(*node->right->lower) * node->n_comp);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libclust/kdtree.c:256: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(node->right->upper, node->upper, sizeof(*node->right->upper) * node->n_comp);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libclust/kdtree.c:362:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fp = fopen(outfile, "w"))  == NULL) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libclust/kdtree.c:386:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char line[256];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libclust/kdtree.c:400:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char line[256];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libclust/kdtree.c:467:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char line[256];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libclust/kdtree.c:471:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fp = fopen(infile, "r"))  == NULL) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:421:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tmp_store[1024];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:425: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 base[1024];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:428: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 left[1024];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:431: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 right[1024];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:435: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 posn[12];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:530:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char str[1024];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:585:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char str[1024];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:641:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char str[1024];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/dtree.c:264: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, str[128];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/dtree.c:306:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    node_id_y = atoi(str);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/dtree.c:314:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    node_id_n = atoi(str);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/dtree.c:408:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&q->conj_q[d][i], &conj[i], sizeof(quest_t));
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/lexicon.c:158:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    lex_fp = fopen(filename, "r");
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/mk_phone_list.c:97: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 fmt[16];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/quest.c:327:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    pset = atoi(&q_str[i]);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/quest.c:351: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 t_str[64];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/remap.c:159: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(inv, m->inv, sizeof(uint32) * m->next_rng); 
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/state_seq.c:103:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char big_str[1024];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/state_seq.c:104: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 oprob_format[32];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/state_seq.c:105: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 non_e_format[32];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/state_seq.c:120:6:  [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(big_str, "%u", state[i].mixw);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/state_seq.c:125:6:  [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(big_str, "%u", state[i].cb);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/state_seq.c:138: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(non_e_format, "%%%us", m_mixw+m_cb+10);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:116: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_dir[N_DATA_TYPE];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:119: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 *extension[N_DATA_TYPE];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:230: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 sv_line[4192];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:253:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    *sf = atoi(sp+1);	/* set the start frame */
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:262:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    *ef = atoi(sp+1);	/* set the end frame */
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:312:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    ctl_fp = fopen(ctl_filename, "rb");
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:457:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tmp[256];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:459:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(fn, "w");
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:465: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(tmp,"%u %u\n", begin + n_proc, n_run); 
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:484:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(fn, "r");
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:943: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).
    transcription_fp = fopen(transcription_filename, "r");
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:987:15:  [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).
    mllr_fp = fopen(mllr_filename, "r");
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1196:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char fn[MAXPATHLEN];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1255: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).
    out = fopen(fn, "r");
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1422: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 utt_id[512];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1511: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 mllrfn[MAXPATHLEN];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1535: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 fn[1024];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/model_def_io.c:90:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char *attrib_list[MAX_N_ATTRIB+1];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/model_def_io.c:91:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char buf[1024];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/model_def_io.c:125:13:  [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).
    *tmat = atoi(strtok(NULL, " \t"));
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/model_def_io.c:131:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    state[i] = atoi(tok);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/model_def_io.c:290:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(fn, "w");
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/model_def_io.c:387: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 tag[32];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/model_def_io.c:410:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(file_name, "r");
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/model_def_io.c:534: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((char *)mdef[i].state, (const char *)state,
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/model_def_io.c:534:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	memcpy((char *)mdef[i].state, (const char *)state,
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/model_def_io.c:561: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((char *)mdef[i].state,
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/model_def_io.c:561:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	memcpy((char *)mdef[i].state,
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/pset_io.c:71:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(file_name, "r");
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3acc_io.c:71: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 fn[MAXPATHLEN + 1];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3acc_io.c:123: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 fn[MAXPATHLEN + 1];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3acc_io.c:186: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 fn[MAXPATHLEN + 1];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3acc_io.c:311: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 fn[MAXPATHLEN + 1];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3acc_io.c:436: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 fn[MAXPATHLEN + 1];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:62: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 *attrib[MAX_ATTRIB + 1] = { NULL };
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:63: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 *value[MAX_ATTRIB + 1] = { NULL };
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:153: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 id[32];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:154: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 attrib[256];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:155: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 value[8192];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:257:7:  [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).
	fp = fopen(file_name, mode);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:275:7:  [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).
	fp = fopen(file_name, mode);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:291:7:  [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).
	fp = fopen(file_name, mode);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:423:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((fp = fopen(file, "rb")) == NULL) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:475:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((fp = fopen(file, "rb")) == NULL) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:524:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char p_file[MAXPATHLEN] = "";
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:543:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fp = fopen(file, "rb");
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:635:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((fd = open (file, O_RDONLY | O_BINARY, 0644)) < 0)
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:687:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((fd = open (file, O_RDONLY | O_BINARY, 0644)) < 0)
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:742:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((fd = open (file, O_CREAT | O_WRONLY | O_TRUNC | O_BINARY, 0644)) < 0)
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3phseg_io.c:59: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 txt[512];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3phseg_io.c:63:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fp = fopen(fn, "r")) == NULL) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3phseg_io.c:145:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fp = fopen(fn, "w")) == NULL)
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3phseg_io.c:178: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 line[1024], temp[16];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3phseg_io.c:182:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((fp = fopen(fn, "r")) == NULL) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/segdmp.c:82: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 dmp_fn[MAXPATHLEN+1];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/segdmp.c:83: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 idx_fn[MAXPATHLEN+1];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/segdmp.c:377: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 fn[MAXPATHLEN+1];
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/segdmp.c:687: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(&frm_buf[nxt_frm_buf],
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/topo_read.c:116:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(topo_file_name, "r");
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libmllr/mllr_io.c:54:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(regmatfn,"w")) == NULL) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libmllr/mllr_io.c:101:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(regmatfn,"r")) == NULL) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libmodinv/gauden.c:148: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(g->veclen, veclen, n_feat * sizeof(uint32));
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libmodinv/mod_inv.c:430: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 fn[MAXPATHLEN+1];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/agg_seg/main.c:300:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    cnt_fp = fopen(cmd_ln_str("-cntfn"), "r");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/agg_seg/main.c:308: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).
	cnt_fp = fopen(cmd_ln_str("-cntfn"), "w");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/agg_seg/main.c:346:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    cnt_fp = fopen(cmd_ln_str("-cntfn"), "r");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/agg_seg/main.c:354: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).
	cnt_fp = fopen(cmd_ln_str("-cntfn"), "w");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bldtree/main.c:758:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(cmd_ln_str("-treefn"), "w");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:672: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 fn[MAXPATHLEN+1];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:673: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 fn_bkp[MAXPATHLEN+1];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:680:7:  [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).
	fp = fopen(fn, "rb");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:693:7:  [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).
	fp = fopen(fn, "rb");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:706:7:  [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).
	fp = fopen(fn, "rb");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:725: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 fn[MAXPATHLEN+1];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:726: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 fn_bkp[MAXPATHLEN+1];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:768: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 fn[MAXPATHLEN+1];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.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 fn_bkp[MAXPATHLEN+1];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:803:7:  [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).
	fp = fopen(fn, "r");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:863: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 fn[MAXPATHLEN+1];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/accum.c:1064:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fn[MAXPATHLEN+1];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/baum_welch.c:216:6:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	    strcat(segfn, ".phseg");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:502: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 fn[MAXPATHLEN+1];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:507:7:  [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).
	fp = fopen(fn, "r");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:809:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
		strcat(pdumpfn, ".pdump");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:810:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((pdumpfh = fopen(pdumpfn, "w")) == NULL)
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:914: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 time_str[64];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:965: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 time_str[64];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1121: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 pword[128], cword[128], nword[128];      /* previous, current, next word */
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1175: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(pword, "<s>");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1180: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(nword, "</s>");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1233: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(pword, "<s>");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1238: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(nword, "</s>");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1279: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 pword[128], cword[128], nword[128];      /* previous, current and next word hypothesis */
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1315: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(pword, "<s>");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1335:6:  [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(nword, "</s>");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1406: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(pword, "<s>");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1411: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(nword, "</s>");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1798: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 time_str[64];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/viterbi.c:102:15:  [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 ((fh = fopen(filename, "w")) == NULL) {
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/viterbi.c:207:15:  [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 ((fh = fopen(filename, "wb")) == NULL) {
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/viterbi.c:352:6:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	    strcat(segfn, ".phseg");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c:72: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 ctl_file[1024],
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c:84: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(infileext, "mfc");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c:85: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(outfileext, "cdcn.mfc");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c:163:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fp = fopen(ctl_file, "r")) == NULL)
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/readdistribution.c:64:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((codefile = fopen(filename, "r")) == NULL)
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_train/em_full_vars.c:266:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		temp = fopen(tempfile, "w");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_train/main.c:108: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(vector[numvecs], buff[x], Ndim*sizeof(float));
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_train/read_backup_distributions.c:50:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((dist = fopen(filen, "r")) == NULL) {
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_train/store_distribution.c:58:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((outputfile = fopen(file, "w")) == NULL)
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cp_parm/main.c:357:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(cmd_ln_str("-cpopsfn"), "r");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cp_parm/main.c:399:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(cmd_ln_str("-cpopsfn"), "r");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/delint/main.c:464: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 fn[MAXPATHLEN+1];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_eval/phonetisaurus-g2p.cpp:51:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    hypfile.open(output);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_eval/phonetisaurus-g2p.cpp:83:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    test_fp.open(testset_file.c_str());
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_eval/phonetisaurus-g2p.cpp:88:17:  [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).
        hypfile.open(output);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_train/M2MFstAligner.cpp:169:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    seq1_max = atoi(params[2].c_str());
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_train/M2MFstAligner.cpp:170:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    seq2_max = atoi(params[3].c_str());
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/inc_comp/accum_wt_param.c:67: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 fn[MAXPATHLEN];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/inc_comp/inc_densities.c:106: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_mean[i][j][k], mean[i][j][k], veclen[j]*sizeof(float32));
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/inc_comp/inc_densities.c:108:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		    memcpy(new_fullvar[i][j][k][0], fullvar[i][j][k][0],
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/inc_comp/inc_densities.c:111:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		    memcpy(new_var[i][j][k], var[i][j][k], veclen[j]*sizeof(float32));
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/inc_comp/inc_densities.c:153: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(new_fullvar[i][j][n_density+r][0], fullvar[i][j][0][0],
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/inc_comp/inc_densities.c:156: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(new_var[i][j][n_density+r], var[i][j][0],
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/inc_comp/inc_densities.c:159:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		    memcpy(new_mean[i][j][n_density+r], mean[i][j][0],
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/inc_comp/inc_densities.c:171:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		    memcpy(new_fullvar[i][j][n_density+r][0], fullvar[i][j][max_wt_idx][0],
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/inc_comp/inc_densities.c:174:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		    memcpy(new_var[i][j][n_density+r], var[i][j][max_wt_idx],
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/kmeans_init/main.c:269:6:  [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(&obuf[o],
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/kmeans_init/main.c:333:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		    memcpy(&obuf[o],
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/kmeans_init/main.c:349: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(&obuf[o],
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/kmeans_init/main.c:1586: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).
	    fp = fopen(cmd_ln_str("-tsrngfn"),
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/make_quests/main.c:366: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(root->phoneids,nodephoneids,nphones*sizeof(int32));
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/make_quests/main.c:572: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(lists[i],idlist[leaflist[i]]->phoneids,sizeof(int32)*llist[i]);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/make_quests/main.c:1042:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(outfile,"w")) == NULL)
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/make_quests/main.c:1099:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fp = fopen(outfile,"a");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/make_quests/new_quest.c:334:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(outfile,"a");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:104: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  bphn[1024],lctx[1024], rctx[1024], wdpos[1024]; 
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:115:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(phnlist,"r");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:207: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  bphn[1024],lctx[1024], rctx[1024], wdpos[1024]; 
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:262: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 *dictfn[2];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:281: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 ((dict = fopen(dictfn[idict],"r")) == NULL)
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:467: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   silencephn[4];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:475: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(silencephn,"SIL");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:476:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(transfile,"r")) == NULL)
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:695:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((ofp = fopen(countfn,"w")) == NULL){
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:961:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(mdeffile, "w")) == NULL)
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mllr_class/main.c:63: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[128];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mllr_class/main.c:90:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	mllr_map[i] = atoi(line);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/mk_s2sendump.c:100:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fpout = fopen(file, "wb")) == NULL)
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/mk_s2sendump.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 pshdr[256];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/mk_s2sendump.c:208:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fpout = fopen(file, "wb")) == NULL)
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/mk_s2sendump.c:218: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(pshdr, "cluster_count %d", 0);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/mk_s2sendump.c:221: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(pshdr, "codebook_count %d", s->n_mgau);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/mk_s2sendump.c:224: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(pshdr, "feature_count %d", s->n_feat);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/senone.c:76:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(file_name, "rb")) == NULL)
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/senone.c:212:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(file_name, "rb")) == NULL)
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/norm/main.c:90: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[MAXPATHLEN+1];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/param_cnt/main.c:195: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).
	out_fp = fopen(outfn, "w");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/printp/main.c:72: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 e_fmt[20];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/printp/main.c:73: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 e_fmt_ld_sp[20];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/printp/main.c:83: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(e_fmt, "%%.%de ", cmd_ln_int32("-sigfig") - 1);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/printp/main.c:84: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(e_fmt_ld_sp, " %%.%de", cmd_ln_int32("-sigfig") - 1);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/printp/main.c:292: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 mv_fmt[64];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/printp/main.c:319: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(mv_fmt, "%%.%de,%%.%de ", sf-1, sf-1);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/prunetree/main.c:158: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 fn[MAXPATHLEN+1];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/prunetree/main.c:165:7:  [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).
	fp = fopen(fn, "r");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/prunetree/main.c:202: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 fn[MAXPATHLEN+1];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/prunetree/main.c:390:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(fn, "w");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/tiestate/main.c:73: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 fn[MAXPATHLEN+1];
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/tiestate/main.c:128:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(fn, "r");
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libclust/kdtree.c:389:6:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	n = fscanf(fp, "%255s %u", line, out);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libclust/kdtree.c:403:6:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	n = fscanf(fp, "%255s %f", line, out);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libclust/kdtree.c:475:6:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	n = fscanf(fp, "%255s", line);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libclust/kdtree.c:480:6:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	n = fscanf(fp, "%255s %d", line, &version);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:484:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	for (posn_id = 0; posn_id < strlen(word_posn_map); posn_id++) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:489: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 (posn_id == strlen(word_posn_map)) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:903: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).
	for (i = 0; i < strlen(pmap); i++) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/acmod_set.c:908:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (i < strlen(pmap))
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/mk_phone_list.c:101: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).
	l = strlen(acmod_set_id2name(acmod_set, p[i]));
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/quest.c:311:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(q_str);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/quest.c:360:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(t_str, q_str, (eot - q_str));
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/state_seq.c:121:10:  [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).
	    l = strlen(big_str);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libcommon/state_seq.c:126:10:  [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).
	    l = strlen(big_str);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:469:58:  [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 (fprintf(fp, "%u %u\n", begin + n_proc, n_run) != strlen(tmp)) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1098:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (cur_ctl_path == NULL || strlen(cur_ctl_path) == 0)
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1144: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).
	if (cur_ctl_path && strlen(cur_ctl_path) > 0) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1145:10:  [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).
	    i = strlen(cur_ctl_path);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1167: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).
    if (cur_ctl_path && strlen(cur_ctl_path) > 0) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1168: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).
	i = strlen(cur_ctl_path);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1185: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).
    if (cur_ctl_path && strlen(cur_ctl_path) > 0) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1443:10:  [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(strlen(s+1) < 512);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1449: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).
		    int suffpos = strlen(uttfullname) - strlen(utt_id);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1449: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).
		    int suffpos = strlen(uttfullname) - strlen(utt_id);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/corpus.c:1451:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    if (suffpos >= 0 && strlen(utt_id) > 0 && strcmp_nocase(&uttfullname[suffpos], utt_id) != 0) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/model_def_io.c:95:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy (buf, comma_sep_attrib, 1024);
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/model_def_io.c:236: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).
    for (i = 0; i < strlen(posn_map); i++)
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/model_def_io.c:240: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).
    if (i < strlen(posn_map)) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:141:2:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	fgetc(fp);	/* throw away newline */
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:157:9:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
    if (fscanf(fp, "%31s", id) != 1) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:208:14:  [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 (ret != (strlen(attrib[i]) + 
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:209:7:  [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(value[i]) + 2)) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:217:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    padding = ftell(fp) + strlen("endhdr\n");
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:224:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (ret != strlen("endhdr\n")) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:640:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (read (fd, (char *) &length, 4) != 4)
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:661:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (read (fd, data, size) != size)
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:693:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (read (fd, (char *) &length, 4) != 4)
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3io.c:717:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (read (fd, data, size) != size)
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3phseg_io.c:68:14:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	while ((n = fscanf(fp, "%511s", txt))) {
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3phseg_io.c:89:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (txt[strlen(txt)-1] == '\n')
data/sphinxtrain-1.0.8+5prealpha+1/src/libs/libio/s3phseg_io.c:90:8:  [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).
			txt[strlen(txt)-1] = '\0';
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/baum_welch.c:210: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).
	    segfn = ckd_calloc(strlen(phsegdir) + 1
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/baum_welch.c:211: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(uttid)
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/baum_welch.c:212: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(".phseg") + 1, 1);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/baum_welch.c:214:6:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
	    strcat(segfn, "/");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:98:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(base);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:100:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len += strlen(c);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:803: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).
		pdumpfn = ckd_calloc(strlen(pdumpdir) + 1
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:804: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).
				     + strlen(uttid)
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:805: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).
				     + strlen(".pdump") + 1, 1);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:807:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(pdumpfn, "/");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:924:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    time_str[strlen(time_str)-1] = '\0';
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:975: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).
	    time_str[strlen(time_str)-1] = '\0';
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/main.c:1808:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      time_str[strlen(time_str)-1] = '\0';
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/viterbi.c:346: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).
	    segfn = ckd_calloc(strlen(phsegdir) + 1
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/viterbi.c:347: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(uttid)
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/viterbi.c:348: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(".phseg") + 1, 1);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/bw/viterbi.c:350:6:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
	    strcat(segfn, "/");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c:82:2:  [1] (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 character.
	strcpy(ctl_file, "");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c:83:2:  [1] (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 character.
	strcpy(code_file, "");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c:86:2:  [1] (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 character.
	strcpy(inpath, "");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/cdcn_norm/main.c:87:2:  [1] (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 character.
	strcpy(outpath, "");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_eval/util.hpp:58: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).
    char *end = str + strlen(str) + 1;  // end iterator
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_eval/util.hpp:68: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).
        int start = strlen(str) - strlen(str_j);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_eval/util.hpp:68:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        int start = strlen(str) - strlen(str_j);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_eval/util.hpp:69: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 end = strlen(str) - strlen(str_i);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/g2p_eval/util.hpp:69: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).
        int end = strlen(str) - strlen(str_i);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/init_gau/init_gau.c:296: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).
    fn = ckd_calloc(strlen(cmd_ln_str("-accumdir")) + strlen("/gauden_counts") + 1, 1);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/init_gau/init_gau.c:296:55:  [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).
    fn = ckd_calloc(strlen(cmd_ln_str("-accumdir")) + strlen("/gauden_counts") + 1, 1);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:86: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).
	phnsize = strlen(acmod_set_id2name(mdef->acmod_set,id));
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:136:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    phnsize = strlen(bphn);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:141:28:  [1] (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 character.
            if (nwds == 3) strcpy(wdpos,"i"); /* default */
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:154:3:  [1] (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 character.
		strcpy(wdpos,"i");
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:223: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).
	phnsize = strlen(acmod_set_id2name(mdef->acmod_set,id));
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:306:14:  [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(tphn) > maxphnlen) maxphnlen = strlen(tphn);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:306:52:  [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(tphn) > maxphnlen) maxphnlen = strlen(tphn);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:506:47:  [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 ((word[0] != '(') && (word[strlen(word) - 1] != ')')) {
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_mdef_gen/mk_mdef_gen.c:825:8:  [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).
    at[strlen(at)-1] = '\0';
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/mk_s2sendump.c:105: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).
	n = strlen(fmtdesc[i])+1;
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/mk_s2sendump.c:213: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).
	n = strlen(fmtdesc[i])+1;
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/mk_s2sendump.c:219: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).
    fwrite_int32(fpout, strlen(pshdr)+1);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/mk_s2sendump.c:220: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).
    fwrite(pshdr, sizeof(char), strlen(pshdr)+1, fpout);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/mk_s2sendump.c:222: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).
    fwrite_int32(fpout, strlen(pshdr)+1);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/mk_s2sendump.c:223: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).
    fwrite(pshdr, sizeof(char), strlen(pshdr)+1, fpout);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/mk_s2sendump.c:225: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).
    fwrite_int32(fpout, strlen(pshdr)+1);
data/sphinxtrain-1.0.8+5prealpha+1/src/programs/mk_s2sendump/mk_s2sendump.c:226: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).
    fwrite(pshdr, sizeof(char), strlen(pshdr)+1, fpout);

ANALYSIS SUMMARY:

Hits = 428
Lines analyzed = 62257 in approximately 1.89 seconds (33001 lines/second)
Physical Source Lines of Code (SLOC) = 37880
Hits@level = [0] 507 [1]  85 [2] 205 [3]   3 [4] 135 [5]   0
Hits@level+ = [0+] 935 [1+] 428 [2+] 343 [3+] 138 [4+] 135 [5+]   0
Hits/KSLOC@level+ = [0+] 24.6832 [1+] 11.2988 [2+] 9.05491 [3+] 3.64308 [4+] 3.56389 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.