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/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_historical_decomposition.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_variance_decomposition.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/fwz_msv_msre.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_historical_decomposition.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_forecast.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_impulse_response_special.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_impulse_response_special.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_impulse_response.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_MSStateSpace.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_counterfactual.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_impulse_response.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_variance_decomposition.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_estimate.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_historical_decomposition.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_simulate.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_variance_decomposition.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_variance_decomposition.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_historical_decomposition.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_mdd.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_sbvar_command_line.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio_matlab.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio_matlab.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_forecast.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/create_init_file.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_impulse_responses.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_sbvar_command_line.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/create_simulated_data.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_impulse_responses.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_forecast.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_probabilities.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_estimate.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_forecast.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_MSStateSpace.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_counterfactual.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_opt.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_block.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_theta.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_sim.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/switch_opt.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_opt.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_theta_prior.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_equi_energy_simulation.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation_prior.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_theta.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation_prior.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_dirichlet_restrictions.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_sim.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_theta_prior.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_equi_energy_simulation.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_block.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_dirichlet_restrictions.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/switch.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/switchio.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/histogram/dw_histogram.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/elliptical/dw_elliptical.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/elliptical/dw_elliptical_test.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/include/dw_matrix_sort.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/include/dw_parse_cmd.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/include/dw_histogram.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/include/dw_math.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/include/dw_ascii.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/include/blas_lapack.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/include/dw_std.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/include/dw_matrix_rand.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/include/dw_matrix.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/include/dw_elliptical.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/include/prcsn.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/include/dw_matrix_array.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/include/dw_array.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/include/dw_rand.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/include/bmatrix.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/include/dw_error.h
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_parse_cmd.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_ascii.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/arrays/dw_matrix_array.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/arrays/dw_array.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test.hpp
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/bug_test.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test_instances.hpp
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test_main.cpp
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test_instances.cpp
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test.cpp
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/stat/dw_rand_gsl.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/stat/dw_matrix_rand.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/math/dw_math.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_exceptions.hpp
Examining data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c
Examining data/dynare-4.6.3/mex/sources/dynblas.h
Examining data/dynare-4.6.3/mex/sources/mjdgges/mjdgges.cc
Examining data/dynare-4.6.3/mex/sources/gensylv/gensylv.cc
Examining data/dynare-4.6.3/mex/sources/dynumfpack.h
Examining data/dynare-4.6.3/mex/sources/dynmex.h
Examining data/dynare-4.6.3/mex/sources/perfect_foresight_problem/DynamicModelCaller.cc
Examining data/dynare-4.6.3/mex/sources/perfect_foresight_problem/perfect_foresight_problem.cc
Examining data/dynare-4.6.3/mex/sources/dynlapack.h
Examining data/dynare-4.6.3/mex/sources/bytecode/bytecode.cc
Examining data/dynare-4.6.3/mex/sources/bytecode/Interpreter.cc
Examining data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc
Examining data/dynare-4.6.3/mex/sources/bytecode/testing/mex_interface.cc
Examining data/dynare-4.6.3/mex/sources/bytecode/Evaluate.cc
Examining data/dynare-4.6.3/mex/sources/bytecode/Mem_Mngr.cc
Examining data/dynare-4.6.3/mex/sources/kalman_steady_state/kalman_steady_state.cc
Examining data/dynare-4.6.3/mex/sources/ms-sbvar/modify_for_mex.cc
Examining data/dynare-4.6.3/mex/sources/ms-sbvar/modify_for_mex.h
Examining data/dynare-4.6.3/mex/sources/ms-sbvar/mex_write_to_matlab.c
Examining data/dynare-4.6.3/mex/sources/ms-sbvar/mex_top_level.cc
Examining data/dynare-4.6.3/mex/sources/dynare_simul_/dynare_simul_.cc
Examining data/dynare-4.6.3/mex/sources/local_state_space_iterations/local_state_space_iteration_k.cc
Examining data/dynare-4.6.3/mex/sources/local_state_space_iterations/local_state_space_iteration_2.cc
Examining data/dynare-4.6.3/mex/sources/sobol/qmc_sequence.cc
Examining data/dynare-4.6.3/mex/sources/k_order_perturbation/k_ord_dynare.cc
Examining data/dynare-4.6.3/mex/sources/k_order_perturbation/k_order_perturbation.cc
Examining data/dynare-4.6.3/mex/sources/k_order_perturbation/dynamic_dll.cc
Examining data/dynare-4.6.3/mex/sources/k_order_perturbation/dynamic_m.cc
Examining data/dynare-4.6.3/mex/sources/k_order_perturbation/tests/k_order_test_main.cc
Examining data/dynare-4.6.3/mex/sources/num_procs/num_procs.cc
Examining data/dynare-4.6.3/mex/sources/block_kalman_filter/block_kalman_filter.cc
Examining data/dynare-4.6.3/mex/sources/kronecker/sparse_hessian_times_B_kronecker_C.cc
Examining data/dynare-4.6.3/mex/sources/kronecker/A_times_B_kronecker_C.cc
Examining data/dynare-4.6.3/preprocessor/src/Statement.cc
Examining data/dynare-4.6.3/preprocessor/src/ExternalFunctionsTable.cc
Examining data/dynare-4.6.3/preprocessor/src/ComputingTasks.cc
Examining data/dynare-4.6.3/preprocessor/src/NumericalInitialization.cc
Examining data/dynare-4.6.3/preprocessor/src/SymbolTable.cc
Examining data/dynare-4.6.3/preprocessor/src/Shocks.cc
Examining data/dynare-4.6.3/preprocessor/src/ModFile.cc
Examining data/dynare-4.6.3/preprocessor/src/ModelTree.cc
Examining data/dynare-4.6.3/preprocessor/src/ConfigFile.cc
Examining data/dynare-4.6.3/preprocessor/src/StaticModel.cc
Examining data/dynare-4.6.3/preprocessor/src/ExprNode.cc
Examining data/dynare-4.6.3/preprocessor/src/SigmaeInitialization.cc
Examining data/dynare-4.6.3/preprocessor/src/DataTree.cc
Examining data/dynare-4.6.3/preprocessor/src/ModelEquationBlock.cc
Examining data/dynare-4.6.3/preprocessor/src/DynareMain.cc
Examining data/dynare-4.6.3/preprocessor/src/DynareMain1.cc
Examining data/dynare-4.6.3/preprocessor/src/SubModel.cc
Examining data/dynare-4.6.3/preprocessor/src/DynareFlex.cc
Examining data/dynare-4.6.3/preprocessor/src/DynareBison.cc
Examining data/dynare-4.6.3/preprocessor/src/MinimumFeedbackSet.cc
Examining data/dynare-4.6.3/preprocessor/src/DynareMain2.cc
Examining data/dynare-4.6.3/preprocessor/src/NumericalConstants.cc
Examining data/dynare-4.6.3/preprocessor/src/WarningConsolidation.cc
Examining data/dynare-4.6.3/preprocessor/src/ParsingDriver.cc
Examining data/dynare-4.6.3/preprocessor/src/FlexLexer.h
Examining data/dynare-4.6.3/preprocessor/src/SymbolList.cc
Examining data/dynare-4.6.3/preprocessor/src/macro/Environment.cc
Examining data/dynare-4.6.3/preprocessor/src/macro/Tokenizer.cc
Examining data/dynare-4.6.3/preprocessor/src/macro/Expressions.cc
Examining data/dynare-4.6.3/preprocessor/src/macro/Driver.cc
Examining data/dynare-4.6.3/preprocessor/src/macro/Parser.cc
Examining data/dynare-4.6.3/preprocessor/src/macro/Directives.cc
Examining data/dynare-4.6.3/preprocessor/src/DynamicModel.cc
Examining data/dynare-4.6.3/dynare++/kord/korder.cc
Examining data/dynare-4.6.3/dynare++/kord/first_order.cc
Examining data/dynare-4.6.3/dynare++/kord/journal.cc
Examining data/dynare-4.6.3/dynare++/kord/dynamic_model.cc
Examining data/dynare-4.6.3/dynare++/kord/faa_di_bruno.cc
Examining data/dynare-4.6.3/dynare++/kord/decision_rule.cc
Examining data/dynare-4.6.3/dynare++/kord/seed_generator.cc
Examining data/dynare-4.6.3/dynare++/kord/approximation.cc
Examining data/dynare-4.6.3/dynare++/kord/tests.cc
Examining data/dynare-4.6.3/dynare++/kord/normal_conjugate.cc
Examining data/dynare-4.6.3/dynare++/kord/korder_stoch.cc
Examining data/dynare-4.6.3/dynare++/kord/global_check.cc
Examining data/dynare-4.6.3/dynare++/parser/cc/formula_parser.cc
Examining data/dynare-4.6.3/dynare++/parser/cc/atom_substitutions.cc
Examining data/dynare-4.6.3/dynare++/parser/cc/matrix_tab.cc
Examining data/dynare-4.6.3/dynare++/parser/cc/fine_atoms.cc
Examining data/dynare-4.6.3/dynare++/parser/cc/formula_tab.cc
Examining data/dynare-4.6.3/dynare++/parser/cc/assign_tab.cc
Examining data/dynare-4.6.3/dynare++/parser/cc/matrix_parser.cc
Examining data/dynare-4.6.3/dynare++/parser/cc/tree.cc
Examining data/dynare-4.6.3/dynare++/parser/cc/dynamic_atoms.cc
Examining data/dynare-4.6.3/dynare++/parser/cc/parser_exception.cc
Examining data/dynare-4.6.3/dynare++/parser/cc/formula_ll.cc
Examining data/dynare-4.6.3/dynare++/parser/cc/matrix_ll.cc
Examining data/dynare-4.6.3/dynare++/parser/cc/assign_ll.cc
Examining data/dynare-4.6.3/dynare++/parser/cc/static_atoms.cc
Examining data/dynare-4.6.3/dynare++/parser/cc/atom_assignings.cc
Examining data/dynare-4.6.3/dynare++/parser/cc/static_fine_atoms.cc
Examining data/dynare-4.6.3/dynare++/tl/testing/factory.cc
Examining data/dynare-4.6.3/dynare++/tl/testing/monoms.cc
Examining data/dynare-4.6.3/dynare++/tl/testing/tests.cc
Examining data/dynare-4.6.3/dynare++/tl/cc/tl_static.cc
Examining data/dynare-4.6.3/dynare++/tl/cc/twod_matrix.cc
Examining data/dynare-4.6.3/dynare++/tl/cc/fine_container.cc
Examining data/dynare-4.6.3/dynare++/tl/cc/int_sequence.cc
Examining data/dynare-4.6.3/dynare++/tl/cc/sparse_tensor.cc
Examining data/dynare-4.6.3/dynare++/tl/cc/ps_tensor.cc
Examining data/dynare-4.6.3/dynare++/tl/cc/permutation.cc
Examining data/dynare-4.6.3/dynare++/tl/cc/kron_prod.cc
Examining data/dynare-4.6.3/dynare++/tl/cc/fs_tensor.cc
Examining data/dynare-4.6.3/dynare++/tl/cc/pyramid_prod.cc
Examining data/dynare-4.6.3/dynare++/tl/cc/rfs_tensor.cc
Examining data/dynare-4.6.3/dynare++/tl/cc/t_polynomial.cc
Examining data/dynare-4.6.3/dynare++/tl/cc/symmetry.cc
Examining data/dynare-4.6.3/dynare++/tl/cc/pyramid_prod2.cc
Examining data/dynare-4.6.3/dynare++/tl/cc/t_container.cc
Examining data/dynare-4.6.3/dynare++/tl/cc/gs_tensor.cc
Examining data/dynare-4.6.3/dynare++/tl/cc/tensor.cc
Examining data/dynare-4.6.3/dynare++/tl/cc/stack_container.cc
Examining data/dynare-4.6.3/dynare++/tl/cc/equivalence.cc
Examining data/dynare-4.6.3/dynare++/tl/cc/normal_moments.cc
Examining data/dynare-4.6.3/dynare++/integ/testing/tests.cc
Examining data/dynare-4.6.3/dynare++/integ/cc/product.cc
Examining data/dynare-4.6.3/dynare++/integ/cc/quasi_mcarlo.cc
Examining data/dynare-4.6.3/dynare++/integ/cc/quadrature.cc
Examining data/dynare-4.6.3/dynare++/integ/cc/smolyak.cc
Examining data/dynare-4.6.3/dynare++/integ/cc/vector_function.cc
Examining data/dynare-4.6.3/dynare++/integ/src/quadrature-points.cc
Examining data/dynare-4.6.3/dynare++/utils/cc/pascal_triangle.cc
Examining data/dynare-4.6.3/dynare++/utils/cc/sthread.cc
Examining data/dynare-4.6.3/dynare++/utils/cc/int_power.cc
Examining data/dynare-4.6.3/dynare++/sylv/testing/MMMatrix.cc
Examining data/dynare-4.6.3/dynare++/sylv/testing/tests.cc
Examining data/dynare-4.6.3/dynare++/sylv/cc/SchurDecompEig.cc
Examining data/dynare-4.6.3/dynare++/sylv/cc/BlockDiagonal.cc
Examining data/dynare-4.6.3/dynare++/sylv/cc/GeneralSylvester.cc
Examining data/dynare-4.6.3/dynare++/sylv/cc/SylvMatrix.cc
Examining data/dynare-4.6.3/dynare++/sylv/cc/IterativeSylvester.cc
Examining data/dynare-4.6.3/dynare++/sylv/cc/QuasiTriangular.cc
Examining data/dynare-4.6.3/dynare++/sylv/cc/SimilarityDecomp.cc
Examining data/dynare-4.6.3/dynare++/sylv/cc/QuasiTriangularZero.cc
Examining data/dynare-4.6.3/dynare++/sylv/cc/TriangularSylvester.cc
Examining data/dynare-4.6.3/dynare++/sylv/cc/KronVector.cc
Examining data/dynare-4.6.3/dynare++/sylv/cc/SymSchurDecomp.cc
Examining data/dynare-4.6.3/dynare++/sylv/cc/SchurDecomp.cc
Examining data/dynare-4.6.3/dynare++/sylv/cc/SylvException.cc
Examining data/dynare-4.6.3/dynare++/sylv/cc/KronUtils.cc
Examining data/dynare-4.6.3/dynare++/sylv/cc/Vector.cc
Examining data/dynare-4.6.3/dynare++/sylv/cc/GeneralMatrix.cc
Examining data/dynare-4.6.3/dynare++/sylv/cc/SylvParams.cc
Examining data/dynare-4.6.3/dynare++/src/dynare_model.cc
Examining data/dynare-4.6.3/dynare++/src/planner_builder.cc
Examining data/dynare-4.6.3/dynare++/src/dynare3.cc
Examining data/dynare-4.6.3/dynare++/src/dynglob_tab.cc
Examining data/dynare-4.6.3/dynare++/src/forw_subst_builder.cc
Examining data/dynare-4.6.3/dynare++/src/nlsolve.cc
Examining data/dynare-4.6.3/dynare++/src/dynare_atoms.cc
Examining data/dynare-4.6.3/dynare++/src/main.cc
Examining data/dynare-4.6.3/dynare++/src/dynare_params.cc
Examining data/dynare-4.6.3/dynare++/src/dynglob_ll.cc

FINAL RESULTS:

data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:234:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:305:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      		  sprintf(default_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:432:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:458:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:547:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 3),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:558:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 3),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:568:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:624:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:654:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:789:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	  sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:803:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	  sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:821:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	    sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) + 10),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:835:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	    sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) + 10),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:852:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	    sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) + 10),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:866:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	    sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) + 10),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:950:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
  strcat(filename,observables ? "observables_" : "states_");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:951:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
  strcat(filename,percentiles ? "percentiles_" : "mean_");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:955:5:  [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(filename,ergodic ? "ergodic_" : "filtered_");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:958:7:  [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(filename,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1026:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1117:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1158:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1211:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1232:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1252:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1310:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1320:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1330:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1339:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	      sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_impulse_response_special.c:406:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_impulse_response_special.c:421:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) + 10),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_impulse_response_special.c:435:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) + 10),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:39:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(errmsg=(char*)dw_malloc(strlen(fmt) + strlen(id) - 1),fmt,id);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:82:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
          sprintf(errmsg=(char*)dw_malloc(strlen(fmt) + strlen(filename) - 1),fmt,filename);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:153:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(filename=(char*)dw_malloc(strlen(dir) + strlen(fmt) + strlen(tag) - 3),fmt,dir,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:303:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(header=(char*)dw_malloc(strlen(fmt) + i - 1),fmt,k);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:316:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
     sprintf(header=(char*)dw_malloc(strlen(fmt) + i - 1),fmt,k);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:553:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(id=(char*)dw_malloc(strlen(fmt) + strlen_int(j+1) - 1),fmt,j+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:566:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(id=(char*)dw_malloc(strlen(fmt) + strlen_int(j+1) - 1),fmt,j+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:579:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(id=(char*)dw_malloc(strlen(fmt) + strlen_int(j+1) - 1),fmt,j+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:593:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(id=(char*)dw_malloc(strlen(fmt) + strlen_int(j+1) - 1),fmt,j+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:602:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(id=(char*)dw_malloc(strlen(fmt) + strlen_int(j+1) - 1),fmt,j+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:845:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(idbuffer=(char*)dw_malloc(strlen(fmt)+strlen(header)+strlen_int(s+1)-3),fmt,header,s+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:856:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(idbuffer=(char*)dw_malloc(strlen(fmt)+strlen(header)+strlen_int(s+1)-3),fmt,header,s+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:867:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(idbuffer=(char*)dw_malloc(strlen(fmt)+strlen(header)+strlen_int(s+1)-3),fmt,header,s+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1063:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(fullFilename, out_tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1251:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	  fprintf(f,fmt,ElementM(A0,i,j));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1257:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	  fprintf(f,fmt,ElementM(Aplus,i,j));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1260:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(f,fmt,p->Zeta[j][p->var_states[j][s]]);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1304:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	  fprintf(f,fmt,ElementM(A0,i,j)*ElementV(i_diagonal,j));   
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1309:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	  fprintf(f,fmt,ElementM(Aplus,i,j)*ElementV(i_diagonal,j));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1312:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(f,fmt,p->Zeta[j][p->var_states[j][s]] * ElementV(s_diagonal,j));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1341:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(buffer=(char*)dw_malloc(strlen(fmt) + strlen(id) - 1),fmt,id);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1588:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(idbuffer=(char*)dw_malloc(strlen(fmt)+strlen(header)+strlen_int(s+1)-3),fmt,header,s+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1599:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(idbuffer=(char*)dw_malloc(strlen(fmt)+strlen(header)+strlen_int(s+1)-3),fmt,header,s+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1610:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(idbuffer=(char*)dw_malloc(strlen(fmt)+strlen(header)+strlen_int(s+1)-3),fmt,header,s+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio_matlab.c:32:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(errmsg=(char*)dw_malloc(strlen(fmt) + strlen(id) - 1),fmt,id);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/create_init_file.c:52:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(args[3]) - 1),fmt,args[3]);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/create_simulated_data.c:105:5:  [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(strcpy(cmd->out_tag,"constant_"),cmd->in_tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:405:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(err_msg=dw_malloc(strlen(err_fmt)+21),err_fmt,nit,*retcodeh);  // max of 24 digits total in nit and *retcodeh
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:422:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(err_msg=dw_malloc(strlen(err_fmt)+21),err_fmt,crit,*retcodeh);  // max of 24 characters total in crit and *retcodeh
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:473:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	    sprintf(err_msg=dw_malloc(strlen(err_fmt)+21),err_fmt,MAX_NUM_POSSIBLE_BADCASES,*retcodeh);  
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:903:10:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
   else  strcpy(filename_sp2vecs, filename);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_estimate.c:246:10:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      	  sprintf(header=(char*)dw_malloc(strlen(fmt) + i - 1),fmt,total_iteration);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_estimate.c:295:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(header=(char*)dw_malloc(strlen(fmt) + i - 1),fmt,total_iteration);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_estimate.c:482:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	      sprintf(filename=(char*)dw_malloc(5+strlen(info->final_output_filename)),"%s.tmp",info->final_output_filename);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_forecast.c:460:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		sprintf(buffer=(char*)dw_malloc(strlen(fmt) + 10),fmt,s);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_forecast.c:486:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		  sprintf(buffer=(char*)dw_malloc(strlen(fmt) + 10),fmt,s);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_impulse_responses.c:1275:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		sprintf(buffer=(char*)dw_malloc(strlen(fmt) + 10),fmt,s);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_impulse_responses.c:1313:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		  sprintf(buffer=(char*)dw_malloc(strlen(fmt) + 10),fmt,s);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_impulse_responses.c:1353:7:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		    printf(ergodic ? "Constructing percentiles for ergodic impulse responses - %d draws of regimes per posterior value\n"
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_variance_decomposition.c:677:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		sprintf(buffer=(char*)dw_malloc(strlen(fmt) + 10),fmt,s);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_variance_decomposition.c:718:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		  sprintf(buffer=(char*)dw_malloc(strlen(fmt) + 10),fmt,s);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1152:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1235:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,proposal_type,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1240:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(filename=(char*)dw_malloc(strlen(fmt) + 1),fmt,proposal_type);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1280:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,proposal_type,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1285:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + 1),fmt,proposal_type);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1418:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,proposal_type,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1423:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + 1),fmt,proposal_type);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1433:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,proposal_type,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1438:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + 1),fmt,proposal_type);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1450:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,proposal_type,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1455:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + 1),fmt,proposal_type);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation.c:273:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(filename_metropolis=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation.c:359:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	  sprintf(filename_hessian=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation.c:495:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation.c:577:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	  sprintf(default_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation_prior.c:171:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(filename_metropolis=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation_prior.c:279:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(default_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_sim.c:82:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_sim.c:401:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(filename_metropolis=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_sim.c:555:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_sim.c:639:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	      sprintf(default_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:529:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:750:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(trailer=(char*)dw_malloc(strlen(fmt)+strlen(idstring)-1),fmt,idstring);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:755:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(trailer=(char*)dw_malloc(strlen(fmt)+1),fmt);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:909:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(trailer=(char*)dw_malloc(strlen(fmt)+strlen(idstring)-1),fmt,idstring);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:916:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(trailer=(char*)dw_malloc(strlen(fmt)+1),fmt);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1109:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(buffer=(char*)dw_malloc(strlen(header) + strlen(format) + strlen(idstring) - 3),format,header,idstring);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1113:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	  sprintf(buffer=(char*)dw_malloc(strlen(header) + strlen(format) + strlen(idstring) - 3),format,header,"[1]");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1319:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(f_out,fmt,p[i]);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1353:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(idbuffer=(char*)dw_malloc((j=(int)strlen(idstring))+i+3),idstring);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1465:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(trailer=(char*)dw_malloc(24+strlen(idstring)),"for state_variable%s ==//",idstring);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:2247:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	  sprintf(errmsg=(char*)dw_malloc(strlen(errmsg_format)+strlen(str)-1),errmsg_format,str);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:2260:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(buffer=(char*)dw_malloc(strlen(format)+strlen(str)-1),format,str);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:2263:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(errmsg=(char*)dw_malloc(strlen(errmsg_format)+strlen(buffer)-1),errmsg_format,buffer);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:2289:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(buffer=(char*)dw_malloc(strlen(format)+strlen(str)-1),format,str);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:2403:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(buffer=(char*)dw_malloc(strlen(format)+strlen(str)+i-3),format,str,k);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:2405:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(buffer=(char*)dw_malloc(strlen(format)+i-1),format,k);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/arrays/dw_array.c:166:11:  [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.
  return (fprintf(f,format ? format : "%d ",*((int*)element)) < 0) ? 0 : 1;
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/arrays/dw_array.c:171:11:  [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.
  return (fprintf(f,format ? format : "%lf ",*((double*)element)) < 0) ? 0 : 1;
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/arrays/dw_array.c:176:11:  [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.
  return (fprintf(f,format ? format : "%f ",*((float*)element)) < 0) ? 0 : 1;
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/arrays/dw_array.c:181:11:  [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.
  return (fprintf(f,format ? format : "%c ",*((char*)element)) < 0) ? 0 : 1;
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/arrays/dw_array.c:186:11:  [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.
  return (fprintf(f,format ? format : "%s\t",(char*)element) < 0) ? 0 : 1;
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/arrays/dw_array.c:347:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(*((char**)d)=dest,*((char**)s));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_ascii.c:624:60:  [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).
  if (buffer && (rtrn=(char*)dw_malloc(strlen(buffer)+1))) strcpy(rtrn,buffer);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:201:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
      sprintf(msg=dw_malloc(strlen(fmt)+strlen(filename)-1),fmt,filename);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:271:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	    strcpy(filename_err,filename);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:303:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	    strcpy(filename_err,filename);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:3956:24:  [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.
 for (i=0; i < m; i++) fprintf(f,format,(double)(ElementV(x,i)));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:3983:26:  [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.
   for (j=0; j < n; j++) fprintf(f,format,(double)(ElementM(X,i,j)));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test.cpp:628:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(arg_string,string);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test.cpp:1471:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(name,name_string);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test_main.cpp:64:31:  [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).
  if (arg_err & ARG_ERR_NULL) strcat(arg_string,arg_string[0] ? "/null" : "null");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test_main.cpp:65:34:  [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).
  if (arg_err & ARG_ERR_GENERAL) strcat(arg_string,arg_string[0] ? "/general" : "general");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test_main.cpp:92:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	      sprintf(msg," - OK - Argument Error : %s : %s",GetErrorString(arg_err,err_string),dw_GetErrorMessage());
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test_main.cpp:97:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	      sprintf(msg," - Not OK - function should have valid return : %s",dw_GetErrorMessage());
data/dynare-4.6.3/dynare++/parser/cc/assign_tab.cc:655: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/dynare-4.6.3/dynare++/parser/cc/formula_tab.cc:715: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/dynare-4.6.3/dynare++/parser/cc/matrix_tab.cc:652: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/dynare-4.6.3/dynare++/src/dynglob_tab.cc:728: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/dynare-4.6.3/mex/sources/bytecode/testing/mex_interface.cc:48:12:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  retval = vprintf(str, args);
data/dynare-4.6.3/mex/sources/bytecode/testing/mex_interface.cc:356:11:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
          fscanf(fid, "%s", name);
data/dynare-4.6.3/mex/sources/bytecode/testing/mex_interface.cc:405:7:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
      fscanf(fid, "%s", pchar);
data/dynare-4.6.3/preprocessor/src/ModelTree.cc:2430:7:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  if (system(cmd.str().c_str()))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_estimate.c:530:30:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
			      for (j=0; j < info->random; j++)
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_estimate.h:39:7:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  int random;
data/dynare-4.6.3/dynare++/integ/src/quadrature-points.cc:74:23:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while (-1 != (ret = getopt_long(argc, argv, "", opts, &index)))
data/dynare-4.6.3/dynare++/src/dynare_params.cc:91:23:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while (-1 != (ret = getopt_long(argc, argv, "", opts, &index)))
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:110:14:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
  hinstLib = LoadLibrary(TEXT("libmwumfpack.dll"));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:215:14:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
  hinstLib = LoadLibrary(TEXT("libmwumfpack.dll"));
data/dynare-4.6.3/mex/sources/k_order_perturbation/dynamic_dll.cc:37:22:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
  dynamicHinstance = LoadLibrary(fName.c_str());
data/dynare-4.6.3/mex/sources/perfect_foresight_problem/DynamicModelCaller.cc:48:17:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
  dynamic_mex = LoadLibrary(mex_name.c_str());
data/dynare-4.6.3/preprocessor/src/ConfigFile.cc:117:11:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
      if (getenv("APPDATA") == nullptr)
data/dynare-4.6.3/preprocessor/src/ConfigFile.cc:130:32:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
          defaultConfigFile += getenv("APPDATA");
data/dynare-4.6.3/preprocessor/src/ConfigFile.cc:134:11:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
      if (getenv("HOME") == nullptr)
data/dynare-4.6.3/preprocessor/src/ConfigFile.cc:146:32:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
          defaultConfigFile += getenv("HOME");
data/dynare-4.6.3/preprocessor/src/ModelTree.cc:2343:72:  [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.
          string newpath = "PATH=" + mingwpath.string() + ';' + string{getenv("PATH")};
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_MSStateSpace.c:1174:28:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  f_out=f ? f : filename ? fopen(filename,"wt") : (FILE*)NULL;
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:77:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (f_in=fopen(filename,"rt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:147:59:  [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 ((i+1 < nargs) && dw_IsInteger(args[i+1]) && ((n=atoi(args[i+1])) > 0) && (i+1+n < nargs))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:235: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 (!(f_start=fopen(filename,"wt")))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:323:21:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      		  if (f_out=fopen(filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:433: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).
      f_out=fopen(out_filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:459: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).
      f_out=fopen(out_filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:524:57:  [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 ((i+1 < nargs) && dw_IsInteger(args[i+1]) && ((n=atoi(args[i+1])) > 0) && (i+1+n < nargs))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:548: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).
      	f_out=fopen(out_filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:559: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).
      	f_out=fopen(out_filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:569: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).
      	f_out=fopen(out_filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:625: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).
      f_out=fopen(out_filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:655: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).
      f_out=fopen(out_filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:755:57:  [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 ((i+1 < nargs) && dw_IsInteger(args[i+1]) && ((n=atoi(args[i+1])) > 0) && (i+1+n < nargs))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:790:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	  f_out=fopen(out_filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:804:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	  f_out=fopen(out_filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:822: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).
	    f_out=fopen(out_filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:836: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).
	    f_out=fopen(out_filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:853: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).
	    f_out=fopen(out_filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:867: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).
	    f_out=fopen(out_filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:940:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char filename[1024];
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:949:3:  [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(filename,"vd_");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:953: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(filename+strlen(filename),"regime%d_",regime);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:959:7:  [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(filename,".out");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:967: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 (f_out=fopen(filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1017: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 (!(f_posterior=fopen(filename,"rt")))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1027: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 (!(f_posterior=fopen(filename,"rt")))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1118:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  f_out=fopen(out_filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1159:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  f_out=fopen(out_filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1212: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 (f_out=fopen(out_filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1233: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 (f_out=fopen(out_filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1253: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 (f_out=fopen(out_filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1340: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 (f_out=fopen(filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_impulse_response_special.c:380:57:  [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 ((i+1 < nargs) && dw_IsInteger(args[i+1]) && ((n=atoi(args[i+1])) > 0) && (i+1+n < nargs))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_impulse_response_special.c:407: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).
      f_out=fopen(out_filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_impulse_response_special.c:422:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	f_out=fopen(out_filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_impulse_response_special.c:436:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	f_out=fopen(out_filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/fwz_msv_msre.c:135:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(pElementM(W0),pElementV(z)+k*s*(ns),s*(ns)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/fwz_msv_msre.c:176:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(pElementV(g)+j*s*(n-s),pElementM(W0),s*(n-s)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/fwz_msv_msre.c:195: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(pElementM(W0),pElementV(z)+k*s*(ns),s*(ns)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:1080: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(&ElementM(A0,0,j),pElementV(p->A0[j][p->A0_column_states[j][k]]),p->nvars*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:1089:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(&ElementM(A0,0,j),pElementV(p->A0[j][p->A0_column_states[j][k]]),p->nvars*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:1114:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(&ElementM(A0,0,i),pElementV(p->A0[i][p->A0_column_states[i][s]]),p->nvars*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:2302:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(pElementV(p->Aplus[j][k]) + p->nvars,pElementV(p->bplus[j][k]) + p->nvars,(p->npre - p->nvars)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:2330:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(pElementV(p->Aplus[j][k]),pElementV(p->A0[j][k]),p->nvars*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:2445:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(p_bplus+i,p_Aplus+i,(p->npre - p->nvars)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:2490:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(p_psi,p_bplus,dim*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:2566:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pElementV(x),pElementV(y),p->nvars*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:3008: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(pElementV(p->b0[j][k]),f,DimV(p->b0[j][k])*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:3020:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	      memcpy(pElementV(p->lambda[j][k]),f,DimV(p->lambda[j][k])*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:3028:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(pElementV(p->psi[j]),f,DimV(p->psi[j])*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:3039:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	      memcpy(pElementV(p->bplus[j][k]),f,DimV(p->bplus[j][k])*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:3056:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(p->Zeta[j]+1,f,(dw_DimA(p->Zeta[j])-1)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:3079: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(f,pElementV(p->b0[j][k]),DimV(p->b0[j][k])*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:3089:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(f,pElementV(p->lambda[j][k]),DimV(p->lambda[j][k])*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:3096:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(f,pElementV(p->psi[j]),DimV(p->psi[j])*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:3107:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	      memcpy(f,pElementV(p->bplus[j][k]),DimV(p->bplus[j][k])*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:3115:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(f,p->Zeta[j]+1,(dw_DimA(p->Zeta[j])-1)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:3435: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(pElementM(A0)+j*n,pElementV(p->A0[j][p->A0_column_states[j][k]]),n*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:3662:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&ElementM(X,0,j),pElementV(Y[j][(k < dw_DimA(Y[j])) ? k : 0]),i);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:3692: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(&ElementM(A0,0,j),pElementV(p->A0[j][p->coef_states[j][s]]),p->nvars*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:3752:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&ElementM(Aplus,0,j),pElementV(p->Aplus[j][p->coef_states[j][k]]),p->npre*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:4139:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char filename[256];
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARbase.c:4147:7:  [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(filename,"singular_error_%03d_test.dat",_VAR_IMPROPER_DISTRIBUTION_COUNTER);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:80: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 (!(f=fopen(filename,"rt")))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:174:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(fullpath=(char*)dw_malloc(n+2),path,n);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:292:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if (!(f_in=fopen(filename,"rt")))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1064:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
  strcat(fullFilename, ".mat");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1547:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(p_psi,p_bplus,dim*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio_matlab.c:283:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if (!(f_in=fopen(filename,"rt")))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio_matlab.c:348:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if (!(f_in=fopen(filename,"rt")))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/create_simulated_data.c:105:12:  [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.
		  strcat(strcpy(cmd->out_tag,"constant_"),cmd->in_tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/create_simulated_data.c:109:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	    if (f_out=fopen(filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:139: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 filename_sp2vecs[STRLEN];  //Two vectors.  1st row: numerical gradient; 2nd row: vectorized parameters.
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:173:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(x[0],xh,n*sizeof(double));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:232: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(Hcliff,H,nn*sizeof(double));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:257:22:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                     memcpy(x[3],x[0],n*sizeof(double));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:278:19:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                  memcpy(x[3],x[0],n*sizeof(double));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:284:16:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
               memcpy(x[3],x[0],n*sizeof(double));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:316:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
         memcpy(xh,x[3],n*sizeof(double));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:317:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
         memcpy(gh,g[3],n*sizeof(double));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:325:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
         memcpy(xh,x[2],n*sizeof(double));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:326:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
         memcpy(gh,g[2],n*sizeof(double));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:334:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
         memcpy(xh,x[1],n*sizeof(double));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:335:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
         memcpy(gh,g[1],n*sizeof(double));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:348:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
         memcpy(xh,x[ih],n*sizeof(double));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:385: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 ( !(fptr_interesults = fopen(filename_sp2vecs,"wt")) ) {
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:484:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(x[0],xh,n*sizeof(double));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:485:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(g[0],gh,n*sizeof(double));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:491:30:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   if ( !(fptr_interesults = fopen(filename_sp2vecs,"wt")) ) {
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:635:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
   memcpy(xhat, x0, n*sizeof(double));    //Iskander's original code does not have this line, which is a major bug. Corrected by TZ.
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:691: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(xhat,dxtest,n*sizeof(double));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:896:21:  [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.
   if (!filename)   sprintf(filename_sp2vecs, "outdata5csminwel.prn");  //Default filename.
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_estimate.c:629: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 (f_free = fopen(filename, "wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_estimate.c:643: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 (f_out=fopen(filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_estimate.c:652: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 (f_out=fopen(filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_estimate.c:672: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 (f_out=fopen(filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_forecast.c:396:29:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	      if (!(posterior_file=fopen(post,"rt")))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_forecast.c:436:58:  [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 ((i+1 < nargs) && dw_IsInteger(args[i+1]) && ((n=atoi(args[i+1])) > 0) && (i+1+n < nargs))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_forecast.c:463: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 (f_out=fopen(out_filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_forecast.c:489: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 (f_out=fopen(out_filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_forecast.c:515: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 (f_out=fopen(out_filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_historical_decomposition.c:90:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(pElementV(cx[i]),pElementV(cy[i]),p->nvars*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_historical_decomposition.c:119:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(pElementV(cx[i]),pElementV(cy[i]),p->nvars*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_historical_decomposition.c:325: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 (f_out=fopen(out_filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_historical_decomposition.c:342: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 (f_out=fopen(out_filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_historical_decomposition.c:354: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 (f_out=fopen(out_filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_impulse_responses.c:749:30:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    { if (COEF_PROCESS >= 0) memcpy(N,coef_idx,model->sv->nstates*sizeof(int)); }
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_impulse_responses.c:752:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(N,var_idx,model->sv->nstates*sizeof(int));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_impulse_responses.c:942:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(pElementV(tmp),pElementV(IR[i][j]),k*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_impulse_responses.c:1203:29:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	      if (!(posterior_file=fopen(post,"rt")))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_impulse_responses.c:1248:58:  [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 ((i+1 < nargs) && dw_IsInteger(args[i+1]) && ((n=atoi(args[i+1])) > 0) && (i+1+n < nargs))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_impulse_responses.c:1278: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 (f_out=fopen(out_filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_impulse_responses.c:1316: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 (f_out=fopen(out_filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_impulse_responses.c:1351: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 (f_out=fopen(out_filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_simulate.c:156:63:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	      if ((i+1 >= nargs) || ((model->reject_degenerate_draws=atoi(args[i+1])) <= 0)) model->reject_degenerate_draws=100;
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_simulate.c:157:63:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	      if ((i+2 >= nargs) || ((model->degenerate_draws_cutoff=atoi(args[i+2])) <= 0)) model->degenerate_draws_cutoff=1;
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_simulate.c:169:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		f_free=fopen(filename,"rt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_simulate.c:181: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).
		  f_flat=fopen(filename,"rt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_simulate.c:202: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 (f_flat=fopen(filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_simulate.c:212:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	      f_flat=fopen(filename,append ? "at" : "wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_simulate.c:222: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).
	      f_free=fopen(filename,append ? "at" : "wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_simulate.c:233:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	  f_info=fopen(filename,append ? "at" : "wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_simulate.c:283: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).
	  f_debug=fopen("debug.out","wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_variance_decomposition.c:619:60:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	      if ((i+1 < nargs) && dw_IsInteger(args[i+1]) && ((n=atoi(args[i+1])) > 0) && (i+1+n < nargs))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_variance_decomposition.c:649:29:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	      if (!(posterior_file=fopen(post,"rt")))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_variance_decomposition.c:680: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 (f_out=fopen(out_filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_variance_decomposition.c:721: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 (f_out=fopen(out_filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_variance_decomposition.c:772: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 (f_out=fopen(out_filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_dirichlet_restrictions.c:150:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(new_restrictions,restrictions,sizeof(TDirichletRestrictions));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_dirichlet_restrictions.c:160:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(new_restrictions->B,restrictions->B,restrictions->total_Dirichlet_parameters*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_dirichlet_restrictions.c:171:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(new_restrictions->Prior_B,restrictions->Prior_B,restrictions->total_Dirichlet_parameters*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_dirichlet_restrictions.c:434:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(restrictions->B,restrictions->Prior_B,restrictions->total_Dirichlet_parameters*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_dirichlet_restrictions.c:479:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(restrictions->B,restrictions->Prior_B,restrictions->total_Dirichlet_parameters*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_dirichlet_restrictions.c:705: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(restrictions->b[i],q,k*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_dirichlet_restrictions.c:747: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(q,restrictions->b[i],k*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_equi_energy_simulation.c:100:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(equi->new_draw,p->data,equi->n*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:433:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(pElementV(theta),x+2,ntheta*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:448:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	      memcpy(pElementV(b)+k,x+n,(dirichlet_dims[j]-1)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:567:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(pElementV(theta),x+2,ntheta*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1001:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(dirichlet_dims,((TDirichletRestrictions*)(sv->info))->DirichletDim,n*sizeof(int));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1028:21:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if (f_out=f ? f : fopen(filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1143: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 (!(f_in=fopen(filename,"rt"))) 
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1153: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 (!(f_in=fopen(filename,"rt"))) 
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1243:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  f_out=fopen(out_filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1425: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).
      f_out=fopen(filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1440: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).
      f_out=fopen(filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1457: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).
      f_out=fopen(filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_block.c:712:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(dims,metropolis->block_dims,n_blocks*sizeof(int));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_block.c:762:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(dims=(int*)dw_malloc(n_blocks*sizeof(int)),metropolis->block_dims,n_blocks*sizeof(int));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation.c:192: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 (!(f_out=fopen(filename,"wt")))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation.c:362:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      if (f_in=fopen(filename_hessian,"rt"))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation.c:496: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 (!(f_start=fopen(filename,"wt")))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation.c:579:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	  f_out=fopen(filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation_prior.c:281: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).
      f_out=fopen(filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_theta.c:777:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(dims,metropolis->block_dims,n_blocks*sizeof(int));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_theta.c:839:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(dims=(int*)dw_malloc(n_blocks*sizeof(int)),metropolis->block_dims,n_blocks*sizeof(int));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch.c:66: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(pRoutines,routines,sizeof(QRoutines));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch.c:406:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(sv->index[i],sv->index[i+1],sv->n_state_variables*sizeof(int));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch.c:1455:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(q,model->q,model->sv->nfree*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch.c:1470:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(model->q,q,model->sv->nfree*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch.c:2197:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(model->q,f,model->sv->nfree*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch.c:2204:29:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if (model->sv->nfree > 0) memcpy(f,model->q,model->sv->nfree*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_opt.c:137: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  option_string[256];
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_opt.c:184: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(option_string,"Optimality tolerance = %le",tolerance);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_opt.c:186: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(option_string,"Major iterations limit = %d",max_iteration);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_opt.c:360:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(x,parameters+offset,length*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_sim.c:153:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(dims=(int*)dw_malloc(n_blocks*sizeof(int)),model->metropolis_theta->block_dims,n_blocks*sizeof(int));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_sim.c:318: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 (!(f_out=fopen(filename,"wt")))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_sim.c:556: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 (!(f_start=fopen(filename,"wt")))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_sim.c:641: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).
	      f_out=fopen(filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_sim.c:645: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).
	    f_out=fopen(filename=dw_ParseString_String(n_args,args,"fo","simulation.out"),"wt");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:53: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).
  FILE *f_in=f ? f : filename ? fopen(filename,"rt") : (FILE*)NULL;
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:76:34:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE *f_out=f ? f : filename ? fopen(filename,"at") : (FILE*)NULL;
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:100: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).
  FILE *f_in=f ? f : filename ? fopen(filename,"rt") : (FILE*)NULL;
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:149:34:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE *f_out=f ? f : filename ? fopen(filename,"at") : (FILE*)NULL;
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:176: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).
  FILE *f_in=f ? f : filename ? fopen(filename,"rt") : (FILE*)NULL;
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:201:34:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE *f_out=f ? f : filename ? fopen(filename,"at") : (FILE*)NULL;
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:230:31:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if (f_in=f ? f : filename ? fopen(filename,"rt") : (FILE*)NULL)
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:270:32:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if (f_out=f ? f : filename ? fopen(filename,"at") : (FILE*)NULL)
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:308: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).
  FILE *f_in=f ? f : filename ? fopen(filename,"rt") : (FILE*)NULL;
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:337: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).
  FILE *f_in=f ? f : filename ? fopen(filename,"rt") : (FILE*)NULL;
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:370:34:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (f_out=f ? f : filename ? fopen(filename,"at") : (FILE*)NULL)
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:402:32:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      f_out=f ? f : filename ? fopen(filename,"at") : (FILE*)NULL;
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:431:32:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      f_out=f ? f : filename ? fopen(filename,"at") : (FILE*)NULL;
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:447: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).
  FILE *f_in=f ? f : filename ? fopen(filename,"at") : (FILE*)NULL;
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:471:34:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE *f_out=f ? f : filename ? fopen(filename,"at") : (FILE*)NULL;
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:611:31:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if (f_in=f ? f : filename ? fopen(filename,"rt") : (FILE*)NULL)
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:680:32:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if (f_out=f ? f : filename ? fopen(filename,"at") : (FILE*)NULL)
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1356:4:  [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(idbuffer+j,"[%d]",i+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1467:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(trailer=(char*)dw_malloc(5),"==//");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1511:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(trailer=(char*)dw_malloc(27),"for state_variable[1] ==//",27);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1627:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!(f_in=fopen(filename,"rt")))
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:2407: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(buffer=(char*)dw_malloc(i+1),"%d",k);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/arrays/dw_array.c:294:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(d,s,dw_DimA(s)*dw_ElementSizeA(s));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/arrays/dw_array.c:494:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy((void*)(((char*)a) + i),x,size);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_ascii.c:37:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE *f=fopen(filename,"rt");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_ascii.c:49:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE *f=fopen(filename,"wt");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_ascii.c:62:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE *f=fopen(filename,"at");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_ascii.c:79:34:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE *f_in=f ? f : (filename ? fopen(filename,"rt") : (FILE*)NULL);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_ascii.c:217:29:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      if (head->length > 0) memcpy(v[k],head->string,head->length);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_ascii.c:283:22:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE *f_in=f ? f : fopen(filename,"rt");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_ascii.c:314: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 format[4];
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_ascii.c:359:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(x,y,j*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_ascii.c:406:22:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE *f_in=f ? f : fopen(filename,"rt");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_parse_cmd.c:51:69:  [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 ((i != -1) && (i+1 < nargs) && dw_IsInteger(args[i+1])) return atoi(args[i+1]);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_parse_cmd.c:106:69:  [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 ((i != -1) && (i+1 < nargs) && dw_IsInteger(args[i+1])) return atoi(args[i+1]);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/elliptical/dw_elliptical.c:84:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pElementV(elliptical->draw),draw,elliptical->dim*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/elliptical/dw_elliptical.c:160: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(draw,pElementV(elliptical->draw),elliptical->dim*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/elliptical/dw_elliptical.c:270: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(draw,pElementV(elliptical->draw),elliptical->dim*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/elliptical/dw_elliptical.c:332: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(draw,pElementV(elliptical->draw),elliptical->dim*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/elliptical/dw_elliptical.c:547: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(draw,pElementV(elliptical->draw),elliptical->dim*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/elliptical/dw_elliptical.c:607:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(data->t,table,(m+1)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/elliptical/dw_elliptical_test.c:159: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).
  f_out=cummulative ? fopen("cummulative.csv","wt") : stdout;
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:25:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char ERROR_MESSAGE[ERROR_MESSAGE_BUFFER_LENGTH]="";
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:95:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(ERROR_MESSAGE,"Unknown error.");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:102:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(ERROR_MESSAGE,"Out of memory.");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:105: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(ERROR_MESSAGE,"File operation error.");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:108:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(ERROR_MESSAGE,"Unable to open/create file.");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:111:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(ERROR_MESSAGE,"Unable to read/write to file.");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:114:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(ERROR_MESSAGE,"Error parsing data.");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:117:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(ERROR_MESSAGE,"Floating point error.");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:120:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(ERROR_MESSAGE,"Unexpected null pointer encountered.");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:123:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(ERROR_MESSAGE,"Argument error.");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:126:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(ERROR_MESSAGE,"Maximum iteration limit exceeded.");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:129:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(ERROR_MESSAGE,"Feature not yet implemented.");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:132:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(ERROR_MESSAGE,"Matrices/vectors not conformable.");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:135:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(ERROR_MESSAGE,"Singular matrix.");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:138:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(ERROR_MESSAGE,"Matrix not positive definite.");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:141:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(ERROR_MESSAGE,"Blas/Lapack error.");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:144: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(ERROR_MESSAGE,"Undocumented error.");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:151:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(ERROR_MESSAGE,"Unknown error.");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:268: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 (f_err=fopen(filename,"wt"))
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:300: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 (f_err=fopen(filename,"at"))
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:628: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(pa,a,m*m*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:884:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(x+p[j]*m,y+j*m,m*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:887:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(x+j*m,y+p[j]*m,m*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:1109: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(A_,A,m*n*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:1296:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      	  memcpy(ptr,X,m*p*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:1371:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      	    memcpy(ptr,X,m*n*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:1503:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(S,A,n*n*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:1511:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(T,B,n*n*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:1629:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(SS,S,n*n*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:1637:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(TT,T,n*n*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:1647:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	      memcpy(QQ,Q,n*n*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:1659:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(ZZ,Z,n*n*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:1780:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(SS,S,n*n*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:1788:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(TT,T,n*n*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:1797: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(QQ,Q,n*n*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:1806: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(ZZ,Z,n*n*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:2021: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(tmp,x,n*n*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:2090: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(tmp,x,n*n*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:2113:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(imvec+k-n,revec+k,n*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:2115:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(revec+k,revec+k-n,n*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/bmatrix.c:2167:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(A,x,n*n*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:386: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(pElementV(x),pElementV(y),DimV(y)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:423:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pElementM(X),pElementM(Y),RowM(Y)*ColM(Y)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:558: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(pElementM(X),pElementV(y),DimV(y)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:593: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(pElementM(X),pElementV(y),DimV(y)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:794:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pElementM(X),pElementM(Y),RowM(Y)*ColM(Y)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:847:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(pElementM(X),&ElementM(Y,0,bcol),rows*cols*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:850:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(&ElementM(X,0,j),&ElementM(Y,brow,bcol+j),s);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:855:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(pElementM(X),&ElementM(Y,brow,0),rows*cols*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:858:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(&ElementM(X,j,0),&ElementM(Y,brow+j,bcol),s);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:916: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(pElementV(x),pElementV(y)+b,d*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:956:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(&ElementM(X,0,bcol_X),&ElementM(Y,0,bcol_Y),rows*cols*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:959:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(&ElementM(X,brow_X,bcol_X+j),&ElementM(Y,brow_Y,bcol_Y+j),s);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:964:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(&ElementM(X,brow_X,0),&ElementM(Y,brow_Y,0),rows*cols*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:967:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(&ElementM(X,brow_X+i,bcol_X),&ElementM(Y,brow_Y+i,bcol_Y),s);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:1005: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(pElementM(X)+col*DimV(y),pElementV(y),DimV(y)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:1041: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(pElementM(X)+row*DimV(y),pElementV(y),DimV(y)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:1085: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(pElementV(x),&ElementM(Y,0,col),DimV(x)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:1133: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(pElementV(x),pElementM(Y)+row*DimV(x),DimV(x)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:1410:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(ptr,pElementM(X),RowM(X)*ColM(X)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:1458:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(ptr,pElementV(x),DimV(x)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:1505:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(ptr,pElementV(x),DimV(x)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:1552:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(ptr,pElementM(X),RowM(X)*ColM(X)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:1600:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(ptr,pElementM(X),RowM(X)*ColM(X)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:1744:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
       memcpy(pElementV(x),ptr,DimV(x)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:1803:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(pElementV(x),ptr,DimV(x)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:1862:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(pElementM(X),ptr,RowM(X)*ColM(X)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:1921:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(ptr,pElementM(Z),RowM(Z)*ColM(Z)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:1926:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pElementM(X),pElementM(Y),RowM(Y)*ColM(Y)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:1984:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(ptr,pElementM(Z),RowM(Z)*ColM(Z)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:1989:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pElementM(X),pElementM(Y),RowM(Y)*ColM(Y)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:2047:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(ptr,pElementM(Y),RowM(Y)*ColM(Y)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:2052:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pElementM(X),pElementM(Z),RowM(Z)*ColM(Z)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:2110:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(ptr,pElementM(Y),RowM(Y)*ColM(Y)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:2115:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pElementM(X),pElementM(Z),RowM(Z)*ColM(Z)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:2180:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
       memcpy(pElementM(X),ptr,RowM(X)*ColM(X)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:2240:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
       memcpy(pElementM(X),ptr,RowM(X)*ColM(X)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:2412:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(pY,pElementM(Y),RowM(Y)*RowM(Y)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:2465:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(pY,pElementM(Y),RowM(Y)*RowM(Y)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:2518:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(pY,pElementM(Y),RowM(Y)*RowM(Y)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:2689:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(pZ,pElementM(Z),RowM(Z)*RowM(Z)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:2742:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(pZ,pElementM(Z),RowM(Z)*RowM(Z)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:2795:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(pZ,pElementM(Z),RowM(Z)*RowM(Z)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:2850:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
           memcpy(LU,pElementM(Y),RowM(Y)*RowM(Y)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:2976:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(ptr,pElementM(Y),RowM(Y)*RowM(Y)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:2985:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
             memcpy(pElementM(rtrn),ptr,RowM(Y)*RowM(Y)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:3042:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(ptr,pElementM(T),RowM(T)*RowM(T)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:3111:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(ptr,pElementM(T),RowM(T)*RowM(T)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:3211:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pElementM(ReX),ptr1,RowM(ReX)*ColM(ReX)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:3216:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pElementM(ImX),ptr2,RowM(ReX)*ColM(ReX)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:3438:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	      memcpy(LU,pElementM(X),RowM(X)*RowM(X)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:3494:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
           memcpy(LU,pElementM(X),RowM(X)*RowM(X)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:3716:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	      memcpy(pElementM(rtrn),v+(ColM(X)*rank),ColM(X)*(ColM(X)-rank)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:3841: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(pElementV(x),pElementM(Y),RowM(Y)*ColM(Y)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:3883: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(pElementM(X),pElementV(y),rows*cols*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:4675:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(pElementM(U),pElementM(X),RowM(X)*RowM(X)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:4737:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(pElementM(L),pElementM(X),RowM(X)*RowM(X)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:4796:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(ptr,pElementM(X),RowM(X)*ColM(X)*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:5050:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(x,pElementM(X),n*n*sizeof(PRECISION));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/matrix/dw_matrix.c:5320:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
     memcpy(pElementP(X),pElementP(Y),UseP(Y)*sizeof(int));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c:373:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    { memcpy(y,x+p,s); memcpy(x+p,x,s); memcpy(x,y,s); }
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c:373:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    { memcpy(y,x+p,s); memcpy(x+p,x,s); memcpy(x,y,s); }
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c:373:42:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    { memcpy(y,x+p,s); memcpy(x+p,x,s); memcpy(x,y,s); }
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c:381:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(y,x+j-idx,s); memcpy(x+j-idx,x+k-idx,s); memcpy(x+k-idx,y,s);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c:381:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(y,x+j-idx,s); memcpy(x+j-idx,x+k-idx,s); memcpy(x+k-idx,y,s);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c:381:52:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(y,x+j-idx,s); memcpy(x+j-idx,x+k-idx,s); memcpy(x+k-idx,y,s);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c:397:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(y,x+j-idx,s);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c:398:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(x+j-idx,x+j-m-idx,s);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c:403:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(x+k+m-idx,x+k-idx,s);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c:404:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(x+k+m-idx,y,s);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c:441:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    { memcpy(y,x+p,s); memcpy(x+p,x,s); memcpy(x,y,s); }
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c:441:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    { memcpy(y,x+p,s); memcpy(x+p,x,s); memcpy(x,y,s); }
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c:441:42:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    { memcpy(y,x+p,s); memcpy(x+p,x,s); memcpy(x,y,s); }
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c:449:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(y,x+j-idx,s); memcpy(x+j-idx,x+k-idx,s); memcpy(x+k-idx,y,s);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c:449:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(y,x+j-idx,s); memcpy(x+j-idx,x+k-idx,s); memcpy(x+k-idx,y,s);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c:449:52:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(y,x+j-idx,s); memcpy(x+j-idx,x+k-idx,s); memcpy(x+k-idx,y,s);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c:465:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(y,x+j-idx,s);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c:466:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(x+j-idx,x+j-m-idx,s);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c:471:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(x+k+m-idx,x+k-idx,s);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/sort/dw_matrix_sort.c:472:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(x+k+m-idx,y,s);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/stat/dw_rand_gsl.c:87:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(rtrn,state,size);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/stat/dw_rand_gsl.c:113:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(state,new_state,size);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test.cpp:59:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(args->GetActualSizes(),args->GetCorrectSizes(),args->GetNumberSizes()*sizeof(int));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test.cpp:715:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(test_sizes[i],ts[i],(ts[i][0]+1)*sizeof(int));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test.cpp:731:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(test_sizes[i]+1,ts,nts*sizeof(int));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test_instances.cpp:2620:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  memcpy(select=(int*)dw_malloc(n*sizeof(int)),COPY(TArg_pInteger,8),n*sizeof(int));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test_instances.cpp:2993:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(COPY(TArg_pInteger,1),p,k*sizeof(int));
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test_main.cpp:47:7:  [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(msg," - Not OK - Error : %le",err);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test_main.cpp:53:2:  [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(msg," - OK - Correct to square root machine epsilon : %le",err);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test_main.cpp:55:2:  [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(msg," - OK - Correct to machine epsilon : %le",err);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test_main.cpp:63:31:  [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.
  if (arg_err & ARG_ERR_SIZE) strcat(arg_string,"size");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test_main.cpp:73: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 msg[512], err_string[128];
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test_main.cpp:83:4:  [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(msg," - Not OK - pointer argument improperly changed");
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test_main.cpp:264:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char ch[256], *filename, *fnct_name, *cfilename;
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test_main.cpp:283:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  out.open(filename);
data/dynare-4.6.3/dynare++/parser/cc/assign_tab.cc:946: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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
data/dynare-4.6.3/dynare++/parser/cc/assign_tab.cc:1152: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/dynare-4.6.3/dynare++/parser/cc/formula_tab.cc:1006: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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
data/dynare-4.6.3/dynare++/parser/cc/formula_tab.cc:1212: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/dynare-4.6.3/dynare++/parser/cc/matrix_tab.cc:943: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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
data/dynare-4.6.3/dynare++/parser/cc/matrix_tab.cc:1149: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/dynare-4.6.3/dynare++/src/dynglob_tab.cc:1019: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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
data/dynare-4.6.3/dynare++/src/dynglob_tab.cc:1225: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/dynare-4.6.3/dynare++/src/main.cc:85:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      mfd.open(mfile2, std::ios::out | std::ios::trunc);
data/dynare-4.6.3/dynare++/sylv/cc/SylvParams.cc:165: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.
  const char *names[50];
data/dynare-4.6.3/mex/sources/bytecode/Interpreter.cc:459:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(y_save, y, y_size*sizeof(double)*(periods+y_kmax+y_kmin));
data/dynare-4.6.3/mex/sources/bytecode/Interpreter.cc:477:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(y, y_save, y_size*sizeof(double)*(periods+y_kmax+y_kmin));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:533: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).
        SaveCode.open(file_name + "/model/bytecode/static.bin", ios::in | ios::binary);
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:535: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).
        SaveCode.open(file_name + "/model/bytecode/dynamic.bin", ios::in | ios::binary);
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:1629:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(tmp_Ap_tild, Host_Ap_tild, (Size + 1) * sizeof(int));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:1630:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(tmp_Ai_tild, Host_Ai_tild, NZE_tild * sizeof(int));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:1631:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(tmp_A_tild, Host_A_tild, NZE_tild * sizeof(double));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:2437:14:  [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).
  SaveResult.open(out.str().c_str(), ios::in);
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:6411:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(Ap_save, Ap, (size + 1) * sizeof(SuiteSparse_long));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:6412:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(Ai_save, Ai, Ap[size] * sizeof(SuiteSparse_long));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:6413:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(Ax_save, Ax, Ap[size] * sizeof(double));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:6414:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(b_save, b, size * sizeof(double));
data/dynare-4.6.3/mex/sources/bytecode/bytecode.cc:352:27:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                  block = atoi(Get_Argument(prhs[i]).substr(pos, string::npos).c_str())-1;
data/dynare-4.6.3/mex/sources/bytecode/bytecode.cc:441: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 *plhs[1];
data/dynare-4.6.3/mex/sources/bytecode/bytecode.cc:442:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  load_global((char *) prhs[1]);
data/dynare-4.6.3/mex/sources/bytecode/bytecode.cc:729: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.
              char name[100];
data/dynare-4.6.3/mex/sources/bytecode/bytecode.cc:747: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.
              char name[100];
data/dynare-4.6.3/mex/sources/bytecode/bytecode.cc:807: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.
              char name[100];
data/dynare-4.6.3/mex/sources/bytecode/bytecode.cc:825: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.
              char name[100];
data/dynare-4.6.3/mex/sources/bytecode/testing/mex_interface.cc:197:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          char *p = (char *) matrix_rhs[0]->data;
data/dynare-4.6.3/mex/sources/bytecode/testing/mex_interface.cc:306:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(Array->data, array->data, Size);
data/dynare-4.6.3/mex/sources/bytecode/testing/mex_interface.cc:319:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(Array->data, array->data, Size);
data/dynare-4.6.3/mex/sources/bytecode/testing/mex_interface.cc:322:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(Array->Ir, array->Ir, Size);
data/dynare-4.6.3/mex/sources/bytecode/testing/mex_interface.cc:325:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(Array->Jc, array->Jc, Size);
data/dynare-4.6.3/mex/sources/bytecode/testing/mex_interface.cc:330:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(Array->data, array->data, Size);
data/dynare-4.6.3/mex/sources/bytecode/testing/mex_interface.cc:355: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.
          char name[512];
data/dynare-4.6.3/mex/sources/bytecode/testing/mex_interface.cc:402: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 pchar[size_2+1];
data/dynare-4.6.3/mex/sources/bytecode/testing/mex_interface.cc:448:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fid = fopen(tmp_out.str().c_str(), "r");
data/dynare-4.6.3/mex/sources/bytecode/testing/mex_interface.cc:460:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fid = fopen(tmp_out.str().c_str(), "r");
data/dynare-4.6.3/mex/sources/bytecode/testing/mex_interface.cc:472:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fid = fopen(tmp_out.str().c_str(), "r");
data/dynare-4.6.3/mex/sources/k_order_perturbation/k_order_perturbation.cc:241: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.
        const char *g_fieldnames_c[kOrder+1];
data/dynare-4.6.3/mex/sources/k_order_perturbation/tests/k_order_test_main.cc:241:28:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      if (NULL == (matfd = fopen(matfile.c_str(), "wb")))
data/dynare-4.6.3/preprocessor/src/ConfigFile.cc:150: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).
      configFile.open(defaultConfigFile, fstream::in);
data/dynare-4.6.3/preprocessor/src/ConfigFile.cc:162: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).
      configFile.open(config_file, fstream::in);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:504:14:  [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).
      output.open(tmp1_output.str(), ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:973:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  code_file.open(main_name, ios::out | ios::binary | ios::ate);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:1242:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  code_file.open(main_name, ios::out | ios::binary | ios::ate);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:1703:21:  [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).
  mDynamicModelFile.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:1746:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  mDynamicMexFile.open(filename_mex, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:1895:14:  [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).
    SaveCode.open(filename, ios::out | ios::in | ios::binary | ios::ate);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:1897:14:  [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).
    SaveCode.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:1949:21:  [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).
  mDynamicModelFile.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:2280:10:  [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).
  output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:2330:10:  [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).
  output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:2367:10:  [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).
  output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:2412:10:  [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).
  output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:2662:14:  [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).
      output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:2916: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).
      exclude_file.open(inc_exc_eq_tags, ifstream::in);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:3513:25:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
          KF_index_file.open(main_name, ios::out | ios::binary | ios::ate);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:5488:10:  [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).
  output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:6179: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).
  paramsDerivsFile.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:6817:21:  [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).
      checksum_file.open(filename, ios::in | ios::binary);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:6829:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  checksum_file.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/DynareBison.cc:9064: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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
data/dynare-4.6.3/preprocessor/src/DynareFlex.cc:8624:59:  [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).
                  yylloc->begin.line = yylloc->end.line = atoi(yytext) - 1;
data/dynare-4.6.3/preprocessor/src/ModFile.cc:880:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      mOutputFile.open(fname, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/ModFile.cc:1177: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).
      jlOutputFile.open(fname, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/ModFile.cc:1441:26:  [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).
          jsonOutputFile.open(fname, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/ModFile.cc:1462:30:  [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).
              jsonOutputFile.open(fname, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/ModFile.cc:1483:30:  [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).
              jsonOutputFile.open(fname, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/ModFile.cc:1560:14:  [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).
  jsonOutput.open(fname, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/ModelEquationBlock.cc:147:10:  [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).
  output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/ModelEquationBlock.cc:154: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).
  content_output.open(content_filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/ModelEquationBlock.cc:195:10:  [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).
  output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/ModelEquationBlock.cc:395:10:  [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).
  output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/ModelEquationBlock.cc:434:10:  [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).
  output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/ModelTree.cc:1491:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      if (open > 32)
data/dynare-4.6.3/preprocessor/src/ModelTree.cc:1580:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      if (open > 32)
data/dynare-4.6.3/preprocessor/src/ModelTree.cc:1781:14:  [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).
    SaveCode.open(filename, ios::out | ios::in | ios::binary | ios::ate);
data/dynare-4.6.3/preprocessor/src/ModelTree.cc:1783:14:  [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).
    SaveCode.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/ModelTree.cc:1825:10:  [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).
  output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/ModelTree.cc:1832: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).
  content_output.open(content_filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/ModelTree.cc:2354: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.
          char dynare_m_path[PATH_MAX];
data/dynare-4.6.3/preprocessor/src/NumericalInitialization.cc:541:5:  [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).
  f.open(filename, ios::in);
data/dynare-4.6.3/preprocessor/src/StaticModel.cc:379:14:  [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).
      output.open(tmp1_output.str(), ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/StaticModel.cc:562:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  code_file.open(main_name, ios::out | ios::binary | ios::ate);
data/dynare-4.6.3/preprocessor/src/StaticModel.cc:736:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  code_file.open(main_name, ios::out | ios::binary | ios::ate);
data/dynare-4.6.3/preprocessor/src/StaticModel.cc:1122:14:  [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).
    SaveCode.open(filename, ios::out | ios::in | ios::binary | ios::ate);
data/dynare-4.6.3/preprocessor/src/StaticModel.cc:1124:14:  [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).
    SaveCode.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/StaticModel.cc:1293:10:  [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).
  output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/StaticModel.cc:1342:10:  [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).
  output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/StaticModel.cc:1374:10:  [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).
  output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/StaticModel.cc:1415:10:  [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).
  output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/StaticModel.cc:1673:14:  [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).
      output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/StaticModel.cc:1891:10:  [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).
  output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/StaticModel.cc:1935:10:  [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).
  output.open(filename_mex, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/StaticModel.cc:2060:10:  [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).
  output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/StaticModel.cc:2405:10:  [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).
  output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/StaticModel.cc:2662: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).
  paramsDerivsFile.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/SubModel.cc:256:16:  [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).
  ar_ec_output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/SubModel.cc:461:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  ar_output.open(filename, ios::out | ios::binary);
data/dynare-4.6.3/preprocessor/src/macro/Parser.cc:2145: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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_MSStateSpace.c:588:8:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	      getchar(); 
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_MSStateSpace.c:607:8:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	      getchar();
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_MSStateSpace.c:619:8:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	      getchar(); 
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_MSStateSpace.c:1541:8:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	      getchar();
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_MSStateSpace.c:1577:8:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	      getchar();
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_MSStateSpace.c:1682:7:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		    getchar();
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_MSStateSpace.c:1713:7:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		    getchar();
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_MSStateSpace.c:1749:3:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		getchar();
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_MSStateSpace.c:1788:6:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    getchar();
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_MSStateSpace.c:1821:6:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    getchar();
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:234:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:234:51:  [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).
  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:305:53:  [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).
      		  sprintf(default_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:305:67:  [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).
      		  sprintf(default_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:432:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:432:59:  [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).
      sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:458:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:458:59:  [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).
      sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:547:46:  [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).
      	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 3),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:547:60:  [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).
      	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 3),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:558:46:  [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).
      	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 3),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:558:60:  [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).
      	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 3),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:568:46:  [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).
      	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:568:60:  [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).
      	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:624:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:624:59:  [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).
      sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:654:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:654:59:  [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).
      sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:789:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:789:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:803:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:803:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:821:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) + 10),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:821:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) + 10),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:835:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) + 10),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:835:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) + 10),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:852:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) + 10),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:852:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) + 10),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:866:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) + 10),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:866:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) + 10),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:953: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).
    sprintf(filename+strlen(filename),"regime%d_",regime);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:956:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (strlen(filename) + strlen(tag) < 1020)
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:956:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (strlen(filename) + strlen(tag) < 1020)
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1026:38:  [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).
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1026:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1117: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).
  sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1117:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1158: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).
  sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1158:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1211:40:  [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).
	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1211:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1232:40:  [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).
	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1232:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1252:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1252:59:  [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).
      sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1310:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1310:51:  [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).
  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1320: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).
      sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1320:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1330:38:  [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).
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1330:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1339:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_command_line_output.c:1339:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_impulse_response_special.c:406:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_impulse_response_special.c:406:59:  [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).
      sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_impulse_response_special.c:421:40:  [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).
	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) + 10),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_impulse_response_special.c:421:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) + 10),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_impulse_response_special.c:435:40:  [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).
	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) + 10),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/dw_state_space_impulse_response_special.c:435:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	sprintf(out_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) + 10),fmt,s,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:39: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).
  sprintf(errmsg=(char*)dw_malloc(strlen(fmt) + strlen(id) - 1),fmt,id);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:39:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sprintf(errmsg=(char*)dw_malloc(strlen(fmt) + strlen(id) - 1),fmt,id);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:82:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          sprintf(errmsg=(char*)dw_malloc(strlen(fmt) + strlen(filename) - 1),fmt,filename);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:82:57:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          sprintf(errmsg=(char*)dw_malloc(strlen(fmt) + strlen(filename) - 1),fmt,filename);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:153:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sprintf(filename=(char*)dw_malloc(strlen(dir) + strlen(fmt) + strlen(tag) - 3),fmt,dir,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:153:51:  [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).
  sprintf(filename=(char*)dw_malloc(strlen(dir) + strlen(fmt) + strlen(tag) - 3),fmt,dir,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:153:65:  [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).
  sprintf(filename=(char*)dw_malloc(strlen(dir) + strlen(fmt) + strlen(tag) - 3),fmt,dir,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:171: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).
  n=(int)strlen(path);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:303: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).
      sprintf(header=(char*)dw_malloc(strlen(fmt) + i - 1),fmt,k);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:316:38:  [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).
     sprintf(header=(char*)dw_malloc(strlen(fmt) + i - 1),fmt,k);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:553: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).
      sprintf(id=(char*)dw_malloc(strlen(fmt) + strlen_int(j+1) - 1),fmt,j+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:566:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	sprintf(id=(char*)dw_malloc(strlen(fmt) + strlen_int(j+1) - 1),fmt,j+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:579:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	sprintf(id=(char*)dw_malloc(strlen(fmt) + strlen_int(j+1) - 1),fmt,j+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:593: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).
      sprintf(id=(char*)dw_malloc(strlen(fmt) + strlen_int(j+1) - 1),fmt,j+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:602: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).
      sprintf(id=(char*)dw_malloc(strlen(fmt) + strlen_int(j+1) - 1),fmt,j+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:845: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).
      sprintf(idbuffer=(char*)dw_malloc(strlen(fmt)+strlen(header)+strlen_int(s+1)-3),fmt,header,s+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:845:53:  [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).
      sprintf(idbuffer=(char*)dw_malloc(strlen(fmt)+strlen(header)+strlen_int(s+1)-3),fmt,header,s+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:856: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).
      sprintf(idbuffer=(char*)dw_malloc(strlen(fmt)+strlen(header)+strlen_int(s+1)-3),fmt,header,s+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:856:53:  [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).
      sprintf(idbuffer=(char*)dw_malloc(strlen(fmt)+strlen(header)+strlen_int(s+1)-3),fmt,header,s+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:867: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).
      sprintf(idbuffer=(char*)dw_malloc(strlen(fmt)+strlen(header)+strlen_int(s+1)-3),fmt,header,s+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:867:53:  [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).
      sprintf(idbuffer=(char*)dw_malloc(strlen(fmt)+strlen(header)+strlen_int(s+1)-3),fmt,header,s+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1062: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).
  char *fullFilename = (char *)mxMalloc(strlen(out_tag) + strlen(".mat") - 1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1062:59:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  char *fullFilename = (char *)mxMalloc(strlen(out_tag) + strlen(".mat") - 1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1341: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).
  sprintf(buffer=(char*)dw_malloc(strlen(fmt) + strlen(id) - 1),fmt,id);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1341:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sprintf(buffer=(char*)dw_malloc(strlen(fmt) + strlen(id) - 1),fmt,id);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1588: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).
      sprintf(idbuffer=(char*)dw_malloc(strlen(fmt)+strlen(header)+strlen_int(s+1)-3),fmt,header,s+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1588:53:  [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).
      sprintf(idbuffer=(char*)dw_malloc(strlen(fmt)+strlen(header)+strlen_int(s+1)-3),fmt,header,s+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1599: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).
      sprintf(idbuffer=(char*)dw_malloc(strlen(fmt)+strlen(header)+strlen_int(s+1)-3),fmt,header,s+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1599:53:  [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).
      sprintf(idbuffer=(char*)dw_malloc(strlen(fmt)+strlen(header)+strlen_int(s+1)-3),fmt,header,s+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1610: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).
      sprintf(idbuffer=(char*)dw_malloc(strlen(fmt)+strlen(header)+strlen_int(s+1)-3),fmt,header,s+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio.c:1610:53:  [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).
      sprintf(idbuffer=(char*)dw_malloc(strlen(fmt)+strlen(header)+strlen_int(s+1)-3),fmt,header,s+1);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio_matlab.c:32: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).
  sprintf(errmsg=(char*)dw_malloc(strlen(fmt) + strlen(id) - 1),fmt,id);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/VARio_matlab.c:32:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sprintf(errmsg=(char*)dw_malloc(strlen(fmt) + strlen(id) - 1),fmt,id);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/create_init_file.c:52:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(args[3]) - 1),fmt,args[3]);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/create_init_file.c:52:51:  [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).
  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(args[3]) - 1),fmt,args[3]);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/create_simulated_data.c:104: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).
		  cmd->out_tag=(char*)dw_malloc((strlen(cmd->in_tag)+10)*sizeof(char));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:405: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).
	sprintf(err_msg=dw_malloc(strlen(err_fmt)+21),err_fmt,nit,*retcodeh);  // max of 24 digits total in nit and *retcodeh
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:422: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).
	sprintf(err_msg=dw_malloc(strlen(err_fmt)+21),err_fmt,crit,*retcodeh);  // max of 24 characters total in crit and *retcodeh
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:473: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).
	    sprintf(err_msg=dw_malloc(strlen(err_fmt)+21),err_fmt,MAX_NUM_POSSIBLE_BADCASES,*retcodeh);  
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/dw_csminwel.c:897: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).
   else if (STRLEN-1 < strlen(filename))  
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_estimate.c:246:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      	  sprintf(header=(char*)dw_malloc(strlen(fmt) + i - 1),fmt,total_iteration);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_estimate.c:295: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).
      sprintf(header=(char*)dw_malloc(strlen(fmt) + i - 1),fmt,total_iteration);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_estimate.c:482:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      sprintf(filename=(char*)dw_malloc(5+strlen(info->final_output_filename)),"%s.tmp",info->final_output_filename);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_forecast.c:460: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).
		sprintf(buffer=(char*)dw_malloc(strlen(fmt) + 10),fmt,s);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_forecast.c:486:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		  sprintf(buffer=(char*)dw_malloc(strlen(fmt) + 10),fmt,s);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_impulse_responses.c:1275: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).
		sprintf(buffer=(char*)dw_malloc(strlen(fmt) + 10),fmt,s);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_impulse_responses.c:1313:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		  sprintf(buffer=(char*)dw_malloc(strlen(fmt) + 10),fmt,s);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_variance_decomposition.c:677: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).
		sprintf(buffer=(char*)dw_malloc(strlen(fmt) + 10),fmt,s);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/state_space/sbvar/sbvar_variance_decomposition.c:718:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		  sprintf(buffer=(char*)dw_malloc(strlen(fmt) + 10),fmt,s);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1152: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).
      sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1152:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1235: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).
      sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,proposal_type,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1235:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,proposal_type,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1240: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).
      sprintf(filename=(char*)dw_malloc(strlen(fmt) + 1),fmt,proposal_type);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1280:38:  [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).
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,proposal_type,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1280:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,proposal_type,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1285:38:  [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).
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + 1),fmt,proposal_type);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1418:38:  [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).
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,proposal_type,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1418:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,proposal_type,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1423:38:  [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).
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + 1),fmt,proposal_type);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1433:38:  [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).
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,proposal_type,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1433:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,proposal_type,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1438:38:  [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).
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + 1),fmt,proposal_type);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1450:38:  [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).
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,proposal_type,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1450:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,proposal_type,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_mdd_switch.c:1455:38:  [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).
	  sprintf(filename=(char*)dw_malloc(strlen(fmt) + 1),fmt,proposal_type);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation.c:273:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(filename_metropolis=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation.c:273:66:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(filename_metropolis=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation.c:359:46:  [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).
	  sprintf(filename_hessian=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation.c:359:60:  [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).
	  sprintf(filename_hessian=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation.c:495:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation.c:495:51:  [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).
  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation.c:577:46:  [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).
	  sprintf(default_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation.c:577:60:  [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).
	  sprintf(default_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation_prior.c:171:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(filename_metropolis=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation_prior.c:171:66:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(filename_metropolis=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation_prior.c:279:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(default_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_metropolis_simulation_prior.c:279:63:  [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).
      sprintf(default_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch.c:634:76:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (fabs(x - 1.0) > 1e-7) { printf("invalid probabilities - %lf",x); getchar(); }    
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_opt.c:185: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).
  npoptn(option_string,strlen(option_string));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_opt.c:187: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).
  npoptn(option_string,strlen(option_string));
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_sim.c:82: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).
	sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_sim.c:82: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).
	sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_sim.c:401:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(filename_metropolis=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_sim.c:401:66:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(filename_metropolis=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_sim.c:555:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_sim.c:555:51:  [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).
  sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_sim.c:639: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).
	      sprintf(default_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switch_sim.c:639:64:  [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).
	      sprintf(default_filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:529: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).
	sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:529: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).
	sprintf(filename=(char*)dw_malloc(strlen(fmt) + strlen(tag) - 1),fmt,tag);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:750:40:  [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).
      sprintf(trailer=(char*)dw_malloc(strlen(fmt)+strlen(idstring)-1),fmt,idstring);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:750:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(trailer=(char*)dw_malloc(strlen(fmt)+strlen(idstring)-1),fmt,idstring);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:755: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).
      strcpy(trailer=(char*)dw_malloc(strlen(fmt)+1),fmt);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:909:40:  [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).
      sprintf(trailer=(char*)dw_malloc(strlen(fmt)+strlen(idstring)-1),fmt,idstring);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:909:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(trailer=(char*)dw_malloc(strlen(fmt)+strlen(idstring)-1),fmt,idstring);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:916: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).
      strcpy(trailer=(char*)dw_malloc(strlen(fmt)+1),fmt);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1109: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).
      sprintf(buffer=(char*)dw_malloc(strlen(header) + strlen(format) + strlen(idstring) - 3),format,header,idstring);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1109:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(buffer=(char*)dw_malloc(strlen(header) + strlen(format) + strlen(idstring) - 3),format,header,idstring);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1109:73:  [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).
      sprintf(buffer=(char*)dw_malloc(strlen(header) + strlen(format) + strlen(idstring) - 3),format,header,idstring);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1113: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).
	  sprintf(buffer=(char*)dw_malloc(strlen(header) + strlen(format) + strlen(idstring) - 3),format,header,"[1]");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1113:53:  [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).
	  sprintf(buffer=(char*)dw_malloc(strlen(header) + strlen(format) + strlen(idstring) - 3),format,header,"[1]");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1113:70:  [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).
	  sprintf(buffer=(char*)dw_malloc(strlen(header) + strlen(format) + strlen(idstring) - 3),format,header,"[1]");
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1353: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).
      strcpy(idbuffer=(char*)dw_malloc((j=(int)strlen(idstring))+i+3),idstring);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1465: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).
    sprintf(trailer=(char*)dw_malloc(24+strlen(idstring)),"for state_variable%s ==//",idstring);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1544:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (strlen(trailer) >= 5)
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1545: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).
	trailer[strlen(trailer)-5]='\0';
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1550: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).
	trailer[strlen(trailer)]=' ';
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1563:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (strlen(trailer) >= 5)
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1564: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).
	trailer[strlen(trailer)-5]='\0';
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:1570: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).
	trailer[strlen(trailer)]=' ';
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:2247: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).
	  sprintf(errmsg=(char*)dw_malloc(strlen(errmsg_format)+strlen(str)-1),errmsg_format,str);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:2247:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  sprintf(errmsg=(char*)dw_malloc(strlen(errmsg_format)+strlen(str)-1),errmsg_format,str);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:2260:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    sprintf(buffer=(char*)dw_malloc(strlen(format)+strlen(str)-1),format,str);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:2260:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    sprintf(buffer=(char*)dw_malloc(strlen(format)+strlen(str)-1),format,str);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:2263: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).
  sprintf(errmsg=(char*)dw_malloc(strlen(errmsg_format)+strlen(buffer)-1),errmsg_format,buffer);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:2263:57:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sprintf(errmsg=(char*)dw_malloc(strlen(errmsg_format)+strlen(buffer)-1),errmsg_format,buffer);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:2289:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    sprintf(buffer=(char*)dw_malloc(strlen(format)+strlen(str)-1),format,str);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:2289:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    sprintf(buffer=(char*)dw_malloc(strlen(format)+strlen(str)-1),format,str);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:2403: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).
      sprintf(buffer=(char*)dw_malloc(strlen(format)+strlen(str)+i-3),format,str,k);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:2403:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(buffer=(char*)dw_malloc(strlen(format)+strlen(str)+i-3),format,str,k);
data/dynare-4.6.3/contrib/ms-sbvar/switch_dw/switching/dw_switchio.c:2405: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).
      sprintf(buffer=(char*)dw_malloc(strlen(format)+i-1),format,k);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/arrays/dw_array.c:346:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (dest=(char*)dw_realloc(*((char**)d),strlen(*((char**)s))+1))
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_ascii.c:82:21:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while (EOF != (ch=getc(f_in)))
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_ascii.c:85:6:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ch=getc(f_in);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_ascii.c:128: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).
    if (ptr[(i=(int)strlen(ptr))-1] == '\n')
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_ascii.c:168:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  if (ptr[strlen(ptr)-1] == '\n') break;
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_ascii.c:556: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).
  if ((n=(int)strlen(id)) > 0)
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_ascii.c:590: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).
  if ((n=(int)strlen(id)) > 0)
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/ascii/dw_ascii.c:624:40:  [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 (buffer && (rtrn=(char*)dw_malloc(strlen(buffer)+1))) strcpy(rtrn,buffer);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:87:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ERROR_MESSAGE,msg,ERROR_MESSAGE_BUFFER_LENGTH-1);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:201:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sprintf(msg=dw_malloc(strlen(fmt)+strlen(filename)-1),fmt,filename);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:201: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).
      sprintf(msg=dw_malloc(strlen(fmt)+strlen(filename)-1),fmt,filename);
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:269:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (filename_err=(char*)malloc(strlen(filename)+1))
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/error/dw_error.c:301:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (filename_err=(char*)malloc(strlen(filename)+1))
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test.cpp:627:38:  [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 (!(arg_string=(char*)dw_malloc((strlen(string)+1)*sizeof(char)))) throw ERR_MEM_FAILURE;
data/dynare-4.6.3/contrib/ms-sbvar/utilities_dw/test_routines/matrix_test/c++/matrix_test.cpp:1470: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).
  if (!(name=(char*)dw_malloc((strlen(name_string)+1)*sizeof(char)))) throw ERR_MEM_FAILURE;
data/dynare-4.6.3/dynare++/parser/cc/assign_ll.cc:886: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/dynare-4.6.3/dynare++/parser/cc/assign_ll.cc:1860:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return yy_scan_bytes( yystr, (int) strlen(yystr) );
data/dynare-4.6.3/dynare++/parser/cc/assign_tab.cc:843: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/dynare-4.6.3/dynare++/parser/cc/formula_ll.cc:943: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/dynare-4.6.3/dynare++/parser/cc/formula_ll.cc:1988:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return yy_scan_bytes( yystr, (int) strlen(yystr) );
data/dynare-4.6.3/dynare++/parser/cc/formula_tab.cc:903: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/dynare-4.6.3/dynare++/parser/cc/matrix_ll.cc:900: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/dynare-4.6.3/dynare++/parser/cc/matrix_ll.cc:1891:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return yy_scan_bytes( yystr, (int) strlen(yystr) );
data/dynare-4.6.3/dynare++/parser/cc/matrix_tab.cc:840: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/dynare-4.6.3/dynare++/src/dynglob_ll.cc:957: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/dynare-4.6.3/dynare++/src/dynglob_ll.cc:1996:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return yy_scan_bytes( yystr, (int) strlen(yystr) );
data/dynare-4.6.3/dynare++/src/dynglob_tab.cc:916: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/dynare-4.6.3/mex/sources/bytecode/Evaluate.cc:938:32:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
            case BinaryOpcode::equal:
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:554:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              SaveCode.read(reinterpret_cast<char *>(&eq), sizeof(eq));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:555:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              SaveCode.read(reinterpret_cast<char *>(&var), sizeof(var));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:556:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              SaveCode.read(reinterpret_cast<char *>(&lag), sizeof(lag));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:557:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              SaveCode.read(reinterpret_cast<char *>(&val), sizeof(val));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:568:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              SaveCode.read(reinterpret_cast<char *>(&eq), sizeof(eq));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:569:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              SaveCode.read(reinterpret_cast<char *>(&var), sizeof(var));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:570:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              SaveCode.read(reinterpret_cast<char *>(&lag), sizeof(lag));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:571:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              SaveCode.read(reinterpret_cast<char *>(&val), sizeof(val));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:582:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              SaveCode.read(reinterpret_cast<char *>(&eq), sizeof(eq));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:583:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              SaveCode.read(reinterpret_cast<char *>(&var), sizeof(var));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:584:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              SaveCode.read(reinterpret_cast<char *>(&lag), sizeof(lag));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:585:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              SaveCode.read(reinterpret_cast<char *>(&val), sizeof(val));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:599:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              SaveCode.read(reinterpret_cast<char *>(&eq), sizeof(eq));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:600:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              SaveCode.read(reinterpret_cast<char *>(&var), sizeof(var));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:601:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              SaveCode.read(reinterpret_cast<char *>(&lag), sizeof(lag));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:602:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              SaveCode.read(reinterpret_cast<char *>(&val), sizeof(val));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:611:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              SaveCode.read(reinterpret_cast<char *>(&eq), sizeof(eq));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:612:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              SaveCode.read(reinterpret_cast<char *>(&var), sizeof(var));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:613:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              SaveCode.read(reinterpret_cast<char *>(&lag), sizeof(lag));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:614:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              SaveCode.read(reinterpret_cast<char *>(&val), sizeof(val));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:622:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    SaveCode.read(reinterpret_cast<char *>(&index_vara[j]), sizeof(*index_vara));
data/dynare-4.6.3/mex/sources/bytecode/SparseMatrix.cc:632:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    SaveCode.read(reinterpret_cast<char *>(&index_equa[j]), sizeof(*index_equa));
data/dynare-4.6.3/mex/sources/bytecode/testing/mex_interface.cc:406: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).
      for (unsigned int j = 0; j < strlen(pchar); j++)
data/dynare-4.6.3/mex/sources/bytecode/testing/mex_interface.cc:408:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      for (unsigned int j = strlen(pchar); j < size_2; j++)
data/dynare-4.6.3/mex/sources/ms-sbvar/mex_top_level.cc:60:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (!(args[nargs] = static_cast<char *>(mxCalloc(strlen(mainarg)+1, sizeof(char)))))
data/dynare-4.6.3/mex/sources/ms-sbvar/mex_top_level.cc:63:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(args[nargs++], mainarg, strlen(mainarg));
data/dynare-4.6.3/mex/sources/ms-sbvar/mex_top_level.cc:63: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).
  strncpy(args[nargs++], mainarg, strlen(mainarg));
data/dynare-4.6.3/mex/sources/ms-sbvar/mex_top_level.cc:74:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(args[nargs++], beginarg, n);
data/dynare-4.6.3/preprocessor/src/DataTree.cc:695:43:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  return AddBinaryOp(iArg1, BinaryOpcode::equal, iArg2);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:6701:53:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      assert(aux_equation->op_code == BinaryOpcode::equal);
data/dynare-4.6.3/preprocessor/src/DynamicModel.cc:6753:47:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  assert(beq && beq->op_code == BinaryOpcode::equal);
data/dynare-4.6.3/preprocessor/src/DynareFlex.cc:12191:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                          if (strlen(yytext) > 1)
data/dynare-4.6.3/preprocessor/src/DynareFlex.cc:12313:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                if (strlen(yytext) > 1)
data/dynare-4.6.3/preprocessor/src/DynareFlex.cc:12642:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	(void) yyin.read( buf, max_size );
data/dynare-4.6.3/preprocessor/src/ExprNode.cc:4127:24:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    case BinaryOpcode::equal:
data/dynare-4.6.3/preprocessor/src/ExprNode.cc:4168:24:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    case BinaryOpcode::equal:
data/dynare-4.6.3/preprocessor/src/ExprNode.cc:4208:24:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    case BinaryOpcode::equal:
data/dynare-4.6.3/preprocessor/src/ExprNode.cc:4286:26:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      case BinaryOpcode::equal:
data/dynare-4.6.3/preprocessor/src/ExprNode.cc:4313:26:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      case BinaryOpcode::equal:
data/dynare-4.6.3/preprocessor/src/ExprNode.cc:4343:39:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
          && op_code != BinaryOpcode::equal)
data/dynare-4.6.3/preprocessor/src/ExprNode.cc:4369:39:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
          && op_code != BinaryOpcode::equal)
data/dynare-4.6.3/preprocessor/src/ExprNode.cc:4426:24:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    case BinaryOpcode::equal:
data/dynare-4.6.3/preprocessor/src/ExprNode.cc:4653:24:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    case BinaryOpcode::equal:
data/dynare-4.6.3/preprocessor/src/ExprNode.cc:4817:24:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    case BinaryOpcode::equal:
data/dynare-4.6.3/preprocessor/src/ExprNode.cc:4991:36:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      if (op_code == BinaryOpcode::equal) /* The end of the normalization process :
data/dynare-4.6.3/preprocessor/src/ExprNode.cc:5011:36:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      if (op_code == BinaryOpcode::equal)
data/dynare-4.6.3/preprocessor/src/ExprNode.cc:5113:24:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    case BinaryOpcode::equal:
data/dynare-4.6.3/preprocessor/src/ExprNode.cc:5211:24:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    case BinaryOpcode::equal:
data/dynare-4.6.3/preprocessor/src/ExprNode.cc:5391:26:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      case BinaryOpcode::equal:
data/dynare-4.6.3/preprocessor/src/ExprNode.cc:5441:26:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
      case BinaryOpcode::equal:
data/dynare-4.6.3/preprocessor/src/ExprNode.cc:6007:32:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  if (op_code == BinaryOpcode::equal)
data/dynare-4.6.3/preprocessor/src/ExprNode.cc:6024:32:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  if (op_code == BinaryOpcode::equal)
data/dynare-4.6.3/preprocessor/src/ModelTree.cc:1916:47:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  assert(beq && beq->op_code == BinaryOpcode::equal);
data/dynare-4.6.3/preprocessor/src/ModelTree.cc:2061:47:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  assert(beq && beq->op_code == BinaryOpcode::equal);
data/dynare-4.6.3/preprocessor/src/macro/Tokenizer.cc:1891:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	(void) yyin.read( buf, max_size );

ANALYSIS SUMMARY:

Hits = 874
Lines analyzed = 188937 in approximately 5.79 seconds (32657 lines/second)
Physical Source Lines of Code (SLOC) = 141339
Hits@level = [0] 894 [1] 274 [2] 451 [3]  13 [4] 136 [5]   0
Hits@level+ = [0+] 1768 [1+] 874 [2+] 600 [3+] 149 [4+] 136 [5+]   0
Hits/KSLOC@level+ = [0+] 12.5089 [1+] 6.18371 [2+] 4.24511 [3+] 1.0542 [4+] 0.962226 [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.