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/tcl8.6-8.6.10+dfsg/unix/tclUnixTest.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclAppInit.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclUnixEvent.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclUnixNotfy.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclLoadShl.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclXtTest.c Examining data/tcl8.6-8.6.10+dfsg/unix/dltest/pkgc.c Examining data/tcl8.6-8.6.10+dfsg/unix/dltest/pkge.c Examining data/tcl8.6-8.6.10+dfsg/unix/dltest/pkgooa.c Examining data/tcl8.6-8.6.10+dfsg/unix/dltest/pkgua.c Examining data/tcl8.6-8.6.10+dfsg/unix/dltest/pkgb.c Examining data/tcl8.6-8.6.10+dfsg/unix/dltest/pkga.c Examining data/tcl8.6-8.6.10+dfsg/unix/dltest/pkgd.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclUnixThrd.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclUnixThrd.h Examining data/tcl8.6-8.6.10+dfsg/unix/tclUnixChan.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclLoadDl.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclUnixSock.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclXtNotify.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclLoadDyld.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclUnixCompat.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclUnixPipe.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclLoadNext.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclLoadOSF.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclUnixTime.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c Examining data/tcl8.6-8.6.10+dfsg/unix/tclUnixPort.h Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_count_bits.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_init.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_reduce_is_2k.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_to_radix.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_rand_jenkins.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_set_u32.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_exteuclid.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_pack_count.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_isodd.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_ubin_size.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_grow.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_expt_u32.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_log_u32.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_sqrtmod_prime.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_mul_2d.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_to_sbin.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/tommath_cutoffs.h Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_radix_smap.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_clear_multi.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_mul_digs.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_toom_sqr.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_rand_platform.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_init_u32.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_to_ubin.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_prime_tab.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_set_i32.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_montgomery_calc_normalization.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_reduce_2k_l.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_sub.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_decr.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_reduce.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_shrink.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_invmod_fast.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_submod.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_exptmod.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_incr.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_div_2d.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_sqr.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_cnt_lsb.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_karatsuba_mul.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_iseven.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_div_d.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_exptmod.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_complement.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_get_mag_u32.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_signed_rsh.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_div.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_init_i32.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_get_mag_u64.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_root_u32.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_get_mag_ul.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_neg.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/tommath_class.h Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_kronecker.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_prime_miller_rabin.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_dr_is_modulus.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_set_double.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_init_copy.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/tommath_private.h Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_add.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_div_3.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_deprecated.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_add.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_get_bit.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_set_ull.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_prime_rabin_miller_trials.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_prime_is_prime.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_xor.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_mod_2d.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_rshd.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_cutoffs.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_montgomery_setup.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_clear.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_cmp_mag.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_zero.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_add_d.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_set_i64.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_reduce_2k_setup_l.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_set_ll.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_2expt.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_reduce_setup.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_mul_d.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_sbin_size.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_and.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_prime_strong_lucas_selfridge.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_set_l.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_rand.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_sqrt.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_gcd.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_dr_setup.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_init_ll.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_mod_d.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_karatsuba_sqr.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_init_set.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_reduce_is_2k_l.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_cmp_d.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_mul_high_digs_fast.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_sub_d.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_init_u64.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_dr_reduce.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_prime_frobenius_underwood.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_error_to_string.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_from_sbin.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_init_multi.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_reduce_2k.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_prime_rand.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_fread.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_reduce_2k_setup.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_mul.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_read_radix.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_invmod.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_sqr_fast.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_prime_fermat.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_mul_high_digs.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_invmod_slow.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_init_i64.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_get_mag_ull.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_unpack.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_cmp.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_mul_2.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_init_ull.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_lcm.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_get_double.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_div_2.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_init_ul.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_mul_digs_fast.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_montgomery_reduce_fast.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_from_ubin.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_or.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_fwrite.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/tommath_superclass.h Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_prime_is_divisible.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_copy.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_addmod.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_sqrmod.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_exch.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_get_i32.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_pack.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_sub.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/tommath.h Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_montgomery_reduce.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_radix_size.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_init_l.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_mulmod.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_set.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_sqr.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_toom_mul.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_get_l.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_abs.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_init_size.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_balance_mul.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_lshd.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_get_i64.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_set_u64.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_set_ul.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_is_square.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_exptmod_fast.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_prime_next_prime.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_get_ll.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_clamp.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_mod.c Examining data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_reverse.c Examining data/tcl8.6-8.6.10+dfsg/macosx/tclMacOSXFCmd.c Examining data/tcl8.6-8.6.10+dfsg/macosx/tclMacOSXBundle.c Examining data/tcl8.6-8.6.10+dfsg/macosx/tclMacOSXNotify.c Examining data/tcl8.6-8.6.10+dfsg/win/tclAppInit.c Examining data/tcl8.6-8.6.10+dfsg/win/tclWinFCmd.c Examining data/tcl8.6-8.6.10+dfsg/win/tclWinError.c Examining data/tcl8.6-8.6.10+dfsg/win/tclWinTime.c Examining data/tcl8.6-8.6.10+dfsg/win/tclWinNotify.c Examining data/tcl8.6-8.6.10+dfsg/win/tclWinThrd.c Examining data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c Examining data/tcl8.6-8.6.10+dfsg/win/tclWinTest.c Examining data/tcl8.6-8.6.10+dfsg/win/tclWin32Dll.c Examining data/tcl8.6-8.6.10+dfsg/win/tclWinConsole.c Examining data/tcl8.6-8.6.10+dfsg/win/tclWinReg.c Examining data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c Examining data/tcl8.6-8.6.10+dfsg/win/tclWinSock.c Examining data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c Examining data/tcl8.6-8.6.10+dfsg/win/tclWinPipe.c Examining data/tcl8.6-8.6.10+dfsg/win/tclWinPort.h Examining data/tcl8.6-8.6.10+dfsg/win/cat.c Examining data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c Examining data/tcl8.6-8.6.10+dfsg/win/tclWinDde.c Examining data/tcl8.6-8.6.10+dfsg/win/tclWinChan.c Examining data/tcl8.6-8.6.10+dfsg/win/tclWinInt.h Examining data/tcl8.6-8.6.10+dfsg/win/tclWinLoad.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclInt.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclProc.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclParse.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclExecute.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclOODefineCmds.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclOOIntDecls.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclAsync.c Examining data/tcl8.6-8.6.10+dfsg/generic/regfronts.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclIOGT.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclClock.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclThreadJoin.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclUtf.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclHistory.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclUniData.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclThreadAlloc.c Examining data/tcl8.6-8.6.10+dfsg/generic/tcl.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclResult.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclTomMathInterface.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclIntDecls.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclTestObj.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclPlatDecls.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclOOStubInit.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclMain.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclTomMath.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclCmdAH.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclThread.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclPanic.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclIO.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclParse.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclOOCall.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclPort.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclOO.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclIOCmd.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclCmdIL.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclDictObj.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclHash.c Examining data/tcl8.6-8.6.10+dfsg/generic/regc_lex.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclVar.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclIOSock.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclNotify.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclFCmd.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclIORTrans.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclStringObj.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclIntPlatDecls.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclLoadNone.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclDate.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclPkg.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclScan.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclGet.c Examining data/tcl8.6-8.6.10+dfsg/generic/regerror.c Examining data/tcl8.6-8.6.10+dfsg/generic/rege_dfa.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclRegexp.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclStubLib.c Examining data/tcl8.6-8.6.10+dfsg/generic/regfree.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclLink.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclOOInfo.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclIndexObj.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclStubInit.c Examining data/tcl8.6-8.6.10+dfsg/generic/regcustom.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclTest.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclDisassemble.c Examining data/tcl8.6-8.6.10+dfsg/generic/regguts.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclOO.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclFileSystem.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclCkalloc.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclLiteral.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclIO.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclConfig.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclAssembly.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclResolve.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclCompCmdsSZ.c Examining data/tcl8.6-8.6.10+dfsg/generic/regc_locale.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclThreadTest.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclCompile.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclStrToD.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclObj.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclCompile.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclOOInt.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclPkgConfig.c Examining data/tcl8.6-8.6.10+dfsg/generic/regerrs.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclOptimize.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclThreadStorage.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclCompExpr.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclCompCmds.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclEnv.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclOOBasic.c Examining data/tcl8.6-8.6.10+dfsg/generic/regcomp.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclOOStubLib.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclTrace.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclListObj.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclEvent.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclInterp.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclZlib.c Examining data/tcl8.6-8.6.10+dfsg/generic/regexec.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclStringRep.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclPosixStr.c Examining data/tcl8.6-8.6.10+dfsg/generic/regc_nfa.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclRegexp.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclLoad.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclTimer.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclAlloc.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclStringTrim.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclTomMathInt.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclTomMathStubLib.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclEnsemble.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclDecls.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclTomMathDecls.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclIORChan.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclOODecls.h Examining data/tcl8.6-8.6.10+dfsg/generic/tommath.h Examining data/tcl8.6-8.6.10+dfsg/generic/tclCmdMZ.c Examining data/tcl8.6-8.6.10+dfsg/generic/regc_color.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclTestProcBodyObj.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclFileName.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclPathObj.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclPreserve.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclBinary.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclPipe.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclOOMethod.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclNamesp.c Examining data/tcl8.6-8.6.10+dfsg/generic/regc_cvec.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclCompCmdsGR.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c Examining data/tcl8.6-8.6.10+dfsg/generic/tclIOUtil.c Examining data/tcl8.6-8.6.10+dfsg/generic/regex.h Examining data/tcl8.6-8.6.10+dfsg/tools/man2tcl.c Examining data/tcl8.6-8.6.10+dfsg/compat/opendir.c Examining data/tcl8.6-8.6.10+dfsg/compat/strstr.c Examining data/tcl8.6-8.6.10+dfsg/compat/dlfcn.h Examining data/tcl8.6-8.6.10+dfsg/compat/strncasecmp.c Examining data/tcl8.6-8.6.10+dfsg/compat/float.h Examining data/tcl8.6-8.6.10+dfsg/compat/dirent.h Examining data/tcl8.6-8.6.10+dfsg/compat/stdlib.h Examining data/tcl8.6-8.6.10+dfsg/compat/fake-rfc2553.h Examining data/tcl8.6-8.6.10+dfsg/compat/mkstemp.c Examining data/tcl8.6-8.6.10+dfsg/compat/gettod.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/gzclose.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/zconf.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/deflate.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/inflate.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/gzlib.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/uncompr.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/inffast.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/gzguts.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/crc32.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/inflate.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/inftrees.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/zlib.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/puff/pufftest.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/puff/puff.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/puff/puff.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/masmx64/inffas8664.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream/zfstream.cpp Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream/zfstream.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream/test.cpp Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/testzlib/testzlib.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/test.cc Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream2/zstream.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream2/zstream_test.cpp Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/iowin32.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/unzip.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/iowin32.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/mztools.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/crypt.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/ioapi.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/miniunz.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/ioapi.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/mztools.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/minizip.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/unzip.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/zip.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/zip.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/inflate86/inffas86.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/blast/blast.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/blast/blast.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/infback9/inffix9.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/infback9/infback9.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/infback9/inftree9.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/infback9/inftree9.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/infback9/infback9.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/infback9/inflate9.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/zutil.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/gzread.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/inftrees.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/gzwrite.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/compress.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/crc32.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/inffast.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/zutil.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/deflate.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/adler32.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/trees.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/fitblk.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zpipe.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/enough.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzjoin.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzappend.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zran.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gun.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/infback.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/trees.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/inffixed.h Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/test/example.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/test/infcover.c Examining data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c Examining data/tcl8.6-8.6.10+dfsg/compat/unistd.h Examining data/tcl8.6-8.6.10+dfsg/compat/strtol.c Examining data/tcl8.6-8.6.10+dfsg/compat/string.h Examining data/tcl8.6-8.6.10+dfsg/compat/strtoul.c Examining data/tcl8.6-8.6.10+dfsg/compat/fake-rfc2553.c Examining data/tcl8.6-8.6.10+dfsg/compat/memcmp.c Examining data/tcl8.6-8.6.10+dfsg/compat/dirent2.h Examining data/tcl8.6-8.6.10+dfsg/compat/waitpid.c FINAL RESULTS: data/tcl8.6-8.6.10+dfsg/compat/unistd.h:31:13: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. extern int chown(const char *path, uid_t owner, gid_t group); data/tcl8.6-8.6.10+dfsg/compat/unistd.h:66:13: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. extern int readlink(const char *path, char *buf, int bufsize); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:32:13: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. # define chmod(path,mode) _chmod(path,mode) data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:277:7: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(item->fname,item->mode); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gun.c:527:11: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. (void)chmod(to, was.st_mode & 07777); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gun.c:530:11: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. (void)chown(to, was.st_uid, was.st_gid); data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:497:11: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. length = readlink(src, linkBuf, MAXPATHLEN); data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:883:2: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(path, (mode_t) newPerm); data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:915:2: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(path, oldPerm); data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:1311:9: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(dst, newMode)) { /* INTL: Native. */ data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:1313:6: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(dst, newMode)) { /* INTL: Native. */ data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:1533:14: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. result = chown(native, (uid_t) -1, (gid_t) gid); /* INTL: Native. */ data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:1600:14: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. result = chown(native, (uid_t) uid, (gid_t) -1); /* INTL: Native. */ data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:1694:14: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. result = chmod(native, newMode); /* INTL: Native. */ data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:814:14: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. length = readlink(native, link, sizeof(link)); /* INTL: Native. */ data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:985:11: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. length = readlink(Tcl_FSGetNativePath(pathPtr), link, sizeof(link)); data/tcl8.6-8.6.10+dfsg/unix/tclUnixTest.c:765:6: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(translated, (unsigned) mode) != 0) { data/tcl8.6-8.6.10+dfsg/win/tclWinTest.c:631:12: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. return chmod(nativePath, pmode); data/tcl8.6-8.6.10+dfsg/compat/string.h:39:16: [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). extern char * strcat(char *dst, const char *src); data/tcl8.6-8.6.10+dfsg/compat/string.h:42:16: [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). extern char * strcpy(char *dst, const char *src); data/tcl8.6-8.6.10+dfsg/compat/unistd.h:29:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. extern int access(const char *path, int mode); data/tcl8.6-8.6.10+dfsg/compat/unistd.h:35:13: [4] (shell) execl: 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. extern int execl(const char *path, ...); data/tcl8.6-8.6.10+dfsg/compat/unistd.h:36:13: [4] (shell) execle: 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. extern int execle(const char *path, ...); data/tcl8.6-8.6.10+dfsg/compat/unistd.h:37:13: [4] (shell) execlp: 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. extern int execlp(const char *file, ...); data/tcl8.6-8.6.10+dfsg/compat/unistd.h:38:13: [4] (shell) execv: 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. extern int execv(const char *path, char **argv); data/tcl8.6-8.6.10+dfsg/compat/unistd.h:61:16: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. extern char * crypt(const char *, const char *); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/miniunz.c:154: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(buffer,newdir); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/minizip.c:376:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(newname,"%s/%s",dir.path,file.name); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:31:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. # define access(path,mode) _access(path,mode) data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:137: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(buffer,arcname); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:142:8: [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(buffer+origlen,TGZsuffix[i]); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:143:12: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(buffer,F_OK) == 0) data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:158:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr,(TGZsuffix[i+1]) ? "%s%s, " : "or %s%s\n", data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:586:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dest, log->path); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:878:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(log->id, LOGID); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:888:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(log->path, path); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zran.c:75:8: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. struct access { data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zran.c:82:30: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. local void free_index(struct access *index) data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zran.c:92:14: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. local struct access *addpoint(struct access *index, int bits, data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zran.c:92:38: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. local struct access *addpoint(struct access *index, int bits, data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zran.c:99:38: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. index = malloc(sizeof(struct access)); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zran.c:144:52: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. local int build_index(FILE *in, off_t span, struct access **built) data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zran.c:149:12: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. struct access *index; /* access points being generated */ data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zran.c:249:36: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. local int extract(FILE *in, struct access *index, off_t offset, data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zran.c:359:12: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. struct access *index = NULL; data/tcl8.6-8.6.10+dfsg/compat/zlib/gzguts.h:86:18: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # if !defined(vsnprintf) && !defined(NO_vsnprintf) data/tcl8.6-8.6.10+dfsg/compat/zlib/gzguts.h:88:18: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define vsnprintf _vsnprintf data/tcl8.6-8.6.10+dfsg/compat/zlib/gzguts.h:110:11: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf _snprintf data/tcl8.6-8.6.10+dfsg/compat/zlib/gzguts.h:110:20: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf _snprintf data/tcl8.6-8.6.10+dfsg/compat/zlib/gzlib.c:216:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(state->path, path); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzlib.c:614:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(state->msg, state->path); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzlib.c:616: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(state->msg, msg); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzwrite.c:417:11: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. (void)vsprintf(next, format, va); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzwrite.c:421:11: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. len = vsprintf(next, format, va); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzwrite.c:425:11: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void)vsnprintf(next, state->size, format, va); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzwrite.c:428:11: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len = vsnprintf(next, state->size, format, va); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzwrite.c:511:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, data/tcl8.6-8.6.10+dfsg/compat/zlib/gzwrite.c:517:11: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. len = sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, data/tcl8.6-8.6.10+dfsg/compat/zlib/gzwrite.c:522:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, data/tcl8.6-8.6.10+dfsg/compat/zlib/gzwrite.c:526:11: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len = snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8, data/tcl8.6-8.6.10+dfsg/compat/zlib/test/infcover.c:529:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(prefix, id); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/infcover.c:555:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(prefix, id); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:44:11: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf _snprintf data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:44:20: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf _snprintf data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:473:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(outfile, file); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:474: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(outfile, GZ_SUFFIX); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:513:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf, file); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:526:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(infile, GZ_SUFFIX); data/tcl8.6-8.6.10+dfsg/compat/zlib/zutil.h:242:39: [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 Trace(x) {if (z_verbose>=0) fprintf x ;} data/tcl8.6-8.6.10+dfsg/compat/zlib/zutil.h:243:39: [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 Tracev(x) {if (z_verbose>0) fprintf x ;} data/tcl8.6-8.6.10+dfsg/compat/zlib/zutil.h:244:40: [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 Tracevv(x) {if (z_verbose>1) fprintf x ;} data/tcl8.6-8.6.10+dfsg/compat/zlib/zutil.h:245:48: [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 Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} data/tcl8.6-8.6.10+dfsg/compat/zlib/zutil.h:246:49: [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 Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} data/tcl8.6-8.6.10+dfsg/generic/regerror.c:103:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(convbuf, unk, code); data/tcl8.6-8.6.10+dfsg/generic/regerror.c:112: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(errbuf, msg); data/tcl8.6-8.6.10+dfsg/generic/regguts.h:111:53: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define FDEBUG(arglist) { if (v->eflags®_FTRACE) printf arglist; } data/tcl8.6-8.6.10+dfsg/generic/regguts.h:113:53: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define MDEBUG(arglist) { if (v->eflags®_MTRACE) printf arglist; } data/tcl8.6-8.6.10+dfsg/generic/tclAssembly.c:538: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. #define DEBUG_PRINT(...) fprintf(stderr, ##__VA_ARGS__);fflush(stderr) data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:888:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(mathFuncName+MATH_FUNC_PREFIX_LEN, builtinFuncPtr->name); data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:911:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(mathFuncName + MATH_OP_PREFIX_LEN, opcmdInfoPtr->name); data/tcl8.6-8.6.10+dfsg/generic/tclCkalloc.c:910:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(onExitMemDumpFileName,fileName); data/tcl8.6-8.6.10+dfsg/generic/tclCkalloc.c:1002:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tclMemDumpFileName, argv[1]); data/tcl8.6-8.6.10+dfsg/generic/tclClock.c:294:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(cmdName + TCL_CLOCK_PREFIX_LEN, clockCmdPtr->name); data/tcl8.6-8.6.10+dfsg/generic/tclClock.c:2045:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tzWas, tzIsNow); data/tcl8.6-8.6.10+dfsg/generic/tclConfig.c:87:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(cdPtr->encoding, valEncoding); data/tcl8.6-8.6.10+dfsg/generic/tclDate.c:869: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/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:1066:26: [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). encodingPtr->name = strcpy(name, typePtr->encodingName); data/tcl8.6-8.6.10+dfsg/generic/tclExecute.c:434:2: [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 a; \ data/tcl8.6-8.6.10+dfsg/generic/tclExecute.c:439:2: [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 a; \ data/tcl8.6-8.6.10+dfsg/generic/tclExecute.c:450:2: [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 a; \ data/tcl8.6-8.6.10+dfsg/generic/tclFCmd.c:1243:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. int access; data/tcl8.6-8.6.10+dfsg/generic/tclFCmd.c:1252:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access != 0) { data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:1646:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tmp, chanName); data/tcl8.6-8.6.10+dfsg/generic/tclIORChan.c:3174:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, data/tcl8.6-8.6.10+dfsg/generic/tclInt.h:123:12: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define vsnprintf _vsnprintf data/tcl8.6-8.6.10+dfsg/generic/tclLoad.c:976:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(pkgPtr->packageName, pkgName); data/tcl8.6-8.6.10+dfsg/generic/tclPanic.c:105: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(stderr, format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, data/tcl8.6-8.6.10+dfsg/generic/tclResult.c:262:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(statePtr->result, iPtr->result); data/tcl8.6-8.6.10+dfsg/generic/tclResult.c:329:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(iPtr->result, statePtr->result); data/tcl8.6-8.6.10+dfsg/generic/tclResult.c:836:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(new, iPtr->result); data/tcl8.6-8.6.10+dfsg/generic/tclResult.c:843:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(iPtr->appendResult, iPtr->result); data/tcl8.6-8.6.10+dfsg/generic/tclStringObj.c:2380:44: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. if (!Tcl_AttemptSetObjLength(segment, sprintf(bytes, spec, d))) { data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:842:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(asyncPtr->command, argv[2]); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:1633:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dPtr->deleteCmd, argv[3]); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:3093: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(stringVar, argv[5]); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:3200: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(stringVar, argv[5]); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:4209:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf, argv[2]); data/tcl8.6-8.6.10+dfsg/generic/tclTestProcBodyObj.c:149:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "namespace eval %s { namespace export %s }", data/tcl8.6-8.6.10+dfsg/generic/tclTestProcBodyObj.c:156:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s::%s", namespace, cmdTablePtr->cmdName); data/tcl8.6-8.6.10+dfsg/generic/tclThreadTest.c:439:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(errorProcString, proc); data/tcl8.6-8.6.10+dfsg/generic/tclThreadTest.c:599:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(threadEvalScript, ctrlPtr->script); data/tcl8.6-8.6.10+dfsg/generic/tclThreadTest.c:845:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(threadEventPtr->script, script); data/tcl8.6-8.6.10+dfsg/generic/tclThreadTest.c:1046:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(resultPtr->result, result); data/tcl8.6-8.6.10+dfsg/generic/tclThreadTest.c:1049: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(resultPtr->errorCode, errorCode); data/tcl8.6-8.6.10+dfsg/generic/tclThreadTest.c:1053: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(resultPtr->errorInfo, errorInfo); data/tcl8.6-8.6.10+dfsg/generic/tclThreadTest.c:1203: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(resultPtr->result, msg); data/tcl8.6-8.6.10+dfsg/tools/man2tcl.c:61:40: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define PRINT(args) if (writeOutput) { printf args; } data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:133:2: [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(errbuf, strerror(errno)); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:138:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(mp->name, path); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:151:2: [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(errbuf, path); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:163: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(errbuf, strerror(errno)); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:170:6: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(errbuf, strerror(errno)); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:184:2: [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(errbuf, strerror(errno)); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:257:2: [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(errbuf, p); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:261:2: [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(errbuf, p); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:265:2: [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(errbuf, p); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:269:2: [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(errbuf, p); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:272:2: [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(errbuf, strerror(atoi(++p))); /* INTL: "C", UTF safe. */ data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:275:2: [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(errbuf, s); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:302: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(errbuf, symbol); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:342:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(errbuf, strerror(errno)); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:545:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ep->name, symname); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:564: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(errbuf, errMsg); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:620: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(errbuf, strerror(errno)); data/tcl8.6-8.6.10+dfsg/unix/tclLoadNext.c:143:2: [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(sym, symbol); data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:2011:17: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. accessOk = access(nativePath, F_OK); data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:2258:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. && access(dir, W_OK) == 0) { data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:2264:55: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (stat(dir, &buf)==0 && S_ISDIR(buf.st_mode) && access(dir, W_OK)==0) { data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:123:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if ((access(name, X_OK) == 0) /* INTL: Native. */ data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:468:4: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. (access(nativeEntry, R_OK) != 0)) || data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:470:4: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. (access(nativeEntry, W_OK) != 0)) || data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:472:4: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. (access(nativeEntry, X_OK) != 0)) data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:629:12: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. return access(path, mode); data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:724:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newCd, buffer); data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:916:10: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(target, F_OK) == -1) { data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:926:6: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(src, F_OK) != -1) { data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c:499:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(installLib, "lib/tcl%s", TCL_VERSION); data/tcl8.6-8.6.10+dfsg/unix/tclUnixPipe.c:492:2: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(newArgv[0], newArgv); /* INTL: Native. */ data/tcl8.6-8.6.10+dfsg/unix/tclUnixSock.c:1391:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(channelName, SOCK_TEMPLATE, (long) statePtr); data/tcl8.6-8.6.10+dfsg/unix/tclUnixSock.c:1458:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(channelName, SOCK_TEMPLATE, (long)statePtr); data/tcl8.6-8.6.10+dfsg/unix/tclUnixSock.c:1617:13: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(channelName, SOCK_TEMPLATE, (long) statePtr); data/tcl8.6-8.6.10+dfsg/unix/tclUnixSock.c:1710:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(channelName, SOCK_TEMPLATE, (long) newSockState); data/tcl8.6-8.6.10+dfsg/unix/tclUnixTime.c:577:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(lastTZ, newTZ); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:33:11: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:33:20: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:250:5: [4] (buffer) lstrcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). lstrcat(cmdline, option); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:388:2: [4] (buffer) lstrcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). lstrcat(cmdline, options[i]); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:677:6: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(szBuffer); data/tcl8.6-8.6.10+dfsg/win/tclWinDde.c:437:5: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. wcscpy(riPtr->name, actualName); data/tcl8.6-8.6.10+dfsg/win/tclWinError.c:396:2: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buf, sizeof(buf), format, argList); data/tcl8.6-8.6.10+dfsg/win/tclWinError.c:409:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, argList); data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:817:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buf, sizeof(buf), format, argList); data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c:211:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(installLib, "lib/tcl%s", TCL_VERSION); data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c:380:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(end + 1, "lib/tcl%s", TCL_VERSION); data/tcl8.6-8.6.10+dfsg/win/tclWinInt.h:79:14: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. DWORD access); data/tcl8.6-8.6.10+dfsg/win/tclWinLoad.c:420:5: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. wcscpy(dllDirectoryName, name); data/tcl8.6-8.6.10+dfsg/win/tclWinPipe.c:1328:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(fullName, Tcl_WinTCharToUtf((TCHAR *)nativeFullPath, -1, &ds)); data/tcl8.6-8.6.10+dfsg/win/tclWinPipe.c:1419:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(fullName, Tcl_WinTCharToUtf((TCHAR *)nativeFullPath, -1, &ds)); data/tcl8.6-8.6.10+dfsg/win/tclWinReg.c:448:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buffer, keyName); data/tcl8.6-8.6.10+dfsg/win/tclWinReg.c:981:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buffer, keyName); data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:1372:11: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. DWORD access) data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:1390:32: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. handle = CreateFileW(name, access, 0, 0, OPEN_EXISTING, data/tcl8.6-8.6.10+dfsg/win/tclWinSock.c:1961:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(channelName, SOCK_TEMPLATE, statePtr); data/tcl8.6-8.6.10+dfsg/win/tclWinSock.c:2022:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(channelName, SOCK_TEMPLATE, statePtr); data/tcl8.6-8.6.10+dfsg/win/tclWinSock.c:2183:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(channelName, SOCK_TEMPLATE, statePtr); data/tcl8.6-8.6.10+dfsg/win/tclWinSock.c:2271:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(channelName, SOCK_TEMPLATE, newInfoPtr); data/tcl8.6-8.6.10+dfsg/compat/stdlib.h:27:16: [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. extern char * getenv(const char *name); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:402:11: [3] (random) setstate: 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. this->setstate(std::ios_base::failbit); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:413:11: [3] (random) setstate: 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. this->setstate(std::ios_base::failbit); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:423:11: [3] (random) setstate: 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. this->setstate(std::ios_base::failbit); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:457:11: [3] (random) setstate: 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. this->setstate(std::ios_base::failbit); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:468:11: [3] (random) setstate: 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. this->setstate(std::ios_base::failbit); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:478:11: [3] (random) setstate: 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. this->setstate(std::ios_base::failbit); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/crypt.h:112:9: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand((unsigned)(time(NULL) ^ ZCR_SEED2)); data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:587:9: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("TCL_PKG_PREFER_LATEST") == NULL) { data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:617:9: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("TCL_INTERP_DEBUG_FRAME") != NULL) { data/tcl8.6-8.6.10+dfsg/generic/tclClock.c:1662:16: [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. varValue = getenv(varName); data/tcl8.6-8.6.10+dfsg/generic/tclClock.c:2037:15: [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. tzIsNow = getenv("TZ"); data/tcl8.6-8.6.10+dfsg/generic/tclIOUtil.c:3183:15: [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. skipstr = getenv ("TCL_TEMPLOAD_NO_UNLINK"); data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:252:12: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. return realpath(path, resolved); data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:255:21: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. # define Realpath realpath data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:2256: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. dir = getenv("TMPDIR"); data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:79:9: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. p = getenv("PATH"); /* INTL: Native. */ data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:712:9: [3] (buffer) getwd: This does not protect against buffer overflows by itself, so use with caution (CWE-120, CWE-20). Use getcwd instead. if (getwd(buffer) == NULL) { /* INTL: Native. */ data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:766:9: [3] (buffer) getwd: This does not protect against buffer overflows by itself, so use with caution (CWE-120, CWE-20). Use getcwd instead. if (getwd(buffer) == NULL) /* INTL: Native. */ data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c:481: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. str = getenv("TCL_LIBRARY"); /* INTL: Native. */ data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c:669:16: [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. encoding = getenv("LC_ALL"); data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c:672:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. encoding = getenv("LC_CTYPE"); data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c:675:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. encoding = getenv("LANG"); data/tcl8.6-8.6.10+dfsg/unix/tclUnixTime.c:563:25: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *newTZ = getenv("TZ"); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:258:10: [3] (shell) CreateProcess: This causes a new process to execute and is difficult to use safely (CWE-78). Specify the application path in the first argument, NOT as part of the second, or embedded spaces could allow an attacker to force a different program to run. ok = CreateProcess( data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:258:10: [3] (shell) CreateProcess: This causes a new process to execute and is difficult to use safely (CWE-78). Specify the application path in the first argument, NOT as part of the second, or embedded spaces could allow an attacker to force a different program to run. ok = CreateProcess( data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:392:10: [3] (shell) CreateProcess: This causes a new process to execute and is difficult to use safely (CWE-78). Specify the application path in the first argument, NOT as part of the second, or embedded spaces could allow an attacker to force a different program to run. ok = CreateProcess( data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:392:10: [3] (shell) CreateProcess: This causes a new process to execute and is difficult to use safely (CWE-78). Specify the application path in the first argument, NOT as part of the second, or embedded spaces could allow an attacker to force a different program to run. ok = CreateProcess( data/tcl8.6-8.6.10+dfsg/win/tclWinNotify.c:116:2: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&tsdPtr->crit); data/tcl8.6-8.6.10+dfsg/win/tclWinNotify.c:238:6: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&tsdPtr->crit); data/tcl8.6-8.6.10+dfsg/win/tclWinNotify.c:397:2: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&tsdPtr->crit); data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:771:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&infoPtr->csWrite); data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:815:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&infoPtr->csWrite); data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:1006:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&infoPtr->csWrite); data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:1461:5: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&infoPtr->csWrite); data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:2140:2: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&infoPtr->csWrite); data/tcl8.6-8.6.10+dfsg/win/tclWinThrd.c:225:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&joinLock); data/tcl8.6-8.6.10+dfsg/win/tclWinThrd.c:305:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&joinLock); data/tcl8.6-8.6.10+dfsg/win/tclWinThrd.c:369:2: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&joinLock); data/tcl8.6-8.6.10+dfsg/win/tclWinThrd.c:370:2: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&initLock); data/tcl8.6-8.6.10+dfsg/win/tclWinThrd.c:371:2: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&masterLock); data/tcl8.6-8.6.10+dfsg/win/tclWinThrd.c:373:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&initLock); data/tcl8.6-8.6.10+dfsg/win/tclWinThrd.c:431:2: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&joinLock); data/tcl8.6-8.6.10+dfsg/win/tclWinThrd.c:432:2: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&initLock); data/tcl8.6-8.6.10+dfsg/win/tclWinThrd.c:433:2: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&masterLock); data/tcl8.6-8.6.10+dfsg/win/tclWinThrd.c:435:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&masterLock); data/tcl8.6-8.6.10+dfsg/win/tclWinThrd.c:485:2: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&allocLock.crit); data/tcl8.6-8.6.10+dfsg/win/tclWinThrd.c:578:6: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(csPtr); data/tcl8.6-8.6.10+dfsg/win/tclWinThrd.c:585:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(csPtr); data/tcl8.6-8.6.10+dfsg/win/tclWinThrd.c:721:6: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&winCondPtr->condLock); data/tcl8.6-8.6.10+dfsg/win/tclWinThrd.c:744:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&winCondPtr->condLock); data/tcl8.6-8.6.10+dfsg/win/tclWinThrd.c:773:2: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&winCondPtr->condLock); data/tcl8.6-8.6.10+dfsg/win/tclWinThrd.c:807:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(csPtr); data/tcl8.6-8.6.10+dfsg/win/tclWinThrd.c:849:2: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&winCondPtr->condLock); data/tcl8.6-8.6.10+dfsg/win/tclWinThrd.c:954:5: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&lockPtr->wlock); data/tcl8.6-8.6.10+dfsg/win/tclWinTime.c:546:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&timeInfo.cs); data/tcl8.6-8.6.10+dfsg/win/tclWinTime.c:587:2: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&timeInfo.cs); data/tcl8.6-8.6.10+dfsg/win/tclWinTime.c:1192:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&timeInfo.cs); data/tcl8.6-8.6.10+dfsg/compat/dirent2.h:29:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char d_name[MAXNAMLEN + 1]; /* Name must be no longer than this */ data/tcl8.6-8.6.10+dfsg/compat/dirent2.h:42: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 dd_buf[DIRBLKSIZ]; data/tcl8.6-8.6.10+dfsg/compat/fake-rfc2553.c:75:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpserv[16]; data/tcl8.6-8.6.10+dfsg/compat/fake-rfc2553.h:49:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char __ss_pad2[_SS_PADSIZE]; data/tcl8.6-8.6.10+dfsg/compat/mkstemp.c:34:1: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). mkstemp( data/tcl8.6-8.6.10+dfsg/compat/mkstemp.c:74:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(template, O_RDWR|O_CREAT|O_EXCL, 0600); data/tcl8.6-8.6.10+dfsg/compat/opendir.c:28:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(myname, 0, 0)) == -1) { data/tcl8.6-8.6.10+dfsg/compat/opendir.c:50: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 od_name[ODIRSIZ]; data/tcl8.6-8.6.10+dfsg/compat/opendir.c:58:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char od_name[ODIRSIZ]; data/tcl8.6-8.6.10+dfsg/compat/stdlib.h:22:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). extern int atoi(const char *string); data/tcl8.6-8.6.10+dfsg/compat/stdlib.h:23:14: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). extern long atol(const char *string); data/tcl8.6-8.6.10+dfsg/compat/string.h:30: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. extern char * memcpy(void *t, const void *f, size_t n); data/tcl8.6-8.6.10+dfsg/compat/string.h:32:25: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define memmove(d,s,n) (bcopy((s), (d), (n))) data/tcl8.6-8.6.10+dfsg/compat/unistd.h:73:13: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. extern int vfork(void); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/blast/blast.c:58:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char out[MAXWIN]; /* output buffer and sliding window */ data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/blast/blast.c:312:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char extra[16] = { /* extra bits for length codes */ data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/blast/blast.c:434:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static unsigned char hold[CHUNK]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream/zfstream.cpp:18:23: [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). gzfilebuf *gzfilebuf::open( const char *name, data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream/zfstream.cpp:24: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 char_mode[10]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream/zfstream.cpp:66: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 char_mode[10]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream/zfstream.cpp:270:27: [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). void gzfilestream_common::open( const char *name, int io_mode ) { data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream/zfstream.cpp:272: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). if ( !buffer.open( name, io_mode ) ) data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream/zfstream.cpp:300:24: [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). gzfilestream_common::open( name, io_mode ); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream/zfstream.cpp:320:24: [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). gzfilestream_common::open( name, io_mode ); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream/zfstream.h:15: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). gzfilebuf *open( const char *name, int io_mode ); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream/zfstream.h:55:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). void open( const char *name, int io_mode ); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream2/zstream.h:55:40: [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). izstream(FILE* fp) : m_fp(0) { open(fp); } data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream2/zstream.h:56:48: [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). izstream(const char* name) : m_fp(0) { open(name); } data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream2/zstream.h:65: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). void open(const char* name) { data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream2/zstream.h:70: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). void open(FILE* fp) { data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream2/zstream.h:162: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). open(fp, level); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream2/zstream.h:166: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). open(name, level); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream2/zstream.h:177: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). void open(const char* name, int level = Z_DEFAULT_COMPRESSION) { data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream2/zstream.h:178:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mode[4] = "wb\0"; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream2/zstream.h:186: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). void open(FILE* fp, int level = Z_DEFAULT_COMPRESSION) { data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream2/zstream.h:188:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mode[4] = "wb\0"; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream2/zstream_test.cpp:7: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 h[256] = "Hello"; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream2/zstream_test.cpp:19:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). out.open("temp.gz"); // try ascii output; zcat temp.gz to see the results data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/test.cc:15:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[80]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/test.cc:17:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). outf.open("test1.txt.gz"); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/test.cc:26: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). inf.open("test1.txt.gz"); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/test.cc:33:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). outf.open("test2.txt.gz"); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/test.cc:42: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). inf.open("test2.txt.gz"); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:51:12: [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). gzfilebuf::open(const char *name, data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:62: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 char_mode[6] = "\0\0\0\0\0"; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:90: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 char_mode[6] = "\0\0\0\0\0"; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:384:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). this->open(name, mode); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:398: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). gzifstream::open(const char* name, data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:401: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 (!sb.open(name, mode | std::ios_base::in)) data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:439:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). this->open(name, mode); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:453: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). gzofstream::open(const char* name, data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:456: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 (!sb.open(name, mode | std::ios_base::out)) data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.h:66:3: [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). open(const char* name, data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.h:285:3: [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). open(const char* name, data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.h:374:3: [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). open(const char* name, data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/crypt.h:100:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char header[RAND_HEAD_LEN-2]; /* random header */ data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/ioapi.c:18:36: [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). #define FOPEN_FUNC(filename, mode) fopen(filename, mode) data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/ioapi.c:23:36: [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). #define FOPEN_FUNC(filename, mode) fopen(filename, mode) data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/ioapi.c:113:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen(filename, mode_fopen); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/ioapi.h:49: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). #define fopen64 fopen data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/ioapi.h:54: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). #define fopen64 fopen data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/ioapi.h:59: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). #define fopen64 fopen data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/iowin32.c:112:9: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/iowin32.c:137:9: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/iowin32.c:185:9: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/miniunz.c:32:36: [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). #define FOPEN_FUNC(filename, mode) fopen(filename, mode) data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/miniunz.c:209: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 number[21]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/miniunz.c:248:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename_inzip[256]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/miniunz.c:318: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 filename_inzip[256]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/miniunz.c:386:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char answer[128]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/miniunz.c:541:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename_try[MAXFILENAME+16] = ""; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/miniunz.c:621:13: [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_try,".zip"); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/minizip.c:31:36: [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). #define FOPEN_FUNC(filename, mode) fopen(filename, mode) data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/minizip.c:36:36: [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). #define FOPEN_FUNC(filename, mode) fopen(filename, mode) data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/minizip.c:112:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[MAXFILENAME+1]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/minizip.c:258:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[WRITEBUFFERSIZE]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/minizip.c:366: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 newname[512]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/minizip.c:399: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 filename_try[MAXFILENAME+16]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/minizip.c:479:13: [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_try,".zip"); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/minizip.c:494:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char answer[128]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/mztools.c:38: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). FILE* fpZip = fopen(file, "rb"); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/mztools.c:39: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). FILE* fpOut = fopen(fileOut, "wb"); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/mztools.c:40:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* fpOutCD = fopen(fileOutTmp, "wb"); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/mztools.c:44:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char header[30]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/mztools.c:45: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 filename[1024]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/mztools.c:46:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char extra[1024]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/mztools.c:149: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 header[46]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/mztools.c:224:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char header[22]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/mztools.c:257: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). fpOutCD = fopen(fileOutTmp, "rb"); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/mztools.c:260:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[8192]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/unzip.c:1266:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/unzip.c:1482: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 source[12]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/zip.c:120:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char data[SIZEDATA_INDATABLOCK]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/zip.c:289:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[8]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/zip.c:1246:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char bufHead[RAND_HEAD_LEN]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/zip.c:1980: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(pTmp, p, dataSize + 4); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/zip.c:1994: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(pData, pNewHeader, size); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/puff/pufftest.c:70: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). in = name == NULL ? stdin : fopen(name, "rb"); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/puff/pufftest.c:105:34: [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). skip = (unsigned)atoi(arg + 1); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/testzlib/testzlib.c:124: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). stream=fopen(filename, "rb"); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/testzlib/testzlib.c:175:27: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). BlockSizeCompress=atol(argv[2]); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/testzlib/testzlib.c:178:29: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). BlockSizeUncompress=atol(argv[3]); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/testzlib/testzlib.c:181:23: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). cprLevel=(int)atol(argv[4]); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:70: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 name[100]; /* 0 */ data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:71: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 mode[8]; /* 100 */ data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:72: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 uid[8]; /* 108 */ data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c: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 gid[8]; /* 116 */ data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:74: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 size[12]; /* 124 */ data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:75: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 mtime[12]; /* 136 */ data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:76:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char chksum[8]; /* 148 */ data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:78: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 linkname[100]; /* 157 */ data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:79: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 magic[6]; /* 257 */ data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:80: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 version[2]; /* 263 */ data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:81: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 uname[32]; /* 265 */ data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:82: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 gname[32]; /* 297 */ data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:83: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 devmajor[8]; /* 329 */ data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:84: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 devminor[8]; /* 337 */ data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:85:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char prefix[155]; /* 345 */ data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:91:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[BLOCKSIZE]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:134:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buffer[1024]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:194:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char result[32]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:197: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(result,"%4d/%02d/%02d %02d:%02d:%02d", data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:394: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 fname[BLOCKSIZE]; data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:482: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). outfile = fopen(fname,"wb"); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:490:37: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). outfile = fopen(fname,"wb"); data/tcl8.6-8.6.10+dfsg/compat/zlib/crc32.c:143: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). out = fopen("crc32.h", "w"); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/enough.c:476:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). syms = atoi(argv[1]); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/enough.c:478:20: [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). root = atoi(argv[2]); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/enough.c:480:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). max = atoi(argv[3]); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/fitblk.c:76:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char raw[RAWLEN]; data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/fitblk.c:99:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char raw[RAWLEN]; data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gun.c:161:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char inbuf[SIZE]; /* input buffer */ data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gun.c:162:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char outbuf[SIZE]; /* output buffer */ data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gun.c:164:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char suffix[65536]; /* one-character LZW suffix */ data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gun.c:165:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char match[65280 + 2]; /* buffer for reversed match or gzip data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gun.c:559: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). infile = open(inname, O_RDONLY, 0); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gun.c:572: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). outfile = open(outname, O_CREAT | O_TRUNC | O_WRONLY, 0666); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gun.c:689: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(outname, *argv, len); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzappend.c:140: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(list, list + 1, len - 1); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzappend.c:270: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). gz.fd = open(name, O_RDWR, 0); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzappend.c:397: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). fd = open(name, O_RDONLY, 0); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzjoin.c:108: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). in->fd = open(name, O_RDONLY, 0); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:290:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char id[4]; /* contains LOGID to detect inadvertent overwrites */ data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:353: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(log->end, ".lock"); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:354: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). while ((fd = open(log->path, O_CREAT | O_EXCL, 0644)) < 0) { data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:376: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(log->end, ".lock"); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:388: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(log->end, ".lock"); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:400: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(log->end, ".lock"); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:413:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[HEAD + EXTRA]; data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:440:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char ext[EXTRA]; data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:465:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[6]; data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:505:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[8]; data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:559: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(log->end, ".add"); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:577: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(log->end, ".add"); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:582: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(log->end, ".dict"); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:587: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(log->end, ".temp"); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:615:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[DICT]; data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:628: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(log->end, ".dict"); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:629: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). fd = open(log->path, O_RDONLY, 0); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:724: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(log->end, ".repairs"); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:725: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). rec = fopen(log->path, "a"); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:750: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(log->end, ".add"); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:758:23: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(log->path, O_RDONLY, 0)) < 0) { data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:828: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(log->end, ".gz"); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:829:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). log->fd = open(log->path, O_RDWR | O_CREAT, 0644); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:843: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(log->end, ".dict"); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:913:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char *data, buf[5]; data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:952: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(log->end, ".add"); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:953: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). fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:962: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(log->end, ".temp"); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:963: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). fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:1013: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(log->end, ".add"); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:1014: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). fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:1056: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(log->id, "bad"); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zpipe.c:41:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char in[CHUNK]; data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zpipe.c:42:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char out[CHUNK]; data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zpipe.c:97:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char in[CHUNK]; data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zpipe.c:98:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char out[CHUNK]; data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zran.c:71:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char window[WINSIZE]; /* preceding 32K of uncompressed data */ data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zran.c:127: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(next->window, window + WINSIZE - left, left); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zran.c:129: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(next->window + left, window, WINSIZE - left); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zran.c:151:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char input[CHUNK]; data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zran.c:152:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char window[WINSIZE]; data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zran.c:255:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char input[CHUNK]; data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zran.c:256:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char discard[WINSIZE]; data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zran.c:360:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[CHUNK]; data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zran.c:367: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). in = fopen(argv[1], "rb"); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzguts.h:47: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). # define open _open data/tcl8.6-8.6.10+dfsg/compat/zlib/gzlib.c:36:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[1024]; data/tcl8.6-8.6.10+dfsg/compat/zlib/gzlib.c:65:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "unknown win32 error (%ld)", error); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzlib.c:245:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open((const char *)path, oflag, 0666)); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzlib.c:298: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(path, "<fd:%d>", fd); /* for debugging */ data/tcl8.6-8.6.10+dfsg/compat/zlib/gzlib.c:615:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(state->msg, ": "); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzread.c:161: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(state->x.next, strm->next_in, strm->avail_in); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzread.c:325:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, state->x.next, n); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzread.c:451:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[1]; data/tcl8.6-8.6.10+dfsg/compat/zlib/gzread.c:591:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, state->x.next, n); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzwrite.c:213: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(state->in + have, buf, copy); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzwrite.c:309:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[1]; data/tcl8.6-8.6.10+dfsg/compat/zlib/gzwrite.c:444: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(state->in, state->in + state->size, left); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzwrite.c:543: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(state->in, state->in + state->size, left); data/tcl8.6-8.6.10+dfsg/compat/zlib/inflate.c:640:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hbuf[4]; /* buffer for gzip header crc calculation */ data/tcl8.6-8.6.10+dfsg/compat/zlib/inflate.c:1405:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[4]; /* to restore bit buffer to byte string */ data/tcl8.6-8.6.10+dfsg/compat/zlib/test/example.c:98: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((char*)uncompr, "garbage"); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/example.c:149: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((char*)uncompr, "garbage"); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/example.c:245: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((char*)uncompr, "garbage"); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/example.c:341: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((char*)uncompr, "garbage"); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/example.c:420: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((char*)uncompr, "garbage"); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/example.c:501: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((char*)uncompr, "garbage"); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/infcover.c:392:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char dict[257]; data/tcl8.6-8.6.10+dfsg/compat/zlib/test/infcover.c:474:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char win[32768]; data/tcl8.6-8.6.10+dfsg/compat/zlib/test/infcover.c:530:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(prefix, "-late"); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/infcover.c:556:9: [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(prefix, "-back"); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:83:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[1024]; data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:112:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "unknown win32 error (%ld)", error); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:223: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). fopen(path, gz->write ? "wb" : "rb"); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:242:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char out[BUFLEN]; data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:267:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char in[1]; data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:301:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char out[BUFLEN]; data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:366: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. local char buf[BUFLEN]; data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:434: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. local char buf[BUFLEN]; data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:461: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. local char outfile[MAX_NAME_LEN]; data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:477: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). in = fopen(file, "rb"); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:499: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. local char buf[MAX_NAME_LEN]; data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:534:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). out = fopen(outfile, "wb"); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:563: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 *bname, outmode[20]; data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:568: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(outmode, "wb6 "); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:633: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 * in = fopen(*argv, "rb"); data/tcl8.6-8.6.10+dfsg/compat/zlib/trees.c:328:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *header = fopen("trees.h", "w"); data/tcl8.6-8.6.10+dfsg/compat/zlib/zutil.c:13:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. z_const char * const z_errmsg[10] = { data/tcl8.6-8.6.10+dfsg/compat/zlib/zutil.h:49: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. extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ data/tcl8.6-8.6.10+dfsg/compat/zlib/zutil.h:109:6: [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). fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") data/tcl8.6-8.6.10+dfsg/compat/zlib/zutil.h:202: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). # define F_OPEN(name, mode) fopen((name), (mode)) data/tcl8.6-8.6.10+dfsg/compat/zlib/zutil.h:226:21: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define zmemcpy memcpy data/tcl8.6-8.6.10+dfsg/generic/regc_color.c:194: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(newt->tcolor, t->tcolor, BYTTAB*sizeof(color)); data/tcl8.6-8.6.10+dfsg/generic/regc_color.c:196: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(newt->tptr, t->tptr, BYTTAB*sizeof(union tree *)); data/tcl8.6-8.6.10+dfsg/generic/regc_color.c:268: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(newCd, cm->cdspace, data/tcl8.6-8.6.10+dfsg/generic/regc_color.c:524: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(t->tptr, fillt->tptr, BYTTAB*sizeof(union tree *)); data/tcl8.6-8.6.10+dfsg/generic/regc_nfa.c:2524: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(donemap, outerdonemap, nstates * sizeof(char)); data/tcl8.6-8.6.10+dfsg/generic/regcomp.c:486: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, v->subs, v->nsubs * sizeof(struct subre *)); data/tcl8.6-8.6.10+dfsg/generic/regcomp.c:1924: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 idbuf[50]; data/tcl8.6-8.6.10+dfsg/generic/regcomp.c:2118: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 idbuf[50]; data/tcl8.6-8.6.10+dfsg/generic/regcomp.c:2189: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(buf, "%d", t->id); data/tcl8.6-8.6.10+dfsg/generic/regcomp.c:2191: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(buf, "%p", t); data/tcl8.6-8.6.10+dfsg/generic/regerror.c:66: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 convbuf[sizeof(unk)+50]; /* 50 = plenty for int */ data/tcl8.6-8.6.10+dfsg/generic/regerror.c:77: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(convbuf, "%d", r->code); /* -1 for unknown */ data/tcl8.6-8.6.10+dfsg/generic/regerror.c:81:10: [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). icode = atoi(errbuf); /* Not our problem if this fails */ data/tcl8.6-8.6.10+dfsg/generic/regerror.c:90:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(convbuf, "REG_%u", (unsigned)icode); data/tcl8.6-8.6.10+dfsg/generic/regexec.c:271: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(VS(pmatch), VS(v->pmatch), n*sizeof(regmatch_t)); data/tcl8.6-8.6.10+dfsg/generic/regexec.c:322: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). chr *open, *close; /* Open and close of range of possible data/tcl8.6-8.6.10+dfsg/generic/regexec.c:362:43: [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). MDEBUG(("between %ld and %ld\n", LOFF(open), LOFF(close))); data/tcl8.6-8.6.10+dfsg/generic/regexec.c:366: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). for (begin = open; begin <= close; begin++) { data/tcl8.6-8.6.10+dfsg/generic/regexec.c:468: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). chr *open, *close; /* Open and close of range of possible data/tcl8.6-8.6.10+dfsg/generic/regexec.c:486:41: [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). MDEBUG(("cbetween %ld and %ld\n", LOFF(open), LOFF(close))); data/tcl8.6-8.6.10+dfsg/generic/regexec.c:487:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). for (begin = open; begin <= close; begin++) { data/tcl8.6-8.6.10+dfsg/generic/tcl.h:871: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 resultSpace[TCL_RESULT_SIZE+1]; data/tcl8.6-8.6.10+dfsg/generic/tcl.h:990: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 staticSpace[TCL_DSTRING_STATIC_SIZE]; data/tcl8.6-8.6.10+dfsg/generic/tcl.h:1200:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char string[1]; /* String for key. The actual size will be as data/tcl8.6-8.6.10+dfsg/generic/tclAlloc.c:51:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char padding[TCL_ALLOCALIGN]; /* align struct to TCL_ALLOCALIGN bytes */ data/tcl8.6-8.6.10+dfsg/generic/tclAlloc.c:607: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(newPtr, oldPtr, (size_t) numBytes); data/tcl8.6-8.6.10+dfsg/generic/tclAssembly.c:1934: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(curr_bb->foreignExceptions, data/tcl8.6-8.6.10+dfsg/generic/tclAssembly.c:4185: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(envPtr->exceptArrayPtr + rangeIndex, range, data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:466:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char c[sizeof(short)]; data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:472: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 mathFuncName[32]; data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:885: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(mathFuncName, "::tcl::mathfunc::", MATH_FUNC_PREFIX_LEN); data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:904:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(mathFuncName, "::tcl::mathop::", MATH_OP_PREFIX_LEN); data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:1087:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[32 + TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:1091: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, "Assoc Data Key #%d", *assocDataCounterPtr); data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:3545: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(data->argTypes, argTypes, numArgs * sizeof(Tcl_ValueType)); data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:4141: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(cancelInfo->result, result, (size_t) cancelInfo->length); data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:4428:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *a[10]; data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:4439:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *a[6]; int i[2]; data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:4722: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(newObjv+handlerObjc, objv, sizeof(Tcl_Obj *) * (unsigned)objc); data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:5675:39: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. Tcl_FindHashEntry(iPtr->lineLAPtr, (char *) objv[i]); data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:6328:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:6341: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(buf, "%d", returnCode); data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:8039:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *a[10]; data/tcl8.6-8.6.10+dfsg/generic/tclBinary.c:104:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char HexDigits[16] = { data/tcl8.6-8.6.10+dfsg/generic/tclBinary.c:109:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char UueDigits[65] = { data/tcl8.6-8.6.10+dfsg/generic/tclBinary.c:121:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char B64Digits[65] = { data/tcl8.6-8.6.10+dfsg/generic/tclBinary.c:202:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char bytes[1]; /* The array of bytes. The actual size of this data/tcl8.6-8.6.10+dfsg/generic/tclBinary.c:342: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(byteArrayPtr->bytes, bytes, (size_t) length); data/tcl8.6-8.6.10+dfsg/generic/tclBinary.c:535: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(copyArrayPtr->bytes, srcArrayPtr->bytes, (size_t) length); data/tcl8.6-8.6.10+dfsg/generic/tclBinary.c:596:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, (size_t) size); data/tcl8.6-8.6.10+dfsg/generic/tclBinary.c:700: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(byteArrayPtr->bytes + byteArrayPtr->used, bytes, len); data/tcl8.6-8.6.10+dfsg/generic/tclBinary.c:985: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(cursor, bytes, (size_t) count); data/tcl8.6-8.6.10+dfsg/generic/tclBinary.c:987: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(cursor, bytes, (size_t) length); data/tcl8.6-8.6.10+dfsg/generic/tclBinary.c:1226:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_UTF_MAX + 1] = ""; data/tcl8.6-8.6.10+dfsg/generic/tclBinary.c:1596:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_UTF_MAX + 1] = ""; data/tcl8.6-8.6.10+dfsg/generic/tclBinary.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(to, from, length); data/tcl8.6-8.6.10+dfsg/generic/tclBinary.c:2396:34: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. datastart = data = (unsigned char *) data/tcl8.6-8.6.10+dfsg/generic/tclBinary.c:2474: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(cursor, wrapchar, wrapcharlen); \ data/tcl8.6-8.6.10+dfsg/generic/tclBinary.c:2547: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. unsigned char d[3] = {0, 0, 0}; data/tcl8.6-8.6.10+dfsg/generic/tclBinary.c:2739:34: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. datastart = data = (unsigned char *) data/tcl8.6-8.6.10+dfsg/generic/tclBinary.c:2754:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char d[4] = {0, 0, 0, 0}; data/tcl8.6-8.6.10+dfsg/generic/tclBinary.c:2903:34: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. datastart = data = (unsigned char *) data/tcl8.6-8.6.10+dfsg/generic/tclCkalloc.c:39: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 string[1]; /* Actual size of string will be as large as data/tcl8.6-8.6.10+dfsg/generic/tclCkalloc.c:64:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char low_guard[LOW_GUARD_SIZE]; data/tcl8.6-8.6.10+dfsg/generic/tclCkalloc.c:68:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char body[1]; /* First byte of client's space. Actual size data/tcl8.6-8.6.10+dfsg/generic/tclCkalloc.c:118: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 dumpFile[100]; /* Records where to dump memory allocation data/tcl8.6-8.6.10+dfsg/generic/tclCkalloc.c:181:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/tcl8.6-8.6.10+dfsg/generic/tclCkalloc.c:186: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(buf, data/tcl8.6-8.6.10+dfsg/generic/tclCkalloc.c:353: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). fileP = fopen(fileName, "w"); data/tcl8.6-8.6.10+dfsg/generic/tclCkalloc.c:696: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(newPtr, ptr, (size_t) copySize); data/tcl8.6-8.6.10+dfsg/generic/tclCkalloc.c:730: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(newPtr, ptr, (size_t) copySize); data/tcl8.6-8.6.10+dfsg/generic/tclCkalloc.c:887: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). fileP = fopen(fileName, "w"); data/tcl8.6-8.6.10+dfsg/generic/tclCkalloc.c:926: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(curTagPtr->string, argv[2], len + 1); data/tcl8.6-8.6.10+dfsg/generic/tclClock.c:246: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 cmdName[50]; /* Buffer large enough to hold the string data/tcl8.6-8.6.10+dfsg/generic/tclClock.c:292: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(cmdName, "::tcl::clock::", TCL_CLOCK_PREFIX_LEN); data/tcl8.6-8.6.10+dfsg/generic/tclClock.c:1055:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[8]; /* Buffer for time zone name */ data/tcl8.6-8.6.10+dfsg/generic/tclClock.c:1108: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+1, "%02d", diff / 3600); data/tcl8.6-8.6.10+dfsg/generic/tclClock.c:1110: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+3, "%02d", diff / 60); data/tcl8.6-8.6.10+dfsg/generic/tclClock.c:1113: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(buffer+5, "%02d", diff); data/tcl8.6-8.6.10+dfsg/generic/tclClock.c:1708: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(tmPtr, localtime(timePtr), sizeof(struct tm)); data/tcl8.6-8.6.10+dfsg/generic/tclCmdIL.c:1278:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *const typeString[TCL_LOCATION_LAST] = { data/tcl8.6-8.6.10+dfsg/generic/tclCmdMZ.c:1429:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_UTF_MAX] = ""; data/tcl8.6-8.6.10+dfsg/generic/tclCmdMZ.c:2316: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(string2 + (length1 * index), string1, (size_t) length1); data/tcl8.6-8.6.10+dfsg/generic/tclCompCmds.c:2266: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(dui2Ptr, dui1Ptr, len); data/tcl8.6-8.6.10+dfsg/generic/tclCompCmds.c:3530: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(elemTokenPtr+1, varTokenPtr+2, data/tcl8.6-8.6.10+dfsg/generic/tclCompCmdsSZ.c:836:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclCompCmdsSZ.c:839:8: [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. len = sprintf(buf, "%d", len); data/tcl8.6-8.6.10+dfsg/generic/tclCompCmdsSZ.c:1499:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_UTF_MAX] = ""; data/tcl8.6-8.6.10+dfsg/generic/tclCompCmdsSZ.c:3006:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclCompCmdsSZ.c:3071: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(buf, "%d", matchCodes[i]); data/tcl8.6-8.6.10+dfsg/generic/tclCompCmdsSZ.c:3216:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclCompCmdsSZ.c:3283: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(buf, "%d", matchCodes[i]); data/tcl8.6-8.6.10+dfsg/generic/tclCompExpr.c:1562: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(subExprTokenPtr, tokenPtr, data/tcl8.6-8.6.10+dfsg/generic/tclCompExpr.c:1579: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(subExprTokenPtr, tokenPtr, data/tcl8.6-8.6.10+dfsg/generic/tclCompExpr.c:2069:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char utfBytes[TCL_UTF_MAX]; data/tcl8.6-8.6.10+dfsg/generic/tclCompExpr.c:2071: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(utfBytes, start, (size_t) numBytes); data/tcl8.6-8.6.10+dfsg/generic/tclCompile.c:1726: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 utfBuf[TCL_UTF_MAX] = ""; data/tcl8.6-8.6.10+dfsg/generic/tclCompile.c:2374:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[TCL_UTF_MAX] = ""; data/tcl8.6-8.6.10+dfsg/generic/tclCompile.c:2823: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(p, envPtr->codeStart, (size_t) codeBytes); data/tcl8.6-8.6.10+dfsg/generic/tclCompile.c:2856:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, envPtr->exceptArrayPtr, (size_t) exceptArrayBytes); data/tcl8.6-8.6.10+dfsg/generic/tclCompile.c:2864:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, envPtr->auxDataArrayPtr, (size_t) auxDataArrayBytes); data/tcl8.6-8.6.10+dfsg/generic/tclCompile.c:3031: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(localPtr->name, name, (size_t) nameBytes); data/tcl8.6-8.6.10+dfsg/generic/tclCompile.c:3086: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(newPtr, envPtr->codeStart, currBytes); data/tcl8.6-8.6.10+dfsg/generic/tclCompile.c:3153: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(newPtr, envPtr->cmdMapPtr, currBytes); data/tcl8.6-8.6.10+dfsg/generic/tclCompile.c:3360: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(newPtr, envPtr->exceptArrayPtr, currBytes); data/tcl8.6-8.6.10+dfsg/generic/tclCompile.c:3361: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(newPtr2, envPtr->exceptAuxArrayPtr, currBytes2); data/tcl8.6-8.6.10+dfsg/generic/tclCompile.c:3723: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(newPtr, envPtr->auxDataArrayPtr, currBytes); data/tcl8.6-8.6.10+dfsg/generic/tclCompile.c:3812: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(newPtr, fixupArrayPtr->fixup, currBytes); data/tcl8.6-8.6.10+dfsg/generic/tclCompile.h:356:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char staticCodeSpace[COMPILEENV_INIT_CODE_BYTES]; data/tcl8.6-8.6.10+dfsg/generic/tclCompile.h:1843:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char n[35]; \ data/tcl8.6-8.6.10+dfsg/generic/tclCompile.h:1844: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(n, "/tmp/tclDTraceDebug-%lu.log", \ data/tcl8.6-8.6.10+dfsg/generic/tclCompile.h:1846: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). tclDTraceDebugLog = fopen(n, "a"); \ data/tcl8.6-8.6.10+dfsg/generic/tclDate.c:1176:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; data/tcl8.6-8.6.10+dfsg/generic/tclDate.c:1193:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char yyformat[sizeof yyunexpected data/tcl8.6-8.6.10+dfsg/generic/tclDate.c:1367: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/tcl8.6-8.6.10+dfsg/generic/tclDate.c:2678: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 buff[20]; data/tcl8.6-8.6.10+dfsg/generic/tclDictObj.c:491: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 localFlags[LOCAL_SIZE], *flagPtr = NULL; data/tcl8.6-8.6.10+dfsg/generic/tclDisassemble.c:255: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 ptrBuf1[20], ptrBuf2[20]; data/tcl8.6-8.6.10+dfsg/generic/tclDisassemble.c:270: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(ptrBuf1, "%p", codePtr); data/tcl8.6-8.6.10+dfsg/generic/tclDisassemble.c:271: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(ptrBuf2, "%p", iPtr); data/tcl8.6-8.6.10+dfsg/generic/tclDisassemble.c:317: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(ptrBuf1, "%p", procPtr); data/tcl8.6-8.6.10+dfsg/generic/tclDisassemble.c:542: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 suffixBuffer[128]; /* Additional info to print after main opcode data/tcl8.6-8.6.10+dfsg/generic/tclDisassemble.c:567: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(suffixBuffer+strlen(suffixBuffer), data/tcl8.6-8.6.10+dfsg/generic/tclDisassemble.c:574:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(suffixBuffer, "pc %u", pcOffset+opnd); data/tcl8.6-8.6.10+dfsg/generic/tclDisassemble.c:580: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(suffixBuffer, "next cmd at pc %u", pcOffset+opnd); data/tcl8.6-8.6.10+dfsg/generic/tclDisassemble.c:582: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(suffixBuffer, "pc %u", pcOffset+opnd); data/tcl8.6-8.6.10+dfsg/generic/tclDisassemble.c:628: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(suffixBuffer, "temp var %u", (unsigned) opnd); data/tcl8.6-8.6.10+dfsg/generic/tclDisassemble.c:630: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(suffixBuffer, "var "); data/tcl8.6-8.6.10+dfsg/generic/tclDisassemble.c:825:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *s, buf[20]; data/tcl8.6-8.6.10+dfsg/generic/tclDisassemble.c:829:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "inst_%d", inst); data/tcl8.6-8.6.10+dfsg/generic/tclDisassemble.c:832:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. s = (char *) tclInstructionTable[objPtr->internalRep.longValue].name; data/tcl8.6-8.6.10+dfsg/generic/tclDisassemble.c:836: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(objPtr->bytes, s, len + 1); data/tcl8.6-8.6.10+dfsg/generic/tclDisassemble.c:1540:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (char *) objv[3]); data/tcl8.6-8.6.10+dfsg/generic/tclDisassemble.c:1559:46: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. hPtr = Tcl_FindHashEntry(oPtr->methodsPtr, (char *) objv[3]); data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:64: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 prefixBytes[256]; /* If a byte in the input stream is a lead data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:96: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 sequence[16]; /* Escape code that marks this encoding. */ data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:97:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[32]; /* Name for encoding. */ data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:108: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 init[16]; /* String to emit or expect before first char data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:111: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 final[16]; /* String to emit or expect after last char in data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:113: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 prefixBytes[256]; /* If a byte in the input stream is the first data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:1692:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char used[256]; data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:1992: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 init[16], final[16]; data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:2057: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(dataPtr->init, init, dataPtr->initLen + 1); data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:2059: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(dataPtr->final, final, dataPtr->finalLen + 1); data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:2062: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(dataPtr->subTables, Tcl_DStringValue(&escapeData), data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:2151:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, srcLen); data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:3360:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, dataPtr->init, dataPtr->initLen); data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:3437: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(dst, subTablePtr->sequence, data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:3478: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(dst, dataPtr->subTables[0].sequence, len); data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:3481: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(dst, dataPtr->final, dataPtr->finalLen); data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:3682: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(*valuePtr, bytes, (size_t) numBytes + 1); data/tcl8.6-8.6.10+dfsg/generic/tclEnsemble.c:2174: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(store, iPtr->ensembleRewrite.sourceObjs, data/tcl8.6-8.6.10+dfsg/generic/tclEnv.c:244: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(newEnviron, environ, length * sizeof(char *)); data/tcl8.6-8.6.10+dfsg/generic/tclEnv.c:287: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(p, name, nameLength); data/tcl8.6-8.6.10+dfsg/generic/tclEnv.c:289: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(p+nameLength+1, value, valueLength+1); data/tcl8.6-8.6.10+dfsg/generic/tclEnv.c:297: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(p, p2, (unsigned) Tcl_DStringLength(&envString) + 1); data/tcl8.6-8.6.10+dfsg/generic/tclEnv.c:458: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(string, name, (size_t) length); data/tcl8.6-8.6.10+dfsg/generic/tclEnv.c:463: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(string, name, (size_t) length); data/tcl8.6-8.6.10+dfsg/generic/tclEnv.c:469: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(string, Tcl_DStringValue(&envString), data/tcl8.6-8.6.10+dfsg/generic/tclEvent.c:231: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(tempObjv, prefixObjv, prefixObjc*sizeof(Tcl_Obj *)); data/tcl8.6-8.6.10+dfsg/generic/tclExecute.c:1198: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(memStart, MEMSTART(markerPtr), moveWords*sizeof(Tcl_Obj *)); data/tcl8.6-8.6.10+dfsg/generic/tclExecute.c:2186: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 cmdNameBuf[21]; data/tcl8.6-8.6.10+dfsg/generic/tclExecute.c:2810: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, bytes, (size_t) length); data/tcl8.6-8.6.10+dfsg/generic/tclExecute.c:2845: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, bytes, (size_t) length); data/tcl8.6-8.6.10+dfsg/generic/tclExecute.c:5547:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_UTF_MAX] = ""; data/tcl8.6-8.6.10+dfsg/generic/tclExecute.c:5720: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(bytes1 + fromIdx, bytes2, length3); data/tcl8.6-8.6.10+dfsg/generic/tclExecute.c:5724: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(ustring1 + fromIdx, ustring2, data/tcl8.6-8.6.10+dfsg/generic/tclExecute.c:10603:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclFileName.c:601:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, str, (size_t) len+1); data/tcl8.6-8.6.10+dfsg/generic/tclFileName.c:827: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(elemv+1, objv, objc*sizeof(Tcl_Obj *)); data/tcl8.6-8.6.10+dfsg/generic/tclHash.c:681: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(result, "%d entries in table, %d buckets\n", data/tcl8.6-8.6.10+dfsg/generic/tclHash.c:685: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(p, "number of buckets with %d entries: %d\n", data/tcl8.6-8.6.10+dfsg/generic/tclHash.c:689: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(p, "number of buckets with %d or more entries: %d\n", data/tcl8.6-8.6.10+dfsg/generic/tclHash.c:692: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(p, "average search distance for entry: %.1f", average); data/tcl8.6-8.6.10+dfsg/generic/tclHash.c:843: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(hPtr->key.string, string, size); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:106:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1]; /* Copy buffer, this must be the last data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:1752: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(tmp, "stdin"); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:1757: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(tmp, "stdout"); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:1762: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(tmp, "stderr"); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:4267:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *dst, safe[BUFFER_PADDING]; data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:4286: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(InsertPoint(bufPtr), safe, (size_t) saved); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:4320:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char crln[3] = "\r\n"; data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:4369: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(safe, dst + dstLen, (size_t) saved); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:4665:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[TCL_UTF_MAX]; data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:5046: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(byteArray + byteLen, dst, (size_t) rawLen); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:5063: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(byteArray + byteLen, dst, (size_t) rawLen); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:5358: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(nextPtr->buf + (BUFFER_PADDING - extra), data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:5506: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(InsertPoint(bufPtr), data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:5610: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(readBuf, RemovePoint(bufPtr), (size_t) toCopy); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:6208:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[TCL_UTF_MAX + 1]; data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:6352: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(RemovePoint(nextPtr), src, (size_t) srcLen); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:6451: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(dstStart, srcStart, (size_t) srcLen); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:6608: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(InsertPoint(bufPtr), str, (size_t) len); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:7689: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 optionVal[128]; /* Buffer for sprintf. */ data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:7796:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4]; data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:7798: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(buf, "%c", statePtr->inEofChar); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:7806:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4]; data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:7808: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(buf, "%c", statePtr->outEofChar); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:9330: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(InsertPoint(bufPtr), InsertPoint(tail), extra); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:11219:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[20]; data/tcl8.6-8.6.10+dfsg/generic/tclIO.h:47:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1]; /* Placeholder for real buffer. The real data/tcl8.6-8.6.10+dfsg/generic/tclIOCmd.c:1376:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char portBuf[TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclIOCmd.c:1595: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(copyScript, script, len); data/tcl8.6-8.6.10+dfsg/generic/tclIOCmd.c:1891:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *channelNames[2]; data/tcl8.6-8.6.10+dfsg/generic/tclIOGT.c:1367:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, r->buf, toRead); data/tcl8.6-8.6.10+dfsg/generic/tclIOGT.c:1375:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, r->buf, toRead); data/tcl8.6-8.6.10+dfsg/generic/tclIOGT.c:1384:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, r->buf, r->used); data/tcl8.6-8.6.10+dfsg/generic/tclIOGT.c:1431: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(r->buf + r->used, buf, toWrite); data/tcl8.6-8.6.10+dfsg/generic/tclIORChan.c:675: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(clonePtr, &tclRChannelType, sizeof(Tcl_ChannelType)); data/tcl8.6-8.6.10+dfsg/generic/tclIORChan.c:1324:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, bytev, (size_t) bytec); data/tcl8.6-8.6.10+dfsg/generic/tclIORChan.c:2994: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(paramPtr->input.buf, bytev, (size_t) bytec); data/tcl8.6-8.6.10+dfsg/generic/tclIORChan.c:3284: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(paramPtr->base.msgStr, msgStr, (unsigned) len); data/tcl8.6-8.6.10+dfsg/generic/tclIORTrans.c:2611: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(paramPtr->transform.buf, bytev, (size_t)bytec); data/tcl8.6-8.6.10+dfsg/generic/tclIORTrans.c:2645: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(paramPtr->transform.buf, bytev, (size_t)bytec); data/tcl8.6-8.6.10+dfsg/generic/tclIORTrans.c:2674: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(paramPtr->transform.buf, bytev, (size_t)bytec); data/tcl8.6-8.6.10+dfsg/generic/tclIORTrans.c:2701: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(paramPtr->transform.buf, bytev, (size_t)bytec); data/tcl8.6-8.6.10+dfsg/generic/tclIORTrans.c:2814: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(paramPtr->base.msgStr, msgStr, (unsigned) len); data/tcl8.6-8.6.10+dfsg/generic/tclIORTrans.c:3005: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(rPtr->buf + rPtr->used, buf, toWrite); data/tcl8.6-8.6.10+dfsg/generic/tclIORTrans.c:3046:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, rPtr->buf, toRead); data/tcl8.6-8.6.10+dfsg/generic/tclIORTrans.c:3055:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, rPtr->buf, toRead); data/tcl8.6-8.6.10+dfsg/generic/tclIORTrans.c:3066:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, rPtr->buf, rPtr->used); data/tcl8.6-8.6.10+dfsg/generic/tclIOUtil.c:3084:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *symbols[3]; data/tcl8.6-8.6.10+dfsg/generic/tclIOUtil.c:3185:9: [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). return atoi(skipstr); data/tcl8.6-8.6.10+dfsg/generic/tclIndexObj.c:458: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(buf, indexStr, len+1); data/tcl8.6-8.6.10+dfsg/generic/tclIndexObj.c:489: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(dupIndexRep, srcIndexRep, sizeof(IndexRep)); data/tcl8.6-8.6.10+dfsg/generic/tclIndexObj.c:1313: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(leftovers+nrem, objv+srcIndex, objc*sizeof(Tcl_Obj *)); data/tcl8.6-8.6.10+dfsg/generic/tclIndexObj.c:1365:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[TCL_DOUBLE_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclIndexObj.c:1415:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%g", *((double *) infoPtr->dstPtr)); data/tcl8.6-8.6.10+dfsg/generic/tclInt.h:923:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[1]; /* Name of the local variable starts here. If data/tcl8.6-8.6.10+dfsg/generic/tclInt.h:1919: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 resultSpace[TCL_RESULT_SIZE+1]; data/tcl8.6-8.6.10+dfsg/generic/tclInt.h:4288: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((objPtr)->bytes, (bytePtr), (unsigned) (len)); \ data/tcl8.6-8.6.10+dfsg/generic/tclInt.h:4407: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(newPtr, staticPtr, \ data/tcl8.6-8.6.10+dfsg/generic/tclInterp.c:760:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[16 + TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclInterp.c:809: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(buf, "interp%d", i); data/tcl8.6-8.6.10+dfsg/generic/tclInterp.c:1815: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(cmdv, prefv, (size_t) (prefc * sizeof(Tcl_Obj *))); data/tcl8.6-8.6.10+dfsg/generic/tclInterp.c:1816: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(cmdv+prefc, objv+1, (size_t) ((objc-1) * sizeof(Tcl_Obj *))); data/tcl8.6-8.6.10+dfsg/generic/tclInterp.c:1864: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(cmdv, prefv, (size_t) (prefc * sizeof(Tcl_Obj *))); data/tcl8.6-8.6.10+dfsg/generic/tclInterp.c:1865: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(cmdv+prefc, objv+1, (size_t) ((objc-1) * sizeof(Tcl_Obj *))); data/tcl8.6-8.6.10+dfsg/generic/tclInterp.c:3948: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(&iPtr->limit.time, timeLimitPtr, sizeof(Tcl_Time)); data/tcl8.6-8.6.10+dfsg/generic/tclInterp.c:4032: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(timeLimitPtr, &iPtr->limit.time, sizeof(Tcl_Time)); data/tcl8.6-8.6.10+dfsg/generic/tclInterp.c:4358: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(&slavePtr->limit.time, &masterPtr->limit.time, data/tcl8.6-8.6.10+dfsg/generic/tclLink.c:554: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(*pp, value, valueLength); data/tcl8.6-8.6.10+dfsg/generic/tclListObj.c:656: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(dst, src, (size_t) numElems * sizeof(Tcl_Obj *)); data/tcl8.6-8.6.10+dfsg/generic/tclListObj.c:1027: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(elemPtrs, oldPtrs, (size_t) first * sizeof(Tcl_Obj *)); data/tcl8.6-8.6.10+dfsg/generic/tclListObj.c:1048: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(elemPtrs + first + objc, oldPtrs + start, data/tcl8.6-8.6.10+dfsg/generic/tclListObj.c:1936: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 localFlags[LOCAL_SIZE], *flagPtr = NULL; data/tcl8.6-8.6.10+dfsg/generic/tclLiteral.c:758: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(newArrayPtr, currArrayPtr, currBytes); data/tcl8.6-8.6.10+dfsg/generic/tclLiteral.c:1122: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(result, "%d entries in table, %d buckets\n", data/tcl8.6-8.6.10+dfsg/generic/tclLiteral.c:1126: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(p, "number of buckets with %d entries: %d\n", data/tcl8.6-8.6.10+dfsg/generic/tclLiteral.c:1130: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(p, "number of buckets with %d or more entries: %d\n", data/tcl8.6-8.6.10+dfsg/generic/tclLiteral.c:1133: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(p, "average search distance for entry: %.1f", average); data/tcl8.6-8.6.10+dfsg/generic/tclLoad.c:129:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *symbols[2]; data/tcl8.6-8.6.10+dfsg/generic/tclLoad.c:407: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(pkgPtr->fileName, fullFileName, len); data/tcl8.6-8.6.10+dfsg/generic/tclLoad.c:410: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(pkgPtr->packageName, Tcl_DStringValue(&pkgName), len); data/tcl8.6-8.6.10+dfsg/generic/tclMain.c:303:31: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. TclpFindExecutable((const char *)argv[0]); data/tcl8.6-8.6.10+dfsg/generic/tclNamesp.c:776: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(nsPtr->name, simpleName, nameLen); data/tcl8.6-8.6.10+dfsg/generic/tclNamesp.c:864: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(nsPtr->fullName, name, (unsigned) nameLen + 1); data/tcl8.6-8.6.10+dfsg/generic/tclNamesp.c:1458: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(patternCpy, pattern, (unsigned) len + 1); data/tcl8.6-8.6.10+dfsg/generic/tclOO.c:662:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char objName[10 + TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclOO.c:664: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(objName, "::oo::Obj%d", ++fPtr->tsdPtr->nsCount); data/tcl8.6-8.6.10+dfsg/generic/tclOO.c:2037: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(cls2Ptr->superclasses.list, clsPtr->superclasses.list, data/tcl8.6-8.6.10+dfsg/generic/tclOOCall.c:865: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(callPtr->chain, callPtr->staticChain, data/tcl8.6-8.6.10+dfsg/generic/tclOODefineCmds.c:357: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(oPtr->mixins.list, mixins, sizeof(Class *) * numMixins); data/tcl8.6-8.6.10+dfsg/generic/tclOODefineCmds.c:413: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(classPtr->mixins.list, mixins, sizeof(Class *) * numMixins); data/tcl8.6-8.6.10+dfsg/generic/tclOODefineCmds.c:580: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(newObjv + 1, objv + 2, sizeof(Tcl_Obj *) * (objc - 2)); data/tcl8.6-8.6.10+dfsg/generic/tclOODefineCmds.c:1440:52: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. hPtr = Tcl_CreateHashEntry(oPtr->methodsPtr, (char *) objv[i], data/tcl8.6-8.6.10+dfsg/generic/tclOODefineCmds.c:1707:52: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. hPtr = Tcl_CreateHashEntry(oPtr->methodsPtr, (char *) objv[i], data/tcl8.6-8.6.10+dfsg/generic/tclOOInfo.c:251:49: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. hPtr = Tcl_FindHashEntry(oPtr->methodsPtr, (char *) objv[2]); data/tcl8.6-8.6.10+dfsg/generic/tclOOInfo.c:362:49: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. hPtr = Tcl_FindHashEntry(oPtr->methodsPtr, (char *) objv[2]); data/tcl8.6-8.6.10+dfsg/generic/tclOOInfo.c:620:49: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. hPtr = Tcl_FindHashEntry(oPtr->methodsPtr, (char *) objv[2]); data/tcl8.6-8.6.10+dfsg/generic/tclOOInfo.c:910:54: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. hPtr = Tcl_FindHashEntry(&clsPtr->classMethods, (char *) objv[2]); data/tcl8.6-8.6.10+dfsg/generic/tclOOInfo.c:1058:54: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. hPtr = Tcl_FindHashEntry(&clsPtr->classMethods, (char *) objv[2]); data/tcl8.6-8.6.10+dfsg/generic/tclOOInfo.c:1241:54: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. hPtr = Tcl_FindHashEntry(&clsPtr->classMethods, (char *) objv[2]); data/tcl8.6-8.6.10+dfsg/generic/tclOOInt.h:593: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(((target).list=(type*)ckalloc(len)), (source).list, len); \ data/tcl8.6-8.6.10+dfsg/generic/tclOOMethod.c:1326: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(pm2Ptr, pmPtr, sizeof(ProcedureMethod)); data/tcl8.6-8.6.10+dfsg/generic/tclOOMethod.c:1604: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(argObjs, rewriteObjs, rewriteLength * sizeof(Tcl_Obj *)); data/tcl8.6-8.6.10+dfsg/generic/tclOOMethod.c:1605: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(argObjs + rewriteLength, objv + toRewrite, data/tcl8.6-8.6.10+dfsg/generic/tclObj.c:607: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(&clLocPtr->loc, loc, num*sizeof(int)); data/tcl8.6-8.6.10+dfsg/generic/tclObj.c:2009: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 lowerCase[6]; data/tcl8.6-8.6.10+dfsg/generic/tclObj.c:2370:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[TCL_DOUBLE_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclObj.c:2377: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(objPtr->bytes, buffer, (unsigned) len + 1); data/tcl8.6-8.6.10+dfsg/generic/tclObj.c:2571:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclObj.c:2577: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(objPtr->bytes, buffer, (unsigned) len + 1); data/tcl8.6-8.6.10+dfsg/generic/tclObj.c:2867:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[TCL_INTEGER_SPACE+2]; data/tcl8.6-8.6.10+dfsg/generic/tclObj.c:2878: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, "%" TCL_LL_MODIFIER "d", wideVal); data/tcl8.6-8.6.10+dfsg/generic/tclObj.c:2881: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(objPtr->bytes, buffer, len + 1); data/tcl8.6-8.6.10+dfsg/generic/tclObj.c:4476: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 ptrBuffer[2*TCL_INTEGER_SPACE+6]; data/tcl8.6-8.6.10+dfsg/generic/tclObj.c:4490: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(ptrBuffer, "%p", (void *) objv[1]); data/tcl8.6-8.6.10+dfsg/generic/tclObj.c:4515: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(ptrBuffer, "%p:%p", data/tcl8.6-8.6.10+dfsg/generic/tclParse.c:847:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_UTF_MAX] = ""; data/tcl8.6-8.6.10+dfsg/generic/tclParse.c:980:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char utfBytes[TCL_UTF_MAX]; data/tcl8.6-8.6.10+dfsg/generic/tclParse.c:982: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(utfBytes, p, (size_t) (numBytes - 1)); data/tcl8.6-8.6.10+dfsg/generic/tclParse.c:2220:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char utfCharBytes[TCL_UTF_MAX] = ""; data/tcl8.6-8.6.10+dfsg/generic/tclPathObj.c:1748: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(result, orig, (size_t) len+1); data/tcl8.6-8.6.10+dfsg/generic/tclPipe.c:323:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg1[TCL_INTEGER_SPACE], msg2[TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclPipe.c:326:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(msg1, "%lu", resolvedPid); data/tcl8.6-8.6.10+dfsg/generic/tclPipe.c:329: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(msg2, "%u", WEXITSTATUS(waitStatus)); data/tcl8.6-8.6.10+dfsg/generic/tclPkg.c:96:26: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. ((v) = ckalloc(len), memcpy((v),(s),(len))) data/tcl8.6-8.6.10+dfsg/generic/tclPkg.c:1960:2: [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(reqi, " -2"); data/tcl8.6-8.6.10+dfsg/generic/tclPkg.c:1985:2: [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(min, " -2"); data/tcl8.6-8.6.10+dfsg/generic/tclPkg.c:2004:2: [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(min, " -2"); data/tcl8.6-8.6.10+dfsg/generic/tclPkg.c:2005:2: [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(max, " -2"); data/tcl8.6-8.6.10+dfsg/generic/tclProc.c:622: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(localPtr->name, argname, fieldValues[0]->length + 1); data/tcl8.6-8.6.10+dfsg/generic/tclProc.c:1716:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *a[10]; data/tcl8.6-8.6.10+dfsg/generic/tclProc.c:1729:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *a[6]; int i[2]; data/tcl8.6-8.6.10+dfsg/generic/tclRegexp.c:69: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 *patterns[NUM_REGEXPS];/* Strings corresponding to compiled regular data/tcl8.6-8.6.10+dfsg/generic/tclRegexp.c:723:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[100]; /* ample in practice */ data/tcl8.6-8.6.10+dfsg/generic/tclRegexp.c:724: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 cbuf[TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclRegexp.c:733: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(cbuf, "%d", status); data/tcl8.6-8.6.10+dfsg/generic/tclRegexp.c:997: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(tsdPtr->patterns[0], string, (unsigned) length + 1); data/tcl8.6-8.6.10+dfsg/generic/tclResolve.c:107: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(resPtr->name, name, len); data/tcl8.6-8.6.10+dfsg/generic/tclResult.c:438: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(iPtr->result, result, (unsigned) length+1); data/tcl8.6-8.6.10+dfsg/generic/tclScan.c:263:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_UTF_MAX+1] = ""; data/tcl8.6-8.6.10+dfsg/generic/tclStrToD.c:2202: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(retval, "Infinity"); data/tcl8.6-8.6.10+dfsg/generic/tclStrToD.c:2208: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(retval, "NaN"); data/tcl8.6-8.6.10+dfsg/generic/tclStrToD.c:4978: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(buffer, "NaN"); data/tcl8.6-8.6.10+dfsg/generic/tclStrToD.c:4999: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(buffer, "(%" TCL_LL_MODIFIER "x)", bitwhack.iv); data/tcl8.6-8.6.10+dfsg/generic/tclStringObj.c:1072: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(stringPtr->unicode, unicode, numChars * sizeof(Tcl_UniChar)); data/tcl8.6-8.6.10+dfsg/generic/tclStringObj.c:1748:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *const badIndex[2] = { data/tcl8.6-8.6.10+dfsg/generic/tclStringObj.c:1997:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_UTF_MAX]; data/tcl8.6-8.6.10+dfsg/generic/tclStringObj.c:2323:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char spec[2*TCL_INTEGER_SPACE + 9], *p = spec; data/tcl8.6-8.6.10+dfsg/generic/tclStringObj.c:2349:8: [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. p += sprintf(p, "%d", width); data/tcl8.6-8.6.10+dfsg/generic/tclStringObj.c:2356:8: [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. p += sprintf(p, "%d", precision); data/tcl8.6-8.6.10+dfsg/generic/tclStringObj.c:2980: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(copyStringPtr->unicode, srcStringPtr->unicode, data/tcl8.6-8.6.10+dfsg/generic/tclStringObj.c:3013: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(copyStringPtr->unicode, srcStringPtr->unicode, data/tcl8.6-8.6.10+dfsg/generic/tclStringObj.c:3138: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 *dst, buf[TCL_UTF_MAX]; data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:955:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *listArgv[4], *cmd; data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:956: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 string[TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:1204:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[30]; data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:1214: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(buf, "%p", (void *)token); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:1583:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:1768: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(&d, &(objv[1]->internalRep.doubleValue), sizeof(double)); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:1867:6: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(s, "This is a malloc-ed string"); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:1871:6: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(s, "This is a specially-allocated string"); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:1977: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(encodingPtr->toUtfCmd, string, (unsigned) length + 1); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:1981: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(encodingPtr->fromUtfCmd, string, (unsigned) (length + 1)); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:2030:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, Tcl_GetStringResult(encodingPtr->interp), (unsigned) len); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:2062:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, Tcl_GetStringResult(encodingPtr->interp), (unsigned) len); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:2407:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[16 + TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:2410: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(buf, "odd %d\n", (int)PTR2INT(clientData)); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:2421:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[16 + TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:2424: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(buf, "even %d\n", (int)PTR2INT(clientData)); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:2456:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4 + TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:2469: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(buf, ": %ld", exprResult); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:2499:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4 + TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:2511: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(buf, ": %ld", exprResult); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:2541:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4 + TCL_DOUBLE_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:2554: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(buf, ": "); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:2585:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4 + TCL_DOUBLE_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:2597: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(buf, ": "); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:2732:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. res = (char *) Tcl_GetAssocData(interp, argv[1], NULL); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:2860:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[2*TCL_DOUBLE_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:3961:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char resinfo[TCL_INTEGER_SPACE * 2]; data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:3965:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(resinfo, "%d %d", start, end-1); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:3975:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char resinfo[TCL_INTEGER_SPACE * 2]; data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:3979:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(resinfo, "%ld", info.extendStart); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:4216: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. oldData = (char *) Tcl_GetAssocData(interp, argv[1], &procPtr); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:4783: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 newString[TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:4882: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(newString, "%d", 12345); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:5030: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(objPtr->bytes, s, objPtr->length); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:5068: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. p = (const char *)Tcl_GetByteArrayFromObj(objv[1], &n); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:5219: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(buf, "free result"); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:5442:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_INTEGER_SPACE];/* For sprintf. */ data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:6186:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[64]; data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:6187: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(buffer, "%d", idx); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:6190: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(buffer, "%d", target); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:6994:42: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. idata[0] = Tcl_NewIntObj((int) ((char *) data[1] - (char *) data[0])); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:6994:61: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. idata[0] = Tcl_NewIntObj((int) ((char *) data[1] - (char *) data[0])); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:6995:42: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. idata[1] = Tcl_NewIntObj((int) ((char *) data[2] - (char *) data[0])); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:6995:61: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. idata[1] = Tcl_NewIntObj((int) ((char *) data[2] - (char *) data[0])); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:6996:61: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. idata[2] = Tcl_NewIntObj((int) ((char *) &none - (char *) data[0])); data/tcl8.6-8.6.10+dfsg/generic/tclTestObj.c:1182:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *index, *string, *strings[MAX_STRINGS+1]; data/tcl8.6-8.6.10+dfsg/generic/tclTestObj.c:1524:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32 + TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclTestObj.c:1526: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(buf, "variable %d is unset (NULL)", varIndex); data/tcl8.6-8.6.10+dfsg/generic/tclTestProcBodyObj.c:146:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/tcl8.6-8.6.10+dfsg/generic/tclThreadAlloc.c:62:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char padding[TCL_ALLOCALIGN]; data/tcl8.6-8.6.10+dfsg/generic/tclThreadAlloc.c:519: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(newPtr, ptr, reqSize); data/tcl8.6-8.6.10+dfsg/generic/tclThreadAlloc.c:669:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[200]; data/tcl8.6-8.6.10+dfsg/generic/tclThreadAlloc.c:679:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "thread%p", cachePtr->owner); data/tcl8.6-8.6.10+dfsg/generic/tclThreadAlloc.c:683:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%lu %ld %ld %ld %ld %ld %ld", data/tcl8.6-8.6.10+dfsg/generic/tclThreadAlloc.c:829: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. ((unsigned char *)(ptr))[reqSize] = MAGIC; data/tcl8.6-8.6.10+dfsg/generic/tclThreadAlloc.c:846:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (((unsigned char *) ptr)[blockPtr->blockReqSize] != MAGIC) { data/tcl8.6-8.6.10+dfsg/generic/tclThreadAlloc.c:849:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. ((unsigned char *) ptr)[blockPtr->blockReqSize]); data/tcl8.6-8.6.10+dfsg/generic/tclThreadTest.c:372:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[20]; data/tcl8.6-8.6.10+dfsg/generic/tclThreadTest.c:374:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%" TCL_LL_MODIFIER "d", id); data/tcl8.6-8.6.10+dfsg/generic/tclThreadTest.c:653:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *errorInfo, *argv[3]; data/tcl8.6-8.6.10+dfsg/generic/tclThreadTest.c:655:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_DOUBLE_SPACE+1]; data/tcl8.6-8.6.10+dfsg/generic/tclThreadTest.c:657: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(buf, "%" TCL_LL_MODIFIER "d", (Tcl_WideInt)(size_t)Tcl_GetCurrentThread()); data/tcl8.6-8.6.10+dfsg/generic/tclTimer.c:306: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(&timerHandlerPtr->time, timePtr, sizeof(Tcl_Time)); data/tcl8.6-8.6.10+dfsg/generic/tclTrace.c:25:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char command[1]; /* Space for Tcl command to invoke. Actual data/tcl8.6-8.6.10+dfsg/generic/tclTrace.c:59: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 command[1]; /* Space for Tcl command to invoke. Actual data/tcl8.6-8.6.10+dfsg/generic/tclTrace.c:306: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(copyObjv+1, objv, objc*sizeof(Tcl_Obj *)); data/tcl8.6-8.6.10+dfsg/generic/tclTrace.c:318:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ops[5]; data/tcl8.6-8.6.10+dfsg/generic/tclTrace.c:486: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(tcmdPtr->command, command, length+1); data/tcl8.6-8.6.10+dfsg/generic/tclTrace.c:719: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(tcmdPtr->command, command, length+1); data/tcl8.6-8.6.10+dfsg/generic/tclTrace.c:924: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(ctvarPtr->traceCmdInfo.command, command, length+1); data/tcl8.6-8.6.10+dfsg/generic/tclTrace.c:1693: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(commandCopy, command, (size_t) numChars); data/tcl8.6-8.6.10+dfsg/generic/tclTrace.c:1927: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(tcmdPtr->startCmd, command, len); data/tcl8.6-8.6.10+dfsg/generic/tclUtf.c:62:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char totalBytes[256] = { data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:904: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, element, elSize); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:1439: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(dst, src, length); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:1457: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, src, length); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:1570: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 localFlags[LOCAL_SIZE], *flagPtr = NULL; data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:1652:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_UTF_MAX] = ""; data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:2046:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, element, elemLength); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:2748: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(newString, dsPtr->string, dsPtr->length); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:2771: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(dsPtr->string + dsPtr->length, bytes, length); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:2851: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(newString, dsPtr->string, dsPtr->length); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:2945: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(newString, dsPtr->string, dsPtr->length); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:3094: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(dsPtr->string, iPtr->result, dsPtr->length+1); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:3107: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(dsPtr->string, iPtr->result, dsPtr->length+1); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:3283: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(dst, "-Inf", 5); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:3285: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(dst, "Inf", 4); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:3366:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(dst, "e%+d", exponent); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:3368:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(dst, "e%+03d", exponent); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:3623:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. return sprintf(buffer, "%ld", n); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:3793:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[TCL_INTEGER_SPACE + 5]; data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:3796: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(buffer, "end", 4); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:3802: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(objPtr->bytes, buffer, (unsigned) len+1); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:4292: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(pgvPtr->value, bytes, pgvPtr->numBytes + 1); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:4356: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(pgvPtr->value, Tcl_DStringValue(&newValue), data/tcl8.6-8.6.10+dfsg/generic/tclVar.c:668: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(newPart2, part2, (unsigned) len2); data/tcl8.6-8.6.10+dfsg/generic/tclVar.c:5562: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(elemCopy, elem, elemLen); data/tcl8.6-8.6.10+dfsg/generic/tclVar.c:5598: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(p, part1, (unsigned) len1); data/tcl8.6-8.6.10+dfsg/generic/tclVar.c:5601: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(p, part2, (unsigned) len2); data/tcl8.6-8.6.10+dfsg/generic/tclZlib.c:52: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 nativeFilenameBuf[MAXPATHLEN]; data/tcl8.6-8.6.10+dfsg/generic/tclZlib.c:53: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 nativeCommentBuf[MAX_COMMENT_LEN]; data/tcl8.6-8.6.10+dfsg/generic/tclZlib.c:249: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 codeStrBuf[TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/generic/tclZlib.c:291: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(codeStrBuf, "%lu", adler); data/tcl8.6-8.6.10+dfsg/generic/tclZlib.c:312: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(codeStrBuf, "%d", code); data/tcl8.6-8.6.10+dfsg/generic/tclZlib.c:1520: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(dataPtr + dataPos, itemPtr + zshPtr->outPos, len); data/tcl8.6-8.6.10+dfsg/generic/tclZlib.c:1529: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(dataPtr + dataPos, itemPtr + zshPtr->outPos, len); data/tcl8.6-8.6.10+dfsg/generic/tclZlib.c:3355:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[12]; data/tcl8.6-8.6.10+dfsg/generic/tclZlib.c:3363: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(buf, "%lu", crc); data/tcl8.6-8.6.10+dfsg/generic/tclZlib.c:3752:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, src, toRead); data/tcl8.6-8.6.10+dfsg/generic/tclZlib.c:3763:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, Tcl_DStringValue(&cd->decompressed), have); data/tcl8.6-8.6.10+dfsg/generic/tclZlib.c:3794:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[MAXBUF]; data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_is_square.c:7:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char rem_128[128] = { data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_is_square.c:18:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char rem_105[105] = { data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_rand_platform.c:94:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(MP_DEV_URANDOM, O_RDONLY); data/tcl8.6-8.6.10+dfsg/macosx/tclMacOSXFCmd.c:358:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(Tcl_DStringValue(&ds), O_WRONLY | O_TRUNC); data/tcl8.6-8.6.10+dfsg/macosx/tclMacOSXFCmd.c:655:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bytes[4] = {'\0','\0','\0','\0'}; data/tcl8.6-8.6.10+dfsg/macosx/tclMacOSXFCmd.c:657: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(bytes, Tcl_DStringValue(&ds), (size_t)Tcl_DStringLength(&ds)); data/tcl8.6-8.6.10+dfsg/macosx/tclMacOSXFCmd.c:695: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 string[5]; data/tcl8.6-8.6.10+dfsg/macosx/tclMacOSXFCmd.c:709: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(objPtr->bytes, Tcl_DStringValue(&ds), len); data/tcl8.6-8.6.10+dfsg/macosx/tclMacOSXNotify.c:159: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). notifierLog = fopen(NOTIFIER_LOG, "a"); \ data/tcl8.6-8.6.10+dfsg/macosx/tclMacOSXNotify.c:1764:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[2]; data/tcl8.6-8.6.10+dfsg/tools/man2tcl.c:98:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[MAX_LINE_SIZE]; data/tcl8.6-8.6.10+dfsg/tools/man2tcl.c:108:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(argv[1], "r"); data/tcl8.6-8.6.10+dfsg/unix/dltest/pkgb.c:64:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/unix/dltest/pkgb.c:65: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(buf, "%d", Tcl_GetErrorLine(interp)); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:88: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 errbuf[BUFSIZ]; data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.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(errbuf, "calloc: "); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:150: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(errbuf, "dlopen: "); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:152:2: [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(errbuf, ": "); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:160:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *tmp[BUFSIZ/sizeof(char *)], **p; data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:183: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(errbuf, "loadbind: "); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:251:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). switch (atoi(s)) { /* INTL: "C", UTF safe. */ data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:253:2: [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(errbuf, "to many errors"); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:256:2: [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(errbuf, "can't load library"); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:260:2: [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(errbuf, "can't find symbol"); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:264:2: [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(errbuf, "bad RLD"); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:268:2: [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(errbuf, "bad exec format in"); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:272:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). strcat(errbuf, strerror(atoi(++p))); /* INTL: "C", UTF safe. */ data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:301: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(errbuf, "dlsym: undefined symbol "); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:525:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpsym[SYMNMLEN+1]; data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:563: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(errbuf, "readExports: "); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:619: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(errbuf, "findMain: "); data/tcl8.6-8.6.10+dfsg/unix/tclLoadNext.c:58:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *files[2]; data/tcl8.6-8.6.10+dfsg/unix/tclLoadNext.c:139:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sym[strlen(symbol) + 2]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixChan.c:810:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[3*TCL_INTEGER_SPACE + 16]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixChan.c:826: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(buf, "%d,%c,%d,%d", tty.baud, tty.parity, tty.data, tty.stop); data/tcl8.6-8.6.10+dfsg/unix/tclUnixChan.c:873: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(buf, "%d", inBuffered+inQueue); data/tcl8.6-8.6.10+dfsg/unix/tclUnixChan.c:875: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(buf, "%d", outBuffered+outQueue); data/tcl8.6-8.6.10+dfsg/unix/tclUnixChan.c:1373: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 channelName[16 + TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixChan.c:1427: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(channelName, "file%d", fd); data/tcl8.6-8.6.10+dfsg/unix/tclUnixChan.c:1504: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 channelName[16 + TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixChan.c:1519: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(channelName, "serial%d", fd); data/tcl8.6-8.6.10+dfsg/unix/tclUnixChan.c:1528: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(channelName, "file%d", fd); data/tcl8.6-8.6.10+dfsg/unix/tclUnixCompat.c:59: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 pbuf[2048]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixCompat.c:68:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char gbuf[2048]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixCompat.c:73:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hbuf[2048]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixCompat.c:916:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, src[j], sz); data/tcl8.6-8.6.10+dfsg/unix/tclUnixCompat.c:957:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, src, len); data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:371:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char srcPath[MAXPATHLEN], dstPath[MAXPATHLEN]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:494:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char linkBuf[MAXPATHLEN+1]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:970:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *paths[2] = {NULL, NULL}; data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:1955: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 normPath[MAXPATHLEN]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:2217:7: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). fd = mkstemp(Tcl_DStringValue(&template)); data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:45:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[PATH_MAX * 2]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:46:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[PATH_MAX * TCL_UTF_MAX + 1]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:709:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[MAXPATHLEN+1]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:763:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[MAXPATHLEN+1]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:808: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 link[MAXPATHLEN]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:974:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char link[MAXPATHLEN]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:1119: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(nativePathPtr, Tcl_DStringValue(&ds), (size_t) len); data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:1160: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(copy, clientData, len); data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c:43:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *const platforms[NUMPLATFORMS] = { data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c:48:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *const processors[NUMPROCESSORS] = { data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c:78:3: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t szCSDVersion[128]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c:101: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 defaultLibraryDir[sizeof(TCL_LIBRARY)+200] = TCL_LIBRARY; data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c:109: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 pkgPath[sizeof(TCL_PACKAGE_PATH)+200] = TCL_PACKAGE_PATH; data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c:371:2: [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). open("/dev/null", O_RDONLY); data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c:374:2: [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). open("/dev/null", O_WRONLY); data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c:377:2: [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). open("/dev/null", O_WRONLY); data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c:489:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char installLib[LIBRARY_SIZE]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c:532:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tclLibPath[MAXPATHLEN + 1]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c:555: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(*valuePtr, str, (size_t)(*lengthPtr)+1); data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c:761: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 loc[256]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c:792:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[TCL_INTEGER_SPACE * 2]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c:800: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 tclLibPath[MAXPATHLEN + 1]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixInit.c:904: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, "%d.%d", osInfo.dwMajorVersion, osInfo.dwMinorVersion); data/tcl8.6-8.6.10+dfsg/unix/tclUnixNotfy.c:1158:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[2]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixPipe.c:17:14: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. #define fork vfork data/tcl8.6-8.6.10+dfsg/unix/tclUnixPipe.c:410: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 errSpace[200 + TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixPipe.c:478:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(errSpace, data/tcl8.6-8.6.10+dfsg/unix/tclUnixPipe.c:493: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(errSpace, "%dcouldn't execute \"%.150s\"", errno, argv[0]); data/tcl8.6-8.6.10+dfsg/unix/tclUnixPipe.c:745: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 channelName[16 + TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixPipe.c:785: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(channelName, "file%d", channelId); data/tcl8.6-8.6.10+dfsg/unix/tclUnixPort.h:85:23: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). # define TclOSopen open data/tcl8.6-8.6.10+dfsg/unix/tclUnixPort.h:103:48: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). __declspec(dllimport) extern __stdcall int MultiByteToWideChar(int, int, const char *, int, data/tcl8.6-8.6.10+dfsg/unix/tclUnixSock.c:181: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 host[NI_MAXHOST], port[NI_MAXSERV]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixSock.c:233: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(node, u.nodename, (size_t) (dot - u.nodename)); data/tcl8.6-8.6.10+dfsg/unix/tclUnixSock.c:265:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[SYS_NMLEN]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixSock.c:267:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[256]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixSock.c:278: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(*valuePtr, native, (size_t)(*lengthPtr) + 1); data/tcl8.6-8.6.10+dfsg/unix/tclUnixSock.c:745: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 host[NI_MAXHOST], nhost[NI_MAXHOST], nport[NI_MAXSERV]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixSock.c:1351: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 channelName[SOCK_CHAN_LENGTH]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixSock.c:1451: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 channelName[SOCK_CHAN_LENGTH]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixSock.c:1500: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 channelName[SOCK_CHAN_LENGTH]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixSock.c:1689: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 channelName[SOCK_CHAN_LENGTH]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixSock.c:1690: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 host[NI_MAXHOST], port[NI_MAXSERV]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixSock.c:1721:46: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). newSockState->channel, host, atoi(port)); data/tcl8.6-8.6.10+dfsg/unix/tclUnixTest.c:149:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[4000]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixTest.c:198:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_INTEGER_SPACE * 2]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixTest.c:205: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(buf, "%d %d", pipePtr->readCount, pipePtr->writeCount); data/tcl8.6-8.6.10+dfsg/unix/tclUnixTest.c:277:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixTest.c:487:42: [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 (Tcl_GetOpenFile(interp, argv[1], atoi(argv[2]), 1, &filePtr) data/tcl8.6-8.6.10+dfsg/unix/tclUnixThrd.c:19:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nabuf[16]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixThrd.c:670: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(tsdPtr->nabuf, "%u.%u.%u.%u", b[0], b[1], b[2], b[3]); data/tcl8.6-8.6.10+dfsg/unix/tclUnixTime.c:380: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(&tsdPtr->gmtime_buf, gmtime(timePtr), sizeof(struct tm)); data/tcl8.6-8.6.10+dfsg/unix/tclUnixTime.c:420: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(&tsdPtr->localtime_buf, localtime(timePtr), sizeof(struct tm)); data/tcl8.6-8.6.10+dfsg/win/cat.c:26:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:54:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[STATICBUFFERSIZE]; data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:69:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[300]; data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:201:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[300]; data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:204:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cmdline[100]; data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:244:5: [2] (buffer) lstrcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. lstrcpy(cmdline, "cl.exe -nologo -c -TC -Zs -X -Fp.\\_junk.pch "); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:256:5: [2] (buffer) lstrcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. lstrcat(cmdline, " .\\nul"); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:336:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[300]; data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:340: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 cmdline[255]; data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:380:5: [2] (buffer) lstrcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. lstrcpy(cmdline, "link.exe -nologo "); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:387:2: [2] (buffer) lstrcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. lstrcat(cmdline, " \""); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:507:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char szBuffer[100]; data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:509:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen(filename, "rt"); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:540: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(szBuffer, p, q - p); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:615:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char szBuffer[1024], szCopy[1024]; data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:620:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(filename, "rt"); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:627:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). sp = fopen(substitutions, "rt"); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:674: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(szBuffer, szCopy, sizeof(szCopy)); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:709: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 szCwd[MAX_PATH + 1]; data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:727: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 path[MAX_PATH+1]; data/tcl8.6-8.6.10+dfsg/win/tclWinChan.c:841: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 channelName[16 + TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/win/tclWinChan.c:1058: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 channelName[16 + TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/win/tclWinChan.c:1366: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(channelName, "file%" TCL_I_MODIFIER "x", (size_t) infoPtr); data/tcl8.6-8.6.10+dfsg/win/tclWinConsole.c:105:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[CONSOLE_BUFFER_SIZE]; data/tcl8.6-8.6.10+dfsg/win/tclWinConsole.c:661: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(buf, &infoPtr->buffer[infoPtr->offset], (size_t) bufSize); data/tcl8.6-8.6.10+dfsg/win/tclWinConsole.c:665: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(buf, &infoPtr->buffer[infoPtr->offset], (size_t) bufSize); data/tcl8.6-8.6.10+dfsg/win/tclWinConsole.c:772: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(infoPtr->writeBuf, buf, (size_t) toWrite); data/tcl8.6-8.6.10+dfsg/win/tclWinConsole.c:1294: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 encoding[4 + TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/win/tclWinConsole.c:1321: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(channelName, "file%" TCL_I_MODIFIER "x", (size_t) infoPtr); data/tcl8.6-8.6.10+dfsg/win/tclWinError.c:394:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_MAX_WARN_LEN * TCL_UTF_MAX]; data/tcl8.6-8.6.10+dfsg/win/tclWinError.c:398:2: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_UTF8, 0, buf, -1, msgString, TCL_MAX_WARN_LEN); data/tcl8.6-8.6.10+dfsg/win/tclWinError.c:405: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(msgString + (TCL_MAX_WARN_LEN - 5), L" ...", 5 * sizeof(WCHAR)); data/tcl8.6-8.6.10+dfsg/win/tclWinFCmd.c:1915:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[40 * 4]; /* There couldn't be more than 30 drives??? */ data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:386: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(nativeTarget, L"\\??\\", 4 * sizeof(WCHAR)); data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:387: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(nativeTarget + 4, linkTargetPath, data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:419: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(reparseBuffer->MountPointReparseBuffer.PathBuffer, nativeTarget, data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:600:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char driveSpec[3] = { data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:813:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_MAX_WARN_LEN * TCL_UTF_MAX]; data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:820:5: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_UTF8, 0, buf, -1, msgString, TCL_MAX_WARN_LEN); data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:828: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(msgString + (TCL_MAX_WARN_LEN - 5), L" ...", 5 * sizeof(WCHAR)); data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:872:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[MAX_PATH * TCL_UTF_MAX]; data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:1548:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_PATH]; data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:3095:8: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). len = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, str, -1, 0, 0); data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:3109:5: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, str, -1, nativePathPtr, data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:3136: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(wp, L"\\\\?\\", 4 * sizeof(WCHAR)); data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:3150: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(wp, L"\\\\?\\UNC", 7 * sizeof(WCHAR)); data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:3204: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(copy, clientData, len); data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c:92:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *const platforms[NUMPLATFORMS] = { data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c:97:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *const processors[NUMPROCESSORS] = { data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c:200:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char installLib[LIBRARY_SIZE]; data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c:239: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(*valuePtr, bytes, (size_t)(*lengthPtr)+1); data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c:269:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_PATH * TCL_UTF_MAX]; data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c:362:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[(MAX_PATH + LIBRARY_SIZE) * TCL_UTF_MAX]; data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c:384: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(*valuePtr, name, (size_t) *lengthPtr + 1); data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c:413:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[(MAX_PATH + LIBRARY_SIZE) * TCL_UTF_MAX]; data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c:431: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(end + 1, "../library"); data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c:435: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(*valuePtr, name, (size_t) *lengthPtr + 1); data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c:563:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[TCL_INTEGER_SPACE * 2]; data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c:700: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(nameUpper, name, (size_t) length+1); data/tcl8.6-8.6.10+dfsg/win/tclWinLoad.c:386:5: [2] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. Risk is low because the source is a constant string. wcscpy(name+nameLen, L"TCLXXXXXXXX"); data/tcl8.6-8.6.10+dfsg/win/tclWinPipe.c:943: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 execPath[MAX_PATH * TCL_UTF_MAX]; data/tcl8.6-8.6.10+dfsg/win/tclWinPipe.c:1281:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[2]; data/tcl8.6-8.6.10+dfsg/win/tclWinPipe.c:1777: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 channelName[16 + TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/win/tclWinPipe.c:1837: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(channelName, "file%" TCL_I_MODIFIER "x", (size_t) infoPtr); data/tcl8.6-8.6.10+dfsg/win/tclWinPipe.c:2320: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(infoPtr->writeBuf, buf, (size_t) toWrite); data/tcl8.6-8.6.10+dfsg/win/tclWinPipe.c:3230: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(namePtr, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf)); data/tcl8.6-8.6.10+dfsg/win/tclWinPipe.c:3237: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(namePtr, baseStr, length); data/tcl8.6-8.6.10+dfsg/win/tclWinPipe.c:3245:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char number[TCL_INTEGER_SPACE + 4]; data/tcl8.6-8.6.10+dfsg/win/tclWinPipe.c:3247: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(number, "%d.TMP", counter); data/tcl8.6-8.6.10+dfsg/win/tclWinPipe.c:3251: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(namePtr, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf) + 1); data/tcl8.6-8.6.10+dfsg/win/tclWinReg.c:1489:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char id[TCL_INTEGER_SPACE], msgBuf[24 + TCL_INTEGER_SPACE]; data/tcl8.6-8.6.10+dfsg/win/tclWinReg.c:1501: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(msgBuf, "unknown error: %ld", error); data/tcl8.6-8.6.10+dfsg/win/tclWinReg.c:1527: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(id, "%ld", error); data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:1027: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(infoPtr->writeBuf, buf, (size_t) toWrite); data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:1445: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(channelName, "file%" TCL_I_MODIFIER "x", (size_t) infoPtr); data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:1531:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_INTEGER_SPACE + 1]; data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:1858:15: [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). inSize = atoi(argv[0]); data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:1861:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). inSize = atoi(argv[0]); data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:1862:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). outSize = atoi(argv[1]); data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:2011:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[2 * TCL_INTEGER_SPACE + 16]; data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:2043:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_INTEGER_SPACE + 1]; data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:2059:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_INTEGER_SPACE + 1]; data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:2080:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4]; data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:2091: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(buf, "%c", dcb.XonChar); data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:2093: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(buf, "%c", dcb.XoffChar); data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:2119:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCL_INTEGER_SPACE + 1]; data/tcl8.6-8.6.10+dfsg/win/tclWinSock.c:311:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char host[NI_MAXHOST], port[NI_MAXSERV]; data/tcl8.6-8.6.10+dfsg/win/tclWinSock.c:381: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(*valuePtr, Tcl_DStringValue(&ds), (size_t)(*lengthPtr)+1); data/tcl8.6-8.6.10+dfsg/win/tclWinSock.c:1233: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 host[NI_MAXHOST], port[NI_MAXSERV]; data/tcl8.6-8.6.10+dfsg/win/tclWinSock.c:1913: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 channelName[SOCK_CHAN_LENGTH]; data/tcl8.6-8.6.10+dfsg/win/tclWinSock.c:1998: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 channelName[SOCK_CHAN_LENGTH]; data/tcl8.6-8.6.10+dfsg/win/tclWinSock.c:2061: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 channelName[SOCK_CHAN_LENGTH]; data/tcl8.6-8.6.10+dfsg/win/tclWinSock.c:2246: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 channelName[SOCK_CHAN_LENGTH]; data/tcl8.6-8.6.10+dfsg/win/tclWinSock.c:2247: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 host[NI_MAXHOST], port[NI_MAXSERV]; data/tcl8.6-8.6.10+dfsg/win/tclWinSock.c:2293:14: [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). host, atoi(port)); data/tcl8.6-8.6.10+dfsg/win/tclWinTest.c:190: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 volType[VOL_BUF_SIZE]; data/tcl8.6-8.6.10+dfsg/win/tclWinTime.c:39: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 tzName[64]; /* Time zone name */ data/tcl8.6-8.6.10+dfsg/compat/mkstemp.c:40: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). int fd, count, alphanumericsLen = strlen(alphanumerics); /* == 62 */ data/tcl8.6-8.6.10+dfsg/compat/mkstemp.c:42:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). a = template + strlen(template); data/tcl8.6-8.6.10+dfsg/compat/opendir.c:75:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). dirp->dd_size = read(dirp->dd_fd, dirp->dd_buf, DIRBLKSIZ); data/tcl8.6-8.6.10+dfsg/compat/opendir.c:90:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dir.d_name, dp->od_name, ODIRSIZ); data/tcl8.6-8.6.10+dfsg/compat/opendir.c:92:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dir.d_namlen = strlen(dir.d_name); data/tcl8.6-8.6.10+dfsg/compat/string.h:46:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). extern size_t strlen(const char *string); data/tcl8.6-8.6.10+dfsg/compat/string.h:48:16: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. extern char * strncat(char *dst, const char *src, size_t numChars); data/tcl8.6-8.6.10+dfsg/compat/string.h:50:16: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). extern char * strncpy(char *dst, const char *src, size_t numChars); data/tcl8.6-8.6.10+dfsg/compat/unistd.h:52:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). extern int read(int fd, char *buf, size_t size); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/blast/blast.c:458:12: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (getchar() != EOF) data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream2/zstream.h:87:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int read(void* buf, size_t len) { data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream2/zstream.h:115:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inline int read(izstream& zs, T* x, Items items) { data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream2/zstream.h:278: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). val.byte = 255; val.word = ::strlen(x); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:146:5: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(c_mode, "w"); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:148:5: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(c_mode, "a"); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:150:5: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(c_mode, "w"); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:152:5: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(c_mode, "r"); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:160: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(c_mode) == 0) data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/iostream3/zfstream.cc:163:5: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(c_mode, "b"); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/miniunz.c:143:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = (int)strlen(newdir); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/miniunz.c:390:27: [1] (buffer) scanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. ret = scanf("%1s",answer); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/miniunz.c:609:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(filename_try, zipfilename,MAXFILENAME-1); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/minizip.c:113: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). int len = strlen(f); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/minizip.c:117:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, f,MAXFILENAME-1); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/minizip.c:469:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(filename_try, argv[zipfilenamearg],MAXFILENAME-1); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/minizip.c:473:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len=(int)strlen(filename_try); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/minizip.c:497:27: [1] (buffer) scanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. ret = scanf("%1s",answer); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/minizip.c:542:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (strlen(argv[i]) == 2))) data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/mztools.c:151: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). int comsize = (int) strlen(comment); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/mztools.c:226:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int comsize = (int) strlen(comment); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/unzip.c:1249:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP) data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/zip.c:962: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). uInt size_filename = (uInt)strlen(filename); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/zip.c:1101: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). size_comment = (uInt)strlen(comment); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/zip.c:1103:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_filename = (uInt)strlen(filename); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/minizip/zip.c:1870: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). size_global_comment = (uInt)strlen(global_comment); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:138:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). origlen = strlen(buffer); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:332:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(buffer); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:440:15: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fname,buffer.header.name,SHORTNAMESIZE); data/tcl8.6-8.6.10+dfsg/compat/zlib/contrib/untgz/untgz.c:514: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). if (fname[BLOCKSIZE-1] != 0 || (int)strlen(fname) > remaining) data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gun.c:103:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = (int)read(me->infile, next, ret); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gun.c:669: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). len = (int)strlen(*argv); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzappend.c:184:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(in->fd, in->buf, 1 << in->size); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzappend.c:356:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzappend.c:375:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzappend.c:411:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(fd, in, CHUNK); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzjoin.c:131:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = (long)read(in->fd, in->buf + in->left, CHUNK - in->left); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzjoin.c:183:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(in->fd, in->buf, 1) != 1) data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:416:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(log->fd, buf, HEAD + EXTRA) != HEAD + EXTRA || data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:477:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(log->fd, buf, 1) != 1)) data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:583:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dest = malloc(strlen(log->path) + 1); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:631:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). dict = read(fd, buf, DICT); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:646:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(log->fd, buf, 1) != 1 || lseek(log->fd, -1, SEEK_CUR) < 0) { data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:678:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(log->fd, buf, 1) != 1) data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:762:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = (size_t)read(fd, data, len) != len; data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:882:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = strlen(path); data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:939:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(log->fd, buf, 5) != 5) data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/gzlog.c:943:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(log->fd, (char *)data + next, block) != block) data/tcl8.6-8.6.10+dfsg/compat/zlib/examples/zran.c:281:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = getc(in); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzguts.h:48:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define read _read data/tcl8.6-8.6.10+dfsg/compat/zlib/gzlib.c:199:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen((const char *)path); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzlib.c:605: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 ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) == data/tcl8.6-8.6.10+dfsg/compat/zlib/gzlib.c:605: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). if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) == data/tcl8.6-8.6.10+dfsg/compat/zlib/gzlib.c:611: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). (void)snprintf(state->msg, strlen(state->path) + strlen(msg) + 3, data/tcl8.6-8.6.10+dfsg/compat/zlib/gzlib.c:611: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). (void)snprintf(state->msg, strlen(state->path) + strlen(msg) + 3, data/tcl8.6-8.6.10+dfsg/compat/zlib/gzread.c:35:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(state->fd, buf + *have, get); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzwrite.c:370:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzwrite.c:426:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(next); data/tcl8.6-8.6.10+dfsg/compat/zlib/gzwrite.c:524:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(next); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/example.c:93: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). uLong len = (uLong)strlen(hello)+1; data/tcl8.6-8.6.10+dfsg/compat/zlib/test/example.c:123:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = (int)strlen(hello)+1; data/tcl8.6-8.6.10+dfsg/compat/zlib/test/example.c:180:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen((char*)uncompr) != 7) { /* " hello!" */ data/tcl8.6-8.6.10+dfsg/compat/zlib/test/example.c:206: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). uLong len = (uLong)strlen(hello)+1; data/tcl8.6-8.6.10+dfsg/compat/zlib/test/example.c:381: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). uInt len = (uInt)strlen(hello)+1; data/tcl8.6-8.6.10+dfsg/compat/zlib/test/example.c:480: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). c_stream.avail_in = (uInt)strlen(hello)+1; data/tcl8.6-8.6.10+dfsg/compat/zlib/test/infcover.c:250:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). in = malloc((strlen(hex) + 1) >> 1); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/infcover.c:525: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). prefix = malloc(strlen(id) + 6); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:465:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(file) + strlen(GZ_SUFFIX) >= sizeof(outfile)) { data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:465:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(file) + strlen(GZ_SUFFIX) >= sizeof(outfile)) { data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:503:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned len = strlen(file); data/tcl8.6-8.6.10+dfsg/compat/zlib/test/minigzip.c:505: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 (len + strlen(GZ_SUFFIX) >= sizeof(buf)) { data/tcl8.6-8.6.10+dfsg/generic/regc_locale.c:838:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(cn->name)==len && strncmp(cn->name, np, len)==0) { data/tcl8.6-8.6.10+dfsg/generic/regc_locale.c:1016: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(*namePtr) == len) && (strncmp(*namePtr, np, len) == 0)) { data/tcl8.6-8.6.10+dfsg/generic/regerror.c:109:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(msg) + 1; /* Space needed, including NUL */ data/tcl8.6-8.6.10+dfsg/generic/regerror.c:114:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(errbuf, msg, errbuf_size-1); data/tcl8.6-8.6.10+dfsg/generic/regfronts.c:52:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/tcl8.6-8.6.10+dfsg/generic/regfronts.c:79:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:2546: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). length = strlen(argv[i]); data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:5100:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). numBytes = strlen(script); data/tcl8.6-8.6.10+dfsg/generic/tclBasic.c:7999: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). const char *tail = name + strlen(name); data/tcl8.6-8.6.10+dfsg/generic/tclCkalloc.c:923:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(argv[2]); data/tcl8.6-8.6.10+dfsg/generic/tclClock.c:2044:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tzWas = ckalloc(strlen(tzIsNow) + 1); data/tcl8.6-8.6.10+dfsg/generic/tclCmdMZ.c:3332: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). length2 = strlen(tclDefaultTrimSet); data/tcl8.6-8.6.10+dfsg/generic/tclCmdMZ.c:3379: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). length2 = strlen(tclDefaultTrimSet); data/tcl8.6-8.6.10+dfsg/generic/tclCmdMZ.c:3425: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). length2 = strlen(tclDefaultTrimSet); data/tcl8.6-8.6.10+dfsg/generic/tclCmdMZ.c:4082:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int patternLength = strlen(pattern); data/tcl8.6-8.6.10+dfsg/generic/tclCmdMZ.c:5482:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int i, length = strlen(listStr); data/tcl8.6-8.6.10+dfsg/generic/tclCompCmds.c:1570:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nameChars = strlen(argv[0]); data/tcl8.6-8.6.10+dfsg/generic/tclCompCmds.c:1572:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nameChars = strlen(argv[1]); data/tcl8.6-8.6.10+dfsg/generic/tclCompCmdsSZ.c:1213: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). PushLiteral(envPtr, tclDefaultTrimSet, strlen(tclDefaultTrimSet)); data/tcl8.6-8.6.10+dfsg/generic/tclCompCmdsSZ.c:1241: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). PushLiteral(envPtr, tclDefaultTrimSet, strlen(tclDefaultTrimSet)); data/tcl8.6-8.6.10+dfsg/generic/tclCompCmdsSZ.c:1269: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). PushLiteral(envPtr, tclDefaultTrimSet, strlen(tclDefaultTrimSet)); data/tcl8.6-8.6.10+dfsg/generic/tclCompCmdsSZ.c:3073:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). PushLiteral(envPtr, buf, strlen(buf)); data/tcl8.6-8.6.10+dfsg/generic/tclCompCmdsSZ.c:3285:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). PushLiteral(envPtr, buf, strlen(buf)); data/tcl8.6-8.6.10+dfsg/generic/tclCompExpr.c:1837: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). numBytes = (start ? strlen(start) : 0); data/tcl8.6-8.6.10+dfsg/generic/tclCompExpr.c:2550: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). ParseLexeme(occdPtr->op, strlen(occdPtr->op), &lexeme, NULL); data/tcl8.6-8.6.10+dfsg/generic/tclCompExpr.c:2606:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ParseLexeme(occdPtr->op, strlen(occdPtr->op), &lexeme, NULL); data/tcl8.6-8.6.10+dfsg/generic/tclCompExpr.c:2682: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). ParseLexeme(occdPtr->op, strlen(occdPtr->op), &lexeme, NULL); data/tcl8.6-8.6.10+dfsg/generic/tclConfig.c:86: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). cdPtr->encoding = ckalloc(strlen(valEncoding)+1); data/tcl8.6-8.6.10+dfsg/generic/tclConfig.c:134: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). Tcl_NewByteArrayObj((unsigned char *)cfg->value, strlen(cfg->value))); data/tcl8.6-8.6.10+dfsg/generic/tclDate.c:1057: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/tcl8.6-8.6.10+dfsg/generic/tclDate.c:2575:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(buff) == 3) { data/tcl8.6-8.6.10+dfsg/generic/tclDate.c:2577:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). } else if (strlen(buff) == 4 && buff[3] == '.') { data/tcl8.6-8.6.10+dfsg/generic/tclDate.c:2614:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). i = strlen(buff) - 1; data/tcl8.6-8.6.10+dfsg/generic/tclDisassemble.c:567: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). sprintf(suffixBuffer+strlen(suffixBuffer), data/tcl8.6-8.6.10+dfsg/generic/tclDisassemble.c:834:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(s); data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:1063:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name = ckalloc(strlen(typePtr->encodingName) + 1); data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:1073: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). encodingPtr->lengthProc = (LengthProc *) strlen; data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:1324: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). srcLen = strlen(src); data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:1413: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). srcLen = strlen(src); data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:2019:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(init, argv[1], sizeof(init)); data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:2022:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(final, argv[1], sizeof(final)); data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:2028:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(est.sequence, argv[1], sizeof(est.sequence)); data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:2030: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). est.sequenceLen = strlen(est.sequence); data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:2032:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(est.name, argv[0], sizeof(est.name)); data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:2056: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). dataPtr->initLen = strlen(init); data/tcl8.6-8.6.10+dfsg/generic/tclEncoding.c:2058:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dataPtr->finalLen = strlen(final); data/tcl8.6-8.6.10+dfsg/generic/tclEnv.c:255: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). nameLength = strlen(name); data/tcl8.6-8.6.10+dfsg/generic/tclEnv.c:285:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). valueLength = strlen(value); data/tcl8.6-8.6.10+dfsg/generic/tclExecute.c:3030:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cmdNameBuf, TclGetString(objv[0]), 20); data/tcl8.6-8.6.10+dfsg/generic/tclExecute.c:3162:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cmdNameBuf, TclGetString(objv[0]), 20); data/tcl8.6-8.6.10+dfsg/generic/tclExecute.c:4674:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(currNsPtr->fullName)); data/tcl8.6-8.6.10+dfsg/generic/tclExecute.c:4842:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cmdNameBuf, TclGetString(objv[0]), 20); data/tcl8.6-8.6.10+dfsg/generic/tclExecute.c:4944:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cmdNameBuf, TclGetString(objv[0]), 20); data/tcl8.6-8.6.10+dfsg/generic/tclExecute.c:5027:3: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(oPtr->namespacePtr->fullName)); data/tcl8.6-8.6.10+dfsg/generic/tclFileName.c:896: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). Tcl_SetObjLength(prefix, length + (int) strlen(p)); data/tcl8.6-8.6.10+dfsg/generic/tclFileName.c:932: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). Tcl_SetObjLength(prefix, length + (int) strlen(p)); data/tcl8.6-8.6.10+dfsg/generic/tclFileName.c:1899: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). if (TclFSNonnativePathType(tail, (int) strlen(tail), NULL, data/tcl8.6-8.6.10+dfsg/generic/tclGet.c:49:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). obj.length = strlen(src); data/tcl8.6-8.6.10+dfsg/generic/tclGet.c:93:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). obj.length = strlen(src); data/tcl8.6-8.6.10+dfsg/generic/tclGet.c:137:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). obj.length = strlen(src); data/tcl8.6-8.6.10+dfsg/generic/tclHash.c:683:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p = result + strlen(result); data/tcl8.6-8.6.10+dfsg/generic/tclHash.c:687: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). p += strlen(p); data/tcl8.6-8.6.10+dfsg/generic/tclHash.c:691: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). p += strlen(p); data/tcl8.6-8.6.10+dfsg/generic/tclHash.c:837: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). allocsize = size = strlen(string) + 1; data/tcl8.6-8.6.10+dfsg/generic/tclHistory.c:65:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int length = strlen(cmd); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:1638:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned len = strlen(chanName) + 1; data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:3986: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). srcLen = strlen(src); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:4035: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). srcLen = strlen(src); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:4094:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(src); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:5241:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read: data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:5349:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). goto read; data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:6209:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int read, decoded, count; data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:6226:4: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). &read, &decoded, &count); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:6232:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bufPtr->nextRemoved += read; data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:7732:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(optionName); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:7955:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(optionName); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:7970:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(newValue); data/tcl8.6-8.6.10+dfsg/generic/tclIO.c:10364:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). chanNameLen = strlen(chanName); data/tcl8.6-8.6.10+dfsg/generic/tclIOCmd.c:1592:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned len = strlen(script) + 1; data/tcl8.6-8.6.10+dfsg/generic/tclIOGT.c:620:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int gotBytes, read, copied; data/tcl8.6-8.6.10+dfsg/generic/tclIOGT.c:698:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read < 0) { data/tcl8.6-8.6.10+dfsg/generic/tclIOGT.c:748:58: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (ExecuteCallback(dataPtr, NULL, A_READ, UCHARP(buf), read, data/tcl8.6-8.6.10+dfsg/generic/tclIndexObj.c:456:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(indexStr); data/tcl8.6-8.6.10+dfsg/generic/tclIndexObj.c:968:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). elemLen = strlen(elementStr); data/tcl8.6-8.6.10+dfsg/generic/tclIndexObj.c:1380: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). length = strlen(infoPtr->keyStr); data/tcl8.6-8.6.10+dfsg/generic/tclIndexObj.c:1397: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). numSpaces = width + 1 - strlen(infoPtr->keyStr); data/tcl8.6-8.6.10+dfsg/generic/tclLiteral.c:406:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = (bytes ? strlen(bytes) : 0); data/tcl8.6-8.6.10+dfsg/generic/tclLiteral.c:1051:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(name), -1, NULL, nsPtr, 0, NULL); data/tcl8.6-8.6.10+dfsg/generic/tclLiteral.c:1124:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p = result + strlen(result); data/tcl8.6-8.6.10+dfsg/generic/tclLiteral.c:1128: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). p += strlen(p); data/tcl8.6-8.6.10+dfsg/generic/tclLiteral.c:1132: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). p += strlen(p); data/tcl8.6-8.6.10+dfsg/generic/tclLoad.c:405:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(fullFileName) + 1; data/tcl8.6-8.6.10+dfsg/generic/tclLoad.c:975: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). pkgPtr->packageName = ckalloc(strlen(pkgName) + 1); data/tcl8.6-8.6.10+dfsg/generic/tclMain.c:888:4: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(DEFAULT_PRIMARY_PROMPT)); data/tcl8.6-8.6.10+dfsg/generic/tclNamesp.c:702:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nameStr = name + strlen(name) - 2; data/tcl8.6-8.6.10+dfsg/generic/tclNamesp.c:774:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nameLen = strlen(simpleName) + 1; data/tcl8.6-8.6.10+dfsg/generic/tclNamesp.c:1456:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(pattern); data/tcl8.6-8.6.10+dfsg/generic/tclNamesp.c:1622:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(pattern) == 0) { data/tcl8.6-8.6.10+dfsg/generic/tclNamesp.c:3041: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). unsigned int length = strlen(nsPtr->fullName); data/tcl8.6-8.6.10+dfsg/generic/tclNamesp.c:3434: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). int length = strlen(namespacePtr->fullName); data/tcl8.6-8.6.10+dfsg/generic/tclNamesp.c:4944: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). length = strlen(command); data/tcl8.6-8.6.10+dfsg/generic/tclOOCall.c:587: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). return TclpUtfNcmp2(*strPtr1, *strPtr2, strlen(*strPtr1) + 1); data/tcl8.6-8.6.10+dfsg/generic/tclOOMethod.c:963:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(varName), contextNs, &rPtr); data/tcl8.6-8.6.10+dfsg/generic/tclObj.c:2374:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(buffer); data/tcl8.6-8.6.10+dfsg/generic/tclObj.c:2879:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(buffer); data/tcl8.6-8.6.10+dfsg/generic/tclParse.c:268:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). numBytes = strlen(start); data/tcl8.6-8.6.10+dfsg/generic/tclParse.c:1406:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). numBytes = strlen(start); data/tcl8.6-8.6.10+dfsg/generic/tclParse.c:1688:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). numBytes = strlen(start); data/tcl8.6-8.6.10+dfsg/generic/tclParse.c:1886:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). numBytes = strlen(start); data/tcl8.6-8.6.10+dfsg/generic/tclParse.c:2505: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). return CommandComplete(script, (int) strlen(script)); data/tcl8.6-8.6.10+dfsg/generic/tclPathObj.c:671:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (int)(length - strlen(extension))); data/tcl8.6-8.6.10+dfsg/generic/tclPathObj.c:709:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (int) (length - strlen(extension))); data/tcl8.6-8.6.10+dfsg/generic/tclPathObj.c:1110: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). Tcl_SetObjLength(res, length + (int) strlen(strElt)); data/tcl8.6-8.6.10+dfsg/generic/tclPkg.c:99: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). unsigned local__len = (unsigned) (strlen(s) + 1); \ data/tcl8.6-8.6.10+dfsg/generic/tclPkg.c:1432: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). char *ibuf = ckalloc(4 + 4*strlen(string)); data/tcl8.6-8.6.10+dfsg/generic/tclPkg.c:2051:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (0 != strncmp(version, actualVersion, strlen(version))) { data/tcl8.6-8.6.10+dfsg/generic/tclRegexp.c:140:62: [1] (buffer) strlen: Does not handle 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 (Tcl_RegExp) CompileRegexp(interp, pattern, (int) strlen(pattern), data/tcl8.6-8.6.10+dfsg/generic/tclResolve.c:105:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(name) + 1; data/tcl8.6-8.6.10+dfsg/generic/tclResult.c:429: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). int length = strlen(result); data/tcl8.6-8.6.10+dfsg/generic/tclResult.c:593: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). length = strlen(iPtr->result); data/tcl8.6-8.6.10+dfsg/generic/tclResult.c:815: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). iPtr->appendUsed = strlen(iPtr->result); data/tcl8.6-8.6.10+dfsg/generic/tclResult.c:823: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). iPtr->appendUsed = strlen(iPtr->result); data/tcl8.6-8.6.10+dfsg/generic/tclStrToD.c:2240:5: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(retval, "0"); data/tcl8.6-8.6.10+dfsg/generic/tclStringObj.c:285:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = (bytes? strlen(bytes) : 0); data/tcl8.6-8.6.10+dfsg/generic/tclStringObj.c:338:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = (bytes? strlen(bytes) : 0); data/tcl8.6-8.6.10+dfsg/generic/tclStringObj.c:776:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = (bytes? strlen(bytes) : 0); data/tcl8.6-8.6.10+dfsg/generic/tclStringObj.c:1121:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = (bytes ? strlen(bytes) : 0); data/tcl8.6-8.6.10+dfsg/generic/tclStringObj.c:1134: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). : Tcl_UtfPrev(bytes+limit+1-strlen(ellipsis), bytes) - bytes; data/tcl8.6-8.6.10+dfsg/generic/tclStringObj.c:1158: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). AppendUtfToUnicodeRep(objPtr, ellipsis, strlen(ellipsis)); data/tcl8.6-8.6.10+dfsg/generic/tclStringObj.c:1160: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). AppendUtfToUtfRep(objPtr, ellipsis, strlen(ellipsis)); data/tcl8.6-8.6.10+dfsg/generic/tclStubInit.c:235:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(string); data/tcl8.6-8.6.10+dfsg/generic/tclStubInit.c:302:8: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = wcslen((wchar_t *)string); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:841: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). asyncPtr->command = ckalloc(strlen(argv[2]) + 1); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:1632: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). dPtr->deleteCmd = ckalloc(strlen(argv[3]) + 1); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:2026:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(Tcl_GetStringResult(encodingPtr->interp)); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:2058:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(Tcl_GetStringResult(encodingPtr->interp)); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:2411:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(buf); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:2425:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(buf); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:3092:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). stringVar = ckalloc(strlen(argv[5]) + 1); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:3199:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). stringVar = ckalloc(strlen(argv[5]) + 1); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:4208:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buf = ckalloc(strlen(argv[2]) + 1); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:4262:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(argv[1]); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:5451:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(cmdName); data/tcl8.6-8.6.10+dfsg/generic/tclTest.c:5921:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(cmd); data/tcl8.6-8.6.10+dfsg/generic/tclThreadTest.c:438: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). errorProcString = ckalloc(strlen(proc) + 1); data/tcl8.6-8.6.10+dfsg/generic/tclThreadTest.c:598: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). threadEvalScript = ckalloc(strlen(ctrlPtr->script) + 1); data/tcl8.6-8.6.10+dfsg/generic/tclThreadTest.c:844: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). threadEventPtr->script = ckalloc(strlen(script) + 1); data/tcl8.6-8.6.10+dfsg/generic/tclThreadTest.c:1045: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). resultPtr->result = ckalloc(strlen(result) + 1); data/tcl8.6-8.6.10+dfsg/generic/tclThreadTest.c:1048: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). resultPtr->errorCode = ckalloc(strlen(errorCode) + 1); data/tcl8.6-8.6.10+dfsg/generic/tclThreadTest.c:1052: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). resultPtr->errorInfo = ckalloc(strlen(errorInfo) + 1); data/tcl8.6-8.6.10+dfsg/generic/tclThreadTest.c:1202:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). resultPtr->result = ckalloc(strlen(msg) + 1); data/tcl8.6-8.6.10+dfsg/generic/tclTrace.c:1923: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). register unsigned len = strlen(command) + 1; data/tcl8.6-8.6.10+dfsg/generic/tclUtf.c:433: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). length = strlen(src); data/tcl8.6-8.6.10+dfsg/generic/tclUtf.c:849: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). result = TclParseBackslash(src, (int)strlen(src), &numRead, dst); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:1995:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). bytesNeeded += strlen(argv[i]); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:2020: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). elemLength = strlen(argv[i]); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:2733: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). length = strlen(bytes); data/tcl8.6-8.6.10+dfsg/generic/tclUtil.c:3087: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). dsPtr->length = strlen(iPtr->result); data/tcl8.6-8.6.10+dfsg/generic/tclVar.c:4313: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). p += strlen(p)-1; data/tcl8.6-8.6.10+dfsg/generic/tclVar.c:5560: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). elemLen = strlen(elem); data/tcl8.6-8.6.10+dfsg/generic/tclVar.c:5591: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). len2 = strlen(part2); data/tcl8.6-8.6.10+dfsg/generic/tclZlib.c:3240: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). TclNewStringObj(compDictObj, value, strlen(value)); data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_fread.c:14:13: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int ch = fgetc(stream); data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_fread.c:17:12: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = fgetc(stream); data/tcl8.6-8.6.10+dfsg/libtommath/bn_mp_fread.c:50:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). } while ((ch = fgetc(stream)) != EOF); data/tcl8.6-8.6.10+dfsg/libtommath/bn_s_mp_rand_platform.c:99:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read(fd, p, n); data/tcl8.6-8.6.10+dfsg/macosx/tclMacOSXNotify.c:1893:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(receivePipe, buf, 1); data/tcl8.6-8.6.10+dfsg/tools/man2tcl.c:145:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(line) >= MAX_LINE_SIZE -1) { data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:137: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). mp->name = malloc((unsigned) (strlen(path) + 1)); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:540:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmpsym, ls->l_name, SYMNMLEN); data/tcl8.6-8.6.10+dfsg/unix/tclLoadAix.c:544: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). ep->name = malloc((unsigned) (strlen(symname) + 1)); data/tcl8.6-8.6.10+dfsg/unix/tclLoadNext.c:139: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). char sym[strlen(symbol) + 2]; data/tcl8.6-8.6.10+dfsg/unix/tclUnixChan.c:255:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytesRead = read(fsPtr->fd, buf, (size_t) toRead); data/tcl8.6-8.6.10+dfsg/unix/tclUnixChan.c:588:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(optionName); data/tcl8.6-8.6.10+dfsg/unix/tclUnixChan.c:589: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). vlen = strlen(value); data/tcl8.6-8.6.10+dfsg/unix/tclUnixChan.c:734:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (Tcl_UtfNcasecmp(argv[i], "DTR", strlen(argv[i])) == 0) { data/tcl8.6-8.6.10+dfsg/unix/tclUnixChan.c:740: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). } else if (Tcl_UtfNcasecmp(argv[i], "RTS", strlen(argv[i])) == 0) { data/tcl8.6-8.6.10+dfsg/unix/tclUnixChan.c:746: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). } else if (Tcl_UtfNcasecmp(argv[i], "BREAK", strlen(argv[i])) == 0) { data/tcl8.6-8.6.10+dfsg/unix/tclUnixChan.c:816:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(optionName); data/tcl8.6-8.6.10+dfsg/unix/tclUnixCompat.c:910: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). int sz = (elsize<0 ? (int) strlen(src[j]) + 1 : elsize); data/tcl8.6-8.6.10+dfsg/unix/tclUnixCompat.c:953:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(src) + 1; data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:377: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). && (strncmp(srcPath, dstPath, strlen(srcPath)) != 0)) { data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:615:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = (size_t) read(srcFd, buffer, blockSize); data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:721:12: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mode = umask(0); data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:722:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(mode); data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:1768:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(modeStringPtr) != 9) { data/tcl8.6-8.6.10+dfsg/unix/tclUnixFCmd.c:2062:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newNormLen = strlen(normPath); data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:49:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(name); data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:722: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). char *newCd = ckalloc(strlen(buffer) + 1); data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:1111:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(Tcl_DStringValue(&ds)) < len - sizeof(char)) { data/tcl8.6-8.6.10+dfsg/unix/tclUnixFile.c:1157: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). len = (strlen((const char*) clientData) + 1) * sizeof(char); data/tcl8.6-8.6.10+dfsg/unix/tclUnixNotfy.c:1322:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(receivePipe, buf, 1); data/tcl8.6-8.6.10+dfsg/unix/tclUnixPipe.c:480: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). len = strlen(errSpace); data/tcl8.6-8.6.10+dfsg/unix/tclUnixPipe.c:494:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(errSpace); data/tcl8.6-8.6.10+dfsg/unix/tclUnixPipe.c:527:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). count = read(fd, errSpace, (size_t) (sizeof(errSpace) - 1)); data/tcl8.6-8.6.10+dfsg/unix/tclUnixPipe.c:1062:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytesRead = read(GetFd(psPtr->inFile), buf, (size_t) toRead); data/tcl8.6-8.6.10+dfsg/unix/tclUnixSock.c:276:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *lengthPtr = strlen(native); data/tcl8.6-8.6.10+dfsg/unix/tclUnixSock.c:831:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(optionName); data/tcl8.6-8.6.10+dfsg/unix/tclUnixTest.c:262:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read(GetFd(pipePtr->readFile), buffer, 4000) > 0) { data/tcl8.6-8.6.10+dfsg/unix/tclUnixTime.c:576:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). lastTZ = ckalloc(strlen(newTZ) + 1); data/tcl8.6-8.6.10+dfsg/unix/tclXtNotify.c:31:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). XtInputId read; /* Xt read callback handle. */ data/tcl8.6-8.6.10+dfsg/unix/tclXtNotify.c:386:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). XtRemoveInput(filePtr->read); data/tcl8.6-8.6.10+dfsg/unix/tclXtNotify.c:465:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). XtRemoveInput(filePtr->read); data/tcl8.6-8.6.10+dfsg/unix/tclXtNotify.c:507:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (*id == filePtr->read) { data/tcl8.6-8.6.10+dfsg/win/cat.c:38:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _write(2, err, (unsigned int)strlen(err)); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:389:2: [1] (buffer) lstrcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant character. lstrcat(cmdline, "\""); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:525:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen(match); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:671:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). op += strlen(p->key); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:733:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dirlen = strlen(dir); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:736:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(path, dir, dirlen); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:737:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(path+dirlen, "\\*", 3); /* Including terminating \0 */ data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:738:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). keylen = strlen(keypath); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:763: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). sublen = strlen(finfo.cFileName); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:766:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(path+dirlen+1, finfo.cFileName, sublen); data/tcl8.6-8.6.10+dfsg/win/nmakehlp.c:768:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(path+dirlen+1+sublen+1, keypath, keylen+1); data/tcl8.6-8.6.10+dfsg/win/tclAppInit.c:272:9: [1] (buffer) _tcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). + (_tcslen(cmdLine) * sizeof(TCHAR)) + sizeof(TCHAR)); data/tcl8.6-8.6.10+dfsg/win/tclWin32Dll.c:566:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(string); data/tcl8.6-8.6.10+dfsg/win/tclWin32Dll.c:635:8: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = wcslen((WCHAR *)string); data/tcl8.6-8.6.10+dfsg/win/tclWinChan.c:1546:18: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int i, len = wcslen(p); data/tcl8.6-8.6.10+dfsg/win/tclWinDde.c:393:49: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Tcl_DStringAppend(&dString, (char *)name, wcslen(name) * sizeof(WCHAR)); data/tcl8.6-8.6.10+dfsg/win/tclWinDde.c:430:40: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). riPtr->name = (WCHAR *) Tcl_Alloc((wcslen(actualName) + 1) * sizeof(WCHAR)); data/tcl8.6-8.6.10+dfsg/win/tclWinDde.c:788:41: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Tcl_WCharToUtfDString(utilString, wcslen(utilString), &ds); data/tcl8.6-8.6.10+dfsg/win/tclWinDde.c:847:40: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Tcl_WCharToUtfDString(utilString, wcslen(utilString), &ds); data/tcl8.6-8.6.10+dfsg/win/tclWinDde.c:852:37: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Tcl_WCharToUtfDString(utilString, wcslen(utilString), &ds2); data/tcl8.6-8.6.10+dfsg/win/tclWinDde.c:1039:34: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Tcl_WCharToUtfDString(name, wcslen(name), &dString); data/tcl8.6-8.6.10+dfsg/win/tclWinDde.c:1149:28: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Tcl_WCharToUtfDString(sz, wcslen(sz), &dString); data/tcl8.6-8.6.10+dfsg/win/tclWinDde.c:1154:28: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Tcl_WCharToUtfDString(sz, wcslen(sz), &dString); data/tcl8.6-8.6.10+dfsg/win/tclWinDde.c:1532:41: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Tcl_WCharToUtfDString(serviceName, wcslen(serviceName), &dsBuf); data/tcl8.6-8.6.10+dfsg/win/tclWinFCmd.c:1272:8: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = wcslen(data.cFileName) * sizeof(WCHAR); data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:388:24: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sizeof(WCHAR) * (1+wcslen((WCHAR *) linkTargetPath))); data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:389:11: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = wcslen(nativeTarget); data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:413:6: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). wcslen(nativeTarget) * sizeof(WCHAR); data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:1879:18: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = wcslen(path); data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:2742:12: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (int) (wcslen(nativeName)*sizeof(WCHAR))); data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:3076:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(str) != (unsigned int) len) { data/tcl8.6-8.6.10+dfsg/win/tclWinFile.c:3201:28: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = sizeof(WCHAR) * (wcslen((const WCHAR *) clientData) + 1); data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c:280: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). for (shortlib = (char *) &lib[strlen(lib)-1]; shortlib>lib ; shortlib--) { data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c:282: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 ((unsigned)(shortlib - lib) == strlen(lib) - 1) { data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c:381:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *lengthPtr = strlen(name); data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c:432:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *lengthPtr = strlen(name); data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c:516:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Tcl_DStringSetLength(bufPtr, strlen(Tcl_DStringValue(bufPtr))); data/tcl8.6-8.6.10+dfsg/win/tclWinInit.c:698:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(name); data/tcl8.6-8.6.10+dfsg/win/tclWinPipe.c:1282:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). DWORD attr, read; data/tcl8.6-8.6.10+dfsg/win/tclWinPipe.c:1346:53: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ReadFile(hFile, (void *) &header, sizeof(header), &read, NULL); data/tcl8.6-8.6.10+dfsg/win/tclWinPipe.c:1381:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ReadFile(hFile, (void *) buf, 2, &read, NULL); data/tcl8.6-8.6.10+dfsg/win/tclWinPipe.c:3249: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). Tcl_WinUtfToTChar(number, strlen(number), &buf); data/tcl8.6-8.6.10+dfsg/win/tclWinReg.c:838:32: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Tcl_WCharToUtfDString(wp, wcslen(wp), &buf); data/tcl8.6-8.6.10+dfsg/win/tclWinReg.c:851:64: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Tcl_WCharToUtfDString((const WCHAR *)Tcl_DStringValue(&data), wcslen(wp), &buf); data/tcl8.6-8.6.10+dfsg/win/tclWinReg.c:1507:33: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Tcl_WCharToUtfDString(tMsgPtr, wcslen(tMsgPtr), &ds); data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:1609:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(optionName); data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:1610: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). vlen = strlen(value); data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:1789: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 (strncasecmp(argv[i], "DTR", strlen(argv[i])) == 0) { data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:1801: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). } else if (strncasecmp(argv[i], "RTS", strlen(argv[i])) == 0) { data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:1813:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). } else if (strncasecmp(argv[i], "BREAK", strlen(argv[i])) == 0) { data/tcl8.6-8.6.10+dfsg/win/tclWinSerial.c:1998:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(optionName); data/tcl8.6-8.6.10+dfsg/win/tclWinSock.c:1261:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(optionName); ANALYSIS SUMMARY: Hits = 1443 Lines analyzed = 346454 in approximately 8.42 seconds (41152 lines/second) Physical Source Lines of Code (SLOC) = 197547 Hits@level = [0] 457 [1] 336 [2] 873 [3] 58 [4] 158 [5] 18 Hits@level+ = [0+] 1900 [1+] 1443 [2+] 1107 [3+] 234 [4+] 176 [5+] 18 Hits/KSLOC@level+ = [0+] 9.61796 [1+] 7.30459 [2+] 5.60373 [3+] 1.18453 [4+] 0.890927 [5+] 0.0911176 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.