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/sphinxbase-0.8+5prealpha+1/test/unit/test_string/test_atof.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_string/strtest.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_logmath/test_log_int8.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_logmath/test_log_shifted.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_logmath/test_macros.h Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_logmath/test_log_int16.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_matrix/test_invert.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_matrix/test_determinant.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_matrix/test_solve.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_feat/test_subvq.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_feat/test_feat_live.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_feat/test_feat.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_feat/test_macros.h Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_feat/test_feat_fe.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_fe/test_pitch.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_fe/test_fe.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_fe/test_macros.h Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_cmdln/cmdln_parse.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_cmdln/cmdln_parse_r.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_cmdln/cmdln_parse_multiple.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_fsg/test_fsg_read.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_fsg/test_macros.h Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_fsg/test_fsg_write_fsm.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_fsg/test_fsg_jsgf.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_lineiter/test_macros.h Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_lineiter/test_lineiter.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_case/chgCase.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_alloc/test_ckd_alloc_abort.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_alloc/test_ckd_alloc.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_alloc/test_ckd_alloc_catch.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_alloc/test_macros.h Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_alloc/test_listelem_alloc.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_alloc/test_ckd_alloc_fail.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_bitvec/test_bitvec.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_bitvec/test_macros.h Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_hash/deletehash.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_hash/test_hash_iter.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_hash/test_macros.h Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_hash/displayhash.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_ngram/test_lm_score.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_ngram/test_lm_class.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_ngram/test_lm_set.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_ngram/test_lm_add.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_ngram/test_lm_write.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_ngram/test_macros.h Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_ngram/test_lm_casefold.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_ngram/test_lm_read.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_thread/test_macros.h Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_thread/test_thread.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_thread/test_msgq.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_thread/test_event.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_util/test_fopen.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_util/test_heap.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_util/test_macros.h Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_util/test_build_directory.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_util/test_bit_encode.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_util/test_filename.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_util/test_readfile.c Examining data/sphinxbase-0.8+5prealpha+1/test/unit/test_util/test_bitarr.c Examining data/sphinxbase-0.8+5prealpha+1/include/win32/sphinx_config.h Examining data/sphinxbase-0.8+5prealpha+1/include/win32/config.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinx_config.h Examining data/sphinxbase-0.8+5prealpha+1/include/android/sphinx_config.h Examining data/sphinxbase-0.8+5prealpha+1/include/android/config.h Examining data/sphinxbase-0.8+5prealpha+1/include/wince/sphinx_config.h Examining data/sphinxbase-0.8+5prealpha+1/include/wince/config.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/bio.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/genrand.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/cmn.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/fe.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/logmath.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/clapack_lite.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/ad.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/byteorder.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/sbthread.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/fsg_model.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/fixpoint.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/prim_type.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/matrix.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/err.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/strfuncs.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/case.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/yin.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/ckd_alloc.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/listelem_alloc.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/glist.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/bitarr.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/jsgf.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/agc.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/bitvec.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/ngram_model.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/hash_table.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/pio.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/mmio.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/sphinxbase_export.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/feat.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/f2c.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/filename.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/profile.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/priority_queue.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/heap.h Examining data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/cmd_ln.h Examining data/sphinxbase-0.8+5prealpha+1/src/sphinx_cepview/main_cepview.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/lm_trie_quant.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/fsg_model.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf_parser.h Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngrams_raw.h Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf_parser.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/lm_trie.h Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf_scanner.h Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_set.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_set.h Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngrams_raw.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/lm_trie.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf_internal.h Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf_scanner.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_internal.h Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/lm_trie_quant.h Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_trie.h Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_trie.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/matrix.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/case.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/f2c_lite.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/bitvec.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/blas_lite.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/err.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/glist.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/priority_queue.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/bio.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/logmath.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/heap.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/bitarr.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/dtoa.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/listelem_alloc.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/profile.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/strfuncs.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/filename.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/mmio.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/slapack_lite.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/hash_table.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/ckd_alloc.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/genrand.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/slamch.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_warp_affine.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_prespch_buf.h Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_sigproc.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_warp_affine.h Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_interface.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_noise.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_prespch_buf.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_type.h Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_noise.h Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fixlog.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_warp_inverse_linear.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_warp.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/yin.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_warp_piecewise_linear.h Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_warp_piecewise_linear.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_warp.h Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_internal.h Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_warp_inverse_linear.h Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/cmn.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/cmn_live.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/agc.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/lda.c Examining data/sphinxbase-0.8+5prealpha+1/src/sphinx_adtools/sphinx_pitch.c Examining data/sphinxbase-0.8+5prealpha+1/src/sphinx_adtools/cont_seg.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxad/ad_oss.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxad/ad_pulse.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxad/ad_base.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxad/ad_win32.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxad/ad_alsa.c Examining data/sphinxbase-0.8+5prealpha+1/src/libsphinxad/ad_openal.c Examining data/sphinxbase-0.8+5prealpha+1/src/sphinx_jsgf2fsg/main.c Examining data/sphinxbase-0.8+5prealpha+1/src/sphinx_fe/sphinx_wave2feat.h Examining data/sphinxbase-0.8+5prealpha+1/src/sphinx_fe/sphinx_fe.c Examining data/sphinxbase-0.8+5prealpha+1/src/sphinx_fe/cmd_ln_defn.h Examining data/sphinxbase-0.8+5prealpha+1/src/sphinx_lmtools/sphinx_lm_eval.c Examining data/sphinxbase-0.8+5prealpha+1/src/sphinx_lmtools/sphinx_lm_convert.c FINAL RESULTS: data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_warp_affine.c:115: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(temp_param_str, param_str); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_warp_affine.c:117: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(p_str, param_str); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_warp_inverse_linear.c:114: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(temp_param_str, param_str); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_warp_inverse_linear.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(p_str, param_str); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_warp_piecewise_linear.c:125: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(temp_param_str, param_str); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_warp_piecewise_linear.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(p_str, param_str); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:840: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. while (sscanf(strp, "%s%n", wd, &l) == 1) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:1239:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s%s%s%s", dir, ps, file, cepext); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf.c:232:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fullname, "<%s.%s", jsgf->name, name + 1); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf.c:249:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fullname, "<%s.%s", grammar_name, name + 1); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf.c:689:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "<%s.g%05d>", jsgf->name, data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf.c:770: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(path, name + 1); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf_parser.c:691:21: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define YYFPRINTF fprintf data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/bio.c:212:17: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(line, "%s%n", word, &l) != 1) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/bio.c:229:17: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(line + l, "%s", word) != 1) { /* Multi-word values not allowed */ data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/bio.c:239: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. if (sscanf(line, "%s", word) != 1) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/bio.c:610:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(inputfile, "%s/%s%s", directory, filename, extension); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/bio.c:612:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(inputfile, "%s%s", filename, extension); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/ckd_alloc.c:127:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, args); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/ckd_alloc.c:217: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(buf, orig); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/err.c:68:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define vsnprintf _vsnprintf data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/err.c:96:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(msg, sizeof(msg), fmt, ap); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/err.c:143:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(msg, sizeof(msg), fmt, ap); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/err.c:175:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(msg, sizeof(msg), fmt, ap); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/err.c:235:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(fp, fmt, ap); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/filename.c:97: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(root, path); /* Didn't find a . */ data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:139:23: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if ((fp = popen(command, mode)) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:162:23: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if ((fp = popen(command, mode)) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:222: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(tmpfile, file); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/strfuncs.c:87: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/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/strfuncs.c:89: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/sphinxbase-0.8+5prealpha+1/src/sphinx_adtools/cont_seg.c:194:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(file_name, "%s%04d.raw", infile_path, uttno); data/sphinxbase-0.8+5prealpha+1/src/sphinx_adtools/cont_seg.c:199:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(file_name, "%s.raw", infile_path); data/sphinxbase-0.8+5prealpha+1/src/sphinx_fe/sphinx_fe.c:235:15: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if ((fh = popen(cmdline, "r")) == NULL) { data/sphinxbase-0.8+5prealpha+1/test/unit/test_case/chgCase.c:73: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(s1, strs[atoi(argv[2])]); data/sphinxbase-0.8+5prealpha+1/test/unit/test_case/chgCase.c:74: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(s2, strs[atoi(argv[3])]); data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/fe.h:52:20: [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. #define srand48(x) srand(x) data/sphinxbase-0.8+5prealpha+1/include/sphinxbase/fe.h:53:9: [3] (random) lrand48: 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 lrand48() rand() data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf.c:869:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((jsgf_path = getenv("JSGF_PATH")) != NULL) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:219:31: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. env_val = getenv(env_name); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:195:5: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&mtx->mtx); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:208:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&mtx->mtx); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:238:5: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&msgq->mtx); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:268:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&q->mtx); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:319:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&q->mtx); data/sphinxbase-0.8+5prealpha+1/src/libsphinxad/ad_oss.c:108:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((dspFD = open(dev, O_RDONLY)) < 0) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxad/ad_oss.c:211:20: [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 ((mixerFD = open("/dev/mixer", O_RDONLY)) < 0) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxad/ad_win32.c:107:5: [2] (buffer) TCHAR: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. TCHAR errbuf[512]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxad/ad_win32.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 errbuf[1024]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxad/ad_win32.c:477:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, sysbufp + r->curoff, t * sizeof(int16)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_interface.c:469:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fe->overflow_samps + fe->num_overflow_samps, data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_interface.c:509: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(fe->overflow_samps + fe->num_overflow_samps, data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_interface.c:549:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fe->overflow_samps, data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_interface.c:566: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(fe->overflow_samps + fe->num_overflow_samps, data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_noise.c:291:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). vad_stats = fopen("vad_debug", "w"); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_prespch_buf.c:119:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(feat, prespch_buf->cep_buf[prespch_buf->cep_read_ptr], data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_prespch_buf.c:129: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(prespch_buf->cep_buf[prespch_buf->cep_write_ptr], feat, data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_prespch_buf.c:147: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(cursample, &prespch_buf->pcm_buf[prespch_buf->pcm_read_ptr * prespch_buf->num_samples], data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_prespch_buf.c:163: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(&prespch_buf->pcm_buf[sample_ptr], samples, data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_sigproc.c:830: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(fe->spch, in, len * sizeof(*in)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_sigproc.c:854: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(fe->spch + offset, in, len * sizeof(*fe->spch)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_warp_affine.c:75: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 p_str[256] = ""; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_warp_affine.c:102:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp_param_str[256]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_warp_inverse_linear.c:74: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 p_str[256] = ""; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_warp_inverse_linear.c:101:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp_param_str[256]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_warp_piecewise_linear.c:84: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 p_str[256] = ""; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/fe/fe_warp_piecewise_linear.c:112:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp_param_str[256]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:351: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(inout_feat[i][0], fcb->sv_buf, fcb->sv_dim * sizeof(*fcb->sv_buf)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:410:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new_feat[0][0], old_feat[0][0], cf * k * sizeof(mfcc_t)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:443: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(feat[0], mfc[0] + 1, (feat_cepsize(fcb) - 1) * sizeof(mfcc_t)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:503: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(feat[0], mfc[0] + 1, (feat_cepsize(fcb) - 1) * sizeof(mfcc_t)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:549: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(feat[0], mfc[0], feat_cepsize(fcb) * sizeof(mfcc_t)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:565: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(feat[0], mfc[0], feat_cepsize(fcb) * sizeof(mfcc_t)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:593: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(feat[0], mfc[0], feat_cepsize(fcb) * sizeof(mfcc_t)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:639: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(feat[0], mfc[0], feat_cepsize(fcb) * sizeof(mfcc_t)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:696:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(feat[j] + ((i + win) * stream_len), data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:827:36: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). fcb->window_size = atoi(mtype + i + 1); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:1031:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). || ((fp = fopen(file, "rb")) == NULL)) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:1155:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(mfc[i], mfc[start_pad], cepsize * sizeof(mfcc_t)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:1157:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(mfc[start_pad + n + i], mfc[start_pad + n - 1], data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:1288: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(cepbuf + win, uttcep, nfr * sizeof(mfcc_t *)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:1297: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(cepbuf[i], uttcep[0], cepsize * sizeof(mfcc_t)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:1299: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(cepbuf[nfr + win + i], uttcep[nfr - 1], cepsize * sizeof(mfcc_t)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:1357:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fcb->cepbuf[fcb->bufpos++], uttcep[0], data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:1368: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(fcb->cepbuf[fcb->bufpos++], uttcep[i], data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:1384:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fcb->cepbuf[fcb->bufpos++], fcb->cepbuf[tpos], data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/lda.c:75: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(ldafile, "rb")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/lda.c:155: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(inout_feat[i][0], tmp, fcb->stream_len[0] * sizeof(mfcc_t)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/fsg_model.c:744: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, "r")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/fsg_model.c:845: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, "w")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/fsg_model.c:900: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, "w")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/fsg_model.c:931: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, "w")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf.c:746: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). tmp = fopen(fullpath, "r"); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf.c:789:5: [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(path, ".gram"); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf.c:908: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). in = fopen(filename, "r"); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf_parser.c:999:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf_parser.c:1016:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char yyformat[sizeof yyunexpected data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf_parser.c:1210: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 yymsgbuf[128]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/lm_trie.c:186: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(fixed_counts, counts, order * sizeof(*fixed_counts)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/lm_trie.c:210:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(words, top->words, 2 * sizeof(*words)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/lm_trie.c:217:21: [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(words, top->words, data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/lm_trie.c:315:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(words, top->words, data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/lm_trie.c:755: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(trie->hist_cache, hist, n_hist * sizeof(*hist)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model.c:922:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[512]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model.c:923:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *wptr[2]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_set.c:191:26: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. __BIGSTACKVARIABLE__ char str[1024]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_set.c:199: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 ((ctlfp = fopen(lmctlfile, "r")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_set.c:209: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(basedir, lmctlfile, c - lmctlfile + 1); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_set.c:515: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(set->lweights, weights, data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_set.c:567:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new_widmap[i], set->widmap[i], data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_set.c:838: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(set->widmap[wid], newwid, set->n_models * sizeof(*newwid)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_trie.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 *wptr[3]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_trie.c:237: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). FILE *fp = fopen(path, "w"); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_trie.c:439:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[1024]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngrams_raw.c:78: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 *wptr[NGRAM_MAX_ORDER + 1]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngrams_raw.c:143: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 expected_header[20]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngrams_raw.c:146: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(expected_header, "\\%d-grams:", order); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/bio.c:83:26: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. __BIGSTACKVARIABLE__ char iline[16384]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/bio.c:189:26: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. __BIGSTACKVARIABLE__ char line[16384], word[4096]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/bio.c:352: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(nbuf, buf, n_el * el_sz); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/bio.c:615: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 ((uttfp = fopen(inputfile, "rb")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/bitarr.c:94: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(base_off, &value64, sizeof(value64)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/bitarr.c:119:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(base_off, &value32, sizeof(value32)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/ckd_alloc.c:349:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. tmp1[i] = &((char *)store)[j*elem_size]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/ckd_alloc.c:397:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. tmp1[i] = &((char *)store)[j*elem_size]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/ckd_alloc.c:421: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. out[i] = &((char *)store)[j*elem_size]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:200: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 env_name[100]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:425: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(v, &val, sizeof(val)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:459:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new_cmdln->f_argv + new_cmdln->f_argc, argv, data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:519:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(default_argfn, "r")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:777:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((file = fopen(filename, "r")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/dtoa.c:447:20: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define Bcopy(x,y) memcpy((char *)&x->sign, (char *)&y->sign, \ data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/err.c:85:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *err_prefix[ERR_MAX] = { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/err.c:89: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 msg[1024]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/err.c:116:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *err_prefix[ERR_MAX] = { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/err.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 msg[1024]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/err.c:124:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char error_string[1024]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/err.c:164:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *err_prefix[ERR_MAX] = { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/err.c:168: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 msg[1024]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/err.c:208: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 msg[1024]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/err.c:245: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 ((newfp = fopen(path, "a")) == NULL) data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/filename.c:82: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(dir, path, i); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/logmath.c:175: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/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/logmath.c:203:30: [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). lmath->t.width = atoi(argval[i]); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/logmath.c:206:30: [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). lmath->t.shift = atoi(argval[i]); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/logmath.c:284: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, "wb")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/matrix.c:193:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tmp_a[0], a[0], n*n*sizeof(float32)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/matrix.c:222: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(tmp_a[0], a[0], n*n*sizeof(float32)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/matrix.c:223:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out_x, b, n*sizeof(float32)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/matrix.c:247: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(tmp_a[0], a[0], n*n*sizeof(float32)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/mmio.c:215:15: [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(filename, O_RDONLY)) == -1) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:176: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, mode); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:215:15: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). char *tmpfile; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:222:16: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). strcpy(tmpfile, file); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:225:13: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). tmpfile[k - 3] = '\0'; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:228:13: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). tmpfile[k - 4] = '\0'; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:231:13: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). tmpfile[k - 2] = '\0'; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:234:13: [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(tmpfile + k, ".gz"); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:235:34: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if ((fh = fopen_comp(tmpfile, "r", ispipe)) != NULL) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:236:52: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). E_WARN("Using %s instead of %s\n", tmpfile, file); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:237:26: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). ckd_free(tmpfile); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:240:13: [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(tmpfile + k, ".bz2"); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:241:34: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if ((fh = fopen_comp(tmpfile, "r", ispipe)) != NULL) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:242:52: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). E_WARN("Using %s instead of %s\n", tmpfile, file); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:243:26: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). ckd_free(tmpfile); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:246:13: [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(tmpfile + k, ".Z"); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:247:34: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if ((fh = fopen_comp(tmpfile, "r", ispipe)) != NULL) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:248:52: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). E_WARN("Using %s instead of %s\n", tmpfile, file); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:249:26: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). ckd_free(tmpfile); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:252:22: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). ckd_free(tmpfile); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:255:44: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). E_WARN("Using %s instead of %s\n", tmpfile, file); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:256:25: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). fh = fopen_comp(tmpfile, "r", ispipe); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:257:18: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). ckd_free(tmpfile); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:380:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:395:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(outptr, buf, len + 1); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:497: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 ((fp = (FILE *)fopen(file, "r")) != 0) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:601:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char bits[4]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/profile.c:306:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[8]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/profile.c:311: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, "wb")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/profile.c:327: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, "rb")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:274:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(q->data + in, &len, len1); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:275:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(q->data, ((char *)&len) + len1, sizeof(len) - len1); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:280:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(q->data + in, &len, sizeof(len)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:289:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(q->data + in, cdata, len1); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:295: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(q->data + in, cdata, len); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:324:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&q->msglen, q->data + q->out, len1); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:325:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(((char *)&q->msglen) + len1, q->data, data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:340: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(outptr, q->data + q->out, len1); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:346: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(outptr, q->data + q->out, len); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:500:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(q->data + in, &len, len1); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:501:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(q->data, ((char *)&len) + len1, sizeof(len) - len1); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:506:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(q->data + in, &len, sizeof(len)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:515:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(q->data + in, data, len1); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:521: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(q->data + in, data, len); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:575:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&q->msglen, q->data + q->out, len1); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:576:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(((char *)&q->msglen) + len1, q->data, data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:591: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(outptr, q->data + q->out, len1); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/sbthread.c:597: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(outptr, q->data + q->out, len); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/slapack_lite.c:193: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 c1[1], c2[2], c3[3], c4[2]; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/slapack_lite.c:198: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 subnam[6]; data/sphinxbase-0.8+5prealpha+1/src/sphinx_adtools/cont_seg.c:152: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[1024]; data/sphinxbase-0.8+5prealpha+1/src/sphinx_adtools/cont_seg.c:195:33: [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 ((file = fopen(file_name, "wb")) == NULL) data/sphinxbase-0.8+5prealpha+1/src/sphinx_adtools/cont_seg.c:200:33: [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 ((file = fopen(file_name, "ab")) == NULL) data/sphinxbase-0.8+5prealpha+1/src/sphinx_adtools/cont_seg.c:267:23: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((infile = fopen(infile_path, "rb")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/sphinx_adtools/sphinx_pitch.c:177: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 header[4]; data/sphinxbase-0.8+5prealpha+1/src/sphinx_adtools/sphinx_pitch.c:215: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[4]; data/sphinxbase-0.8+5prealpha+1/src/sphinx_adtools/sphinx_pitch.c:313: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 hdr[1024]; data/sphinxbase-0.8+5prealpha+1/src/sphinx_adtools/sphinx_pitch.c:334:39: [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). cmd_ln_set_int32("-samprate", atoi(c)); data/sphinxbase-0.8+5prealpha+1/src/sphinx_adtools/sphinx_pitch.c:335:43: [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). else if (cmd_ln_int32("-samprate") != atoi(c)) { data/sphinxbase-0.8+5prealpha+1/src/sphinx_adtools/sphinx_pitch.c:337: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). atoi(c), cmd_ln_int32("-samprate")); data/sphinxbase-0.8+5prealpha+1/src/sphinx_adtools/sphinx_pitch.c:382:22: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((outfh = fopen(out, "w")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/sphinx_adtools/sphinx_pitch.c:390:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((infh = fopen(in, "rb")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/sphinx_adtools/sphinx_pitch.c:512: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 ((ctlfh = fopen(ctl, "r")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/sphinx_cepview/main_cepview.c:202: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, "rb")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/sphinx_fe/sphinx_fe.c:92: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 rifftag[4]; /* "RIFF" string */ data/sphinxbase-0.8+5prealpha+1/src/sphinx_fe/sphinx_fe.c:94: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 wavefmttag[8]; /* "WAVEfmt " string (note space after 't') */ data/sphinxbase-0.8+5prealpha+1/src/sphinx_fe/sphinx_fe.c:102:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char datatag[4]; /* "data" string */ data/sphinxbase-0.8+5prealpha+1/src/sphinx_fe/sphinx_fe.c:117: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(wtf->infile, "rb")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/sphinx_fe/sphinx_fe.c:149: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 nist[7]; data/sphinxbase-0.8+5prealpha+1/src/sphinx_fe/sphinx_fe.c:153: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(infile, "rb")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/sphinx_fe/sphinx_fe.c:193:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int nchans = atoi(words[2]); data/sphinxbase-0.8+5prealpha+1/src/sphinx_fe/sphinx_fe.c:283: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(wtf->infile, "rb")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/sphinx_fe/sphinx_fe.c:304: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(wtf->infile, "rb")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/sphinx_fe/sphinx_fe.c:826:23: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((wtf->outfh = fopen(outfile, "wb")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/sphinx_fe/sphinx_fe.c:942: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 ((ctlfh = fopen(ctlfile, "r")) == NULL) { data/sphinxbase-0.8+5prealpha+1/src/sphinx_lmtools/sphinx_lm_eval.c:194: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 ((fh = fopen(lsnfn, "r")) == NULL) data/sphinxbase-0.8+5prealpha+1/test/unit/test_case/chgCase.c:26: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 s1[MAX_STR_LEN]; data/sphinxbase-0.8+5prealpha+1/test/unit/test_case/chgCase.c:27:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s2[MAX_STR_LEN]; data/sphinxbase-0.8+5prealpha+1/test/unit/test_case/chgCase.c:29: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 strs[NUM_STRS][MAX_STR_LEN] = { STR0, data/sphinxbase-0.8+5prealpha+1/test/unit/test_case/chgCase.c:66: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). if (0 >= atoi(argv[2]) || data/sphinxbase-0.8+5prealpha+1/test/unit/test_case/chgCase.c:67: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). atoi(argv[2]) >= NUM_STRS || data/sphinxbase-0.8+5prealpha+1/test/unit/test_case/chgCase.c:68: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). 0 >= atoi(argv[3]) || atoi(argv[3]) >= NUM_STRS) { data/sphinxbase-0.8+5prealpha+1/test/unit/test_case/chgCase.c:68:35: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). 0 >= atoi(argv[3]) || atoi(argv[3]) >= NUM_STRS) { data/sphinxbase-0.8+5prealpha+1/test/unit/test_case/chgCase.c:73:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). strcpy(s1, strs[atoi(argv[2])]); data/sphinxbase-0.8+5prealpha+1/test/unit/test_case/chgCase.c:74:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). strcpy(s2, strs[atoi(argv[3])]); data/sphinxbase-0.8+5prealpha+1/test/unit/test_fe/test_fe.c:36:23: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). TEST_ASSERT(raw = fopen(TESTDATADIR "/chan3.raw", "rb")); data/sphinxbase-0.8+5prealpha+1/test/unit/test_fe/test_fe.c:171: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(cepbuf2[i], cptr[0], nfr * DEFAULT_NUM_CEPSTRA * sizeof(**cptr)); data/sphinxbase-0.8+5prealpha+1/test/unit/test_fe/test_fe.c:178: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(cepbuf2[i], cptr[0], nfr * DEFAULT_NUM_CEPSTRA * sizeof(**cptr)); data/sphinxbase-0.8+5prealpha+1/test/unit/test_fe/test_fe.c:185: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(cepbuf2[i], cptr[0], nfr * DEFAULT_NUM_CEPSTRA * sizeof(**cptr)); data/sphinxbase-0.8+5prealpha+1/test/unit/test_fe/test_fe.c:192: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(cepbuf2[i], cptr[0], nfr * DEFAULT_NUM_CEPSTRA * sizeof(**cptr)); data/sphinxbase-0.8+5prealpha+1/test/unit/test_fe/test_pitch.c:21: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). TEST_ASSERT(raw = fopen(TESTDATADIR "/chan3.raw", "rb")); data/sphinxbase-0.8+5prealpha+1/test/unit/test_feat/test_feat_fe.c:28: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 ((raw = fopen(TESTDATADIR "/chan3.raw", "rb")) == NULL) { data/sphinxbase-0.8+5prealpha+1/test/unit/test_lineiter/test_lineiter.c:10: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(FILEDIR "/test.txt", "rb"); data/sphinxbase-0.8+5prealpha+1/test/unit/test_matrix/test_determinant.c:25:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(a[0], foo, sizeof(float32) * 3 * 3); data/sphinxbase-0.8+5prealpha+1/test/unit/test_matrix/test_determinant.c:30: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(a[0], bar, sizeof(float32) * 3 * 3); data/sphinxbase-0.8+5prealpha+1/test/unit/test_matrix/test_invert.c:28: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(a[0], foo, sizeof(float32) * 3 * 3); data/sphinxbase-0.8+5prealpha+1/test/unit/test_matrix/test_invert.c:54: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(a[0], bar, sizeof(float32) * 3 * 3); data/sphinxbase-0.8+5prealpha+1/test/unit/test_matrix/test_invert.c:85: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(a[0], foo, sizeof(float32) * 3 * 3); data/sphinxbase-0.8+5prealpha+1/test/unit/test_matrix/test_solve.c:21: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(a[0], foo, sizeof(float32) * 3 * 3); data/sphinxbase-0.8+5prealpha+1/test/unit/test_ngram/test_lm_class.c:77: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[32]; data/sphinxbase-0.8+5prealpha+1/test/unit/test_ngram/test_lm_class.c:78:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(word, "%d:scylla", i); data/sphinxbase-0.8+5prealpha+1/test/unit/test_string/strtest.c:30: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). FILE *fp = fopen(TESTDATADIR "/_fread_line.txt", "r"); data/sphinxbase-0.8+5prealpha+1/test/unit/test_string/strtest.c:82:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(foo, "foo\nbar\n\n"); data/sphinxbase-0.8+5prealpha+1/test/unit/test_string/strtest.c:88:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(foo, " \t \t foobar\n"); data/sphinxbase-0.8+5prealpha+1/test/unit/test_thread/test_thread.c:26: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 ((raw = fopen(TESTDATADIR "/chan3.raw", "rb")) == NULL) data/sphinxbase-0.8+5prealpha+1/test/unit/test_util/test_bit_encode.c:21: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. unsigned char inbits[16]; data/sphinxbase-0.8+5prealpha+1/test/unit/test_util/test_bit_encode.c:23: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). fh = fopen("bittest.out", "wb"); data/sphinxbase-0.8+5prealpha+1/test/unit/test_util/test_bit_encode.c:42: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). fh = fopen("bittest.out", "rb"); data/sphinxbase-0.8+5prealpha+1/test/unit/test_util/test_bitarr.c:22: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 mem[57+8]; data/sphinxbase-0.8+5prealpha+1/test/unit/test_util/test_filename.c:30:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char testout[32]; data/sphinxbase-0.8+5prealpha+1/test/unit/test_util/test_fopen.c:16:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[256], *c; data/sphinxbase-0.8+5prealpha+1/src/libsphinxad/ad_alsa.c:327:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); /* Wait for the driver to wake up */ data/sphinxbase-0.8+5prealpha+1/src/libsphinxad/ad_oss.c:366:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((length = read(handle->dspFD, buf, length)) > 0) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:818: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). len = strlen(mtype); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:1210: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). path_length += strlen(dir) + 1; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:1216: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). file_length = strlen(file); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/feat/feat.c:1217: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). cepext_length = strlen(cepext); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf.c:231: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). fullname = ckd_malloc(strlen(jsgf->name) + strlen(name) + 4); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf.c:231:48: [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). fullname = ckd_malloc(strlen(jsgf->name) + strlen(name) + 4); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf.c:248: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). fullname = ckd_malloc(strlen(grammar_name) + strlen(name) + 4); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf.c:248:50: [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). fullname = ckd_malloc(strlen(grammar_name) + strlen(name) + 4); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf.c:688: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). name = ckd_malloc(strlen(jsgf->name) + 16); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf.c:768: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). namelen = strlen(name); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf.c:782: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). import_all = (strlen(name) > 2 data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf_parser.c:880: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). # define yystrlen strlen data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf_scanner.c:767:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/jsgf_scanner.c:1806: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). return yy_scan_bytes(yystr,(int) strlen(yystr) ,yyscanner); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_set.c:218: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(ctlfp, "%1023s", str) == 1) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_set.c:221:21: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. while ((fscanf(ctlfp, "%1023s", str) == 1) data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_set.c:242:17: [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(ctlfp, "%1023s", str) != 1) data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_set.c:264:13: [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(ctlfp, "%1023s", str) != 1) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_set.c:273:13: [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(ctlfp, "%1023s", str) == 1) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_set.c:276:25: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. while ((fscanf(ctlfp, "%1023s", str) == 1) && data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_set.c:299:21: [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(ctlfp, "%1023s", str) != 1) data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_trie.c:335: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). j += strlen(base->word_str[i]) + 1; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_trie.c:359: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). hdr_size = strlen(trie_hdr); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_trie.c:396: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). k += strlen(model->word_str[i]) + 1; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_trie.c:399:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fwrite(model->word_str[i], 1, strlen(model->word_str[i]) + 1, fp); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_trie.c:414:41: [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(trie_hdr, sizeof(*trie_hdr), strlen(trie_hdr), fp); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_trie.c:453: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 (k != strlen(dmp_hdr) + 1) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/lm/ngram_model_trie.c:455: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). if (k != strlen(dmp_hdr) + 1) { data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/bio.c:604:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = strlen(extension); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/bio.c:605:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(filename); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/bio.c:608:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). inputfile = ckd_calloc(strlen(directory) + l + n + 2, 1); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/ckd_alloc.c:214: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(orig) + 1; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:118: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). l = strlen(defn[i].name); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:123: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). l = strlen(defn[i].deflt); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:125: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). l = strlen("(null)"); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:170: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). source_len = strlen(source); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:174:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). required_allocation = (*dest ? strlen(*dest) : 0) + source_len + 1; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:184:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(*dest, source, source_len); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:216:21: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(env_name, i + 2, j - (i + 2)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:262: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). for (l = strlen("[NAME]"); l < namelen; l += 8) data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:265: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). for (l = strlen("[DEFLT]"); l < deflen; l += 8) data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:279: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 (l = strlen(pos[i]->name); l < namelen; l += 8) data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:285: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). l = strlen(pos[i]->deflt); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:358:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( result[i], p, j); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:783:10: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = fgetc(file); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:785:53: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (; ch != EOF && strchr(separator, ch); ch = fgetc(file)) ; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:807:27: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (ch = fgetc(file); ch != EOF && ch != '\n'; ch = fgetc(file)) ; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:807:70: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (ch = fgetc(file); ch != EOF && ch != '\n'; ch = fgetc(file)) ; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:809:27: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (ch = fgetc(file); ch != EOF && strchr(separator, ch); ch = fgetc(file)) ; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:809:81: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (ch = fgetc(file); ch != EOF && strchr(separator, ch); ch = fgetc(file)) ; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:852:61: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (; ch != EOF && strchr(separator, ch); ch = fgetc(file)) ; data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/cmd_ln.c:877:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = fgetc(file); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/filename.c:72:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(path); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/filename.c:94:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(path); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/filename.c:99:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(root, path, i); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/filename.c:109: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). (strlen(path) >= 3 data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/hash_table.c:309:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(key); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/hash_table.c:507:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(key); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/hash_table.c:518:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(key); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/hash_table.c:529:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(key); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/logmath.c:296: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). pos = ftell(fp) + strlen("endhdr\n"); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:85:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). k = strlen(file); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:220: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). k = strlen(file); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:280:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove(li->buf, li->buf + 3, strlen(li->buf + 1)); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:322: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). li->len = (int32)strlen(li->buf); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:332: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). li->len += strlen(li->buf + li->len); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:335:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). li->len += strlen(li->buf + li->len); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:384: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). size_t len = strlen(buf); data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/pio.c:626:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(path) == 0) data/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/strfuncs.c:78: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/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/strfuncs.c:80: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/sphinxbase-0.8+5prealpha+1/src/libsphinxbase/util/strfuncs.c:101: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(string); data/sphinxbase-0.8+5prealpha+1/src/sphinx_adtools/sphinx_pitch.c:340: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 (line + strlen(line) < hdr + 1023) data/sphinxbase-0.8+5prealpha+1/src/sphinx_adtools/sphinx_pitch.c:341: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). line[strlen(line)] = ' '; data/sphinxbase-0.8+5prealpha+1/src/sphinx_fe/sphinx_fe.c:174: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 (strlen(li->buf) == 0) { data/sphinxbase-0.8+5prealpha+1/src/sphinx_fe/sphinx_fe.c:985: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 (strlen(li->buf) == 0) { data/sphinxbase-0.8+5prealpha+1/src/sphinx_lmtools/sphinx_lm_eval.c:216: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). && words[n-1][strlen(words[n-1])-1] == ')') data/sphinxbase-0.8+5prealpha+1/test/unit/test_string/strtest.c:40: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). strlen("Hello world!\n")); data/sphinxbase-0.8+5prealpha+1/test/unit/test_string/strtest.c:49: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). strlen("123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456\n")); data/sphinxbase-0.8+5prealpha+1/test/unit/test_string/strtest.c:58: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). strlen("All work and no play makes Jack a very dull boy. All work and no play makes Jack a very dull boy. All work and no play makes Jack a very dull boy. All work and no play makes Jack a very dull boy. All work and no play makes Jack a very dull boy. All work and no play makes Jack a very dull boy. \n")); ANALYSIS SUMMARY: Hits = 343 Lines analyzed = 51388 in approximately 1.45 seconds (35335 lines/second) Physical Source Lines of Code (SLOC) = 31661 Hits@level = [0] 454 [1] 82 [2] 216 [3] 9 [4] 36 [5] 0 Hits@level+ = [0+] 797 [1+] 343 [2+] 261 [3+] 45 [4+] 36 [5+] 0 Hits/KSLOC@level+ = [0+] 25.1729 [1+] 10.8335 [2+] 8.24358 [3+] 1.42131 [4+] 1.13705 [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.