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/osmo-bts-1.2.1+dfsg1/contrib/eeprom_reader.c Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/abis.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/amr.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/bts.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/bts_model.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/cbch.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/control_if.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/dtx_dl_amr_fsm.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/gsm_data.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/gsm_data_shared.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/handover.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/l1sap.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/logging.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/measurement.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/msg_utils.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/oml.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/paging.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/pcu_if.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/pcuif_proto.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/phy_link.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/power_control.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/rsl.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/scheduler.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/scheduler_backend.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/signal.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/tx_power.h Examining data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/vty.h Examining data/osmo-bts-1.2.1+dfsg1/src/common/abis.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/amr.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/bts.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/bts_ctrl_commands.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/bts_ctrl_lookup.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/cbch.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/dtx_dl_amr_fsm.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/gsm_data_shared.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/handover.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/l1sap.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/lchan.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/load_indication.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/logging.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/main.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/measurement.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/msg_utils.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/oml.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/paging.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/pcu_sock.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/phy_link.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/power_control.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/rsl.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/scheduler.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/scheduler_mframe.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/sysinfo.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/tx_power.c Examining data/osmo-bts-1.2.1+dfsg1/src/common/vty.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/calib_file.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/hw_misc.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/hw_misc.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/l1_if.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/l1_if.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/l1_transp.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/l1_transp_hw.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/lc15bts.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/lc15bts.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/lc15bts_vty.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/main.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_bid.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_bid.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_bts.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_bts.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_clock.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_clock.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_led.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_led.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_calib.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_nl.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_temp.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_misc.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_misc.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_nl.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_nl.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_par.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_par.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_swd.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_swd.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_temp.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_temp.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_util.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/oml.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/oml_router.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/oml_router.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/tch.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/utils.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/utils.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/calib_file.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/hw_misc.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/hw_misc.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/l1_if.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/l1_if.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/l1_transp.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/l1_transp_hw.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/main.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_bid.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_bid.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_bts.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_bts.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_clock.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_clock.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_led.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_led.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_nl.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_temp.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_misc.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_misc.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_nl.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_nl.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_par.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_par.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_swd.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_swd.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_temp.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_temp.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_util.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oml.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oml_router.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oml_router.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/tch.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/utils.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/utils.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/l1_if.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/l1_if.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/l1_oml.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/l1_oml.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/l1_tch.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/l1_utils.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/l1_utils.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/main.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/octphy_hw_api.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/octphy_hw_api.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/octphy_vty.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/octpkt.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/octpkt.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-omldummy/bts_model.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-omldummy/main.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/calib_file.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/calib_fixup.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/eeprom.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/eeprom.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/femtobts.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/femtobts.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/hw_misc.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/hw_misc.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/l1_fwd.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/l1_fwd_main.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/l1_if.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/l1_if.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/l1_transp.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/l1_transp_fwd.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/l1_transp_hw.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/main.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts-calib.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts-layer1.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts-layer1.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_eeprom.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr_calib.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr_nl.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_misc.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_misc.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_nl.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_nl.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_par.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_par.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_util.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/oml.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/oml_router.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/oml_router.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_ctrl.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/tch.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/utils.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/utils.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/l1_if.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/l1_if.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/loops.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/loops.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/main.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_if.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_if.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_vty.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-virtual/bts_model.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-virtual/l1_if.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-virtual/l1_if.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-virtual/main.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-virtual/osmo_mcast_sock.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-virtual/osmo_mcast_sock.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-virtual/scheduler_virtbts.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-virtual/virtual_um.c Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-virtual/virtual_um.h Examining data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-virtual/virtualbts_vty.c Examining data/osmo-bts-1.2.1+dfsg1/tests/agch/agch_test.c Examining data/osmo-bts-1.2.1+dfsg1/tests/cipher/cipher_test.c Examining data/osmo-bts-1.2.1+dfsg1/tests/handover/handover_test.c Examining data/osmo-bts-1.2.1+dfsg1/tests/meas/meas_test.c Examining data/osmo-bts-1.2.1+dfsg1/tests/meas/meas_testcases.h Examining data/osmo-bts-1.2.1+dfsg1/tests/meas/sysmobts_fr_samples.h Examining data/osmo-bts-1.2.1+dfsg1/tests/misc/misc_test.c Examining data/osmo-bts-1.2.1+dfsg1/tests/paging/paging_test.c Examining data/osmo-bts-1.2.1+dfsg1/tests/power/power_test.c Examining data/osmo-bts-1.2.1+dfsg1/tests/stubs.c Examining data/osmo-bts-1.2.1+dfsg1/tests/sysmobts/sysmobts_test.c Examining data/osmo-bts-1.2.1+dfsg1/tests/tx_power/tx_power_test.c FINAL RESULTS: data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/gsm_data_shared.h:697: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. unsigned int access; /* access bursts */ data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/rsl.h:39:34: [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. uint16_t busy, uint16_t access); data/osmo-bts-1.2.1+dfsg1/src/common/load_indication.c:72:23: [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. bts->load.rach.access); data/osmo-bts-1.2.1+dfsg1/src/common/rsl.c:424:34: [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. uint16_t busy, uint16_t access) data/osmo-bts-1.2.1+dfsg1/src/common/rsl.c:437:20: [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. msgb_put_u16(msg, access); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/main.c:171: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(get_hwversion_desc()); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_bid.c:84:13: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. if (fscanf(fp, spec, dst) != 1) { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_bts.c:74:6: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (system("pidof osmo-bts-lc15 > /dev/null")) { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_led.c:251: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(str, pattern); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_temp.c:120:3: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system("/bin/systemctl start osmo-bts.service"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_temp.c:155:3: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system("/bin/systemctl stop osmo-bts.service"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/main.c:179: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(get_hwversion_desc()); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_bid.c:118:16: [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(model_name + len, sizeof(model_name) - len, data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_bts.c:74:6: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (system("pidof osmo-bts-oc2g > /dev/null")) { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_led.c:250: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(str, pattern); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_temp.c:114:3: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system("/bin/systemctl start osmo-bts.service"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_temp.c:141:3: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system("/bin/systemctl stop osmo-bts.service"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/l1_if.h:46:5: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. } system; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/l1_oml.c:1136:28: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. talloc_replace(fl1h->info.system.platform, fl1h, aisr->szPlatform); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/l1_oml.c:1137:28: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. talloc_replace(fl1h->info.system.version, fl1h, aisr->szVersion); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/octphy_vty.c:430:14: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. fl1h->info.system.platform, fl1h->info.system.version, data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/octphy_vty.c:430:42: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. fl1h->info.system.platform, fl1h->info.system.version, data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/eeprom.c:70:29: [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 PERROR(x, args ...) fprintf(stderr, x, ## args) data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/hw_misc.c:85:3: [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(tmp, sizeof(tmp)-1, HWMON_PREFIX "/temp%u_input", i+1), data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c:119:3: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system("/bin/systemctl start osmo-bts-sysmo"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr_temp.c:160:3: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system("/bin/systemctl stop osmo-bts-sysmo"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_misc.c:71:2: [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(buf, sizeof(buf)-1, TEMP_PATH, sensor, temp_type_str[type]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_if.c:227:3: [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(tcm->params, sizeof(tcm->params) - 1, fmt, ap); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_if.c:423: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(rsp->params, k); data/osmo-bts-1.2.1+dfsg1/src/common/bts.c:715:8: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. if ((random() & 0xffff) >= p_drop) data/osmo-bts-1.2.1+dfsg1/src/common/main.c:114:7: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "-hc:d:Dc:sTVe:i:t:r:", data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/main.c:188:7: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "p:wM", data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr.c:195:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "nhsd:c:")) != -1) { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_util.c:73:7: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "rw:h", data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/main.c:196:7: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "p:wM", data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr.c:176:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "nhsd:c:")) != -1) { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_util.c:70:7: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "rw:h", data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/main.c:74:7: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "I", data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/l1_transp_fwd.c:104:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *bts_host = getenv("L1FWD_BTS_HOST"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/main.c:161:7: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "wM", data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts-calib.c:174:7: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "hs:c:m:b:d:a:i:t:", data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr.c:167:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "nhsd:c:")) != -1) { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr.c:256:2: [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(time(NULL)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_util.c:85:7: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "rw:h", data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/main.c:82:7: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "", data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-virtual/main.c:99:7: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "", data/osmo-bts-1.2.1+dfsg1/contrib/eeprom_reader.c:61: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). i2c_fd = open(filename, O_RDWR); data/osmo-bts-1.2.1+dfsg1/contrib/eeprom_reader.c:78: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). out_fd = open(out_file, O_WRONLY | O_CREAT | O_TRUNC, 0644); data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/gsm_data_shared.h:574: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 version[MAX_VERSION_LENGTH]; data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/gsm_data_shared.h:575: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 sub_model[MAX_VERSION_LENGTH]; data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/gsm_data_shared.h:582: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 pcu_version[MAX_VERSION_LENGTH]; data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/pcuif_proto.h:60: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 text[TXT_MAX_LEN]; /* Text to be transmitted to BTS */ data/osmo-bts-1.2.1+dfsg1/include/osmo-bts/phy_link.h:94: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 version[MAX_VERSION_LENGTH]; data/osmo-bts-1.2.1+dfsg1/src/common/bts.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(out_buf, msgb_l3(msg), msgb_l3len(msg)); data/osmo-bts-1.2.1+dfsg1/src/common/bts_ctrl_commands.c:54:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int val = atoi(cmd->value); data/osmo-bts-1.2.1+dfsg1/src/common/bts_ctrl_commands.c:67:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int val = atoi(value); data/osmo-bts-1.2.1+dfsg1/src/common/cbch.c:133: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(out, &msg->msg[block_nr * GSM412_BLOCK_LEN], to_copy); data/osmo-bts-1.2.1+dfsg1/src/common/cbch.c:212: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(scm->msg, msg, msg_len); data/osmo-bts-1.2.1+dfsg1/src/common/gsm_data_shared.c:374: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 ts2str[255]; data/osmo-bts-1.2.1+dfsg1/src/common/gsm_data_shared.c:796: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. static char buf[23]; data/osmo-bts-1.2.1+dfsg1/src/common/l1sap.c:793: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(p, msgb_l2(loop_msg), msgb_l2len(loop_msg)); data/osmo-bts-1.2.1+dfsg1/src/common/l1sap.c:896:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, si, GSM_MACBLOCK_LEN); data/osmo-bts-1.2.1+dfsg1/src/common/l1sap.c:898:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, fill_frame, GSM_MACBLOCK_LEN); data/osmo-bts-1.2.1+dfsg1/src/common/l1sap.c:927: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 + 2, si, GSM_MACBLOCK_LEN - 2); data/osmo-bts-1.2.1+dfsg1/src/common/l1sap.c:929: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 + 2, fill_frame, GSM_MACBLOCK_LEN - 2); data/osmo-bts-1.2.1+dfsg1/src/common/l1sap.c:941: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, fill_frame, GSM_MACBLOCK_LEN); data/osmo-bts-1.2.1+dfsg1/src/common/l1sap.c:946: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 + 2, pp.oph.msg->data + 2, GSM_MACBLOCK_LEN - 2); data/osmo-bts-1.2.1+dfsg1/src/common/l1sap.c:949: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, pp.oph.msg->data, GSM_MACBLOCK_LEN); data/osmo-bts-1.2.1+dfsg1/src/common/l1sap.c:962:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, fill_frame, GSM_MACBLOCK_LEN); data/osmo-bts-1.2.1+dfsg1/src/common/l1sap.c:1586: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(msg->l2h, data, len); data/osmo-bts-1.2.1+dfsg1/src/common/l1sap.c:1608: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(msgb_put(msg, rtp_pl_len), rtp_pl, rtp_pl_len); data/osmo-bts-1.2.1+dfsg1/src/common/l1sap.c:1674: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[32]; data/osmo-bts-1.2.1+dfsg1/src/common/main.c:86: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 *argv_out[argc]; data/osmo-bts-1.2.1+dfsg1/src/common/main.c:144: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). log_set_log_level(osmo_stderr_target, atoi(optarg)); data/osmo-bts-1.2.1+dfsg1/src/common/main.c:147: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). rt_prio = atoi(optarg); data/osmo-bts-1.2.1+dfsg1/src/common/main.c:206: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 tmp[PATH_MAX+1]; data/osmo-bts-1.2.1+dfsg1/src/common/main.c:211:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). outf = fopen(tmp, "w"); data/osmo-bts-1.2.1+dfsg1/src/common/measurement.c:350: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(&lchan->meas.uplink[lchan->meas.num_ul_meas++], ulm, data/osmo-bts-1.2.1+dfsg1/src/common/msg_utils.c:155: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(lchan->tch.dtx.cache + amr, l1_payload, copy_len); data/osmo-bts-1.2.1+dfsg1/src/common/msg_utils.c:186:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(l1_payload, lchan->tch.dtx.cache, 2); data/osmo-bts-1.2.1+dfsg1/src/common/msg_utils.c:503: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, lchan->tch.dtx.cache, lchan->tch.dtx.len); data/osmo-bts-1.2.1+dfsg1/src/common/oml.c:74:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char mo_buf[128]; data/osmo-bts-1.2.1+dfsg1/src/common/oml.c:751:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&_value, value, 2); data/osmo-bts-1.2.1+dfsg1/src/common/oml.c:773: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(&_value, value, 2); data/osmo-bts-1.2.1+dfsg1/src/common/oml.c:1126: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(&bts->gprs.nse.timer, data/osmo-bts-1.2.1+dfsg1/src/common/oml.c:1131: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(&bts->gprs.cell.timer, data/osmo-bts-1.2.1+dfsg1/src/common/oml.c:1192: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(&_cur_s, cur, 2); data/osmo-bts-1.2.1+dfsg1/src/common/oml.c:1195: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(&_cur_s, cur, 2); data/osmo-bts-1.2.1+dfsg1/src/common/oml.c:1221: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(&_cur_s, cur, 2); data/osmo-bts-1.2.1+dfsg1/src/common/oml.c:1224: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(&_cur_l, cur, 4); data/osmo-bts-1.2.1+dfsg1/src/common/oml.c:1227: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(&_cur_s, cur, 2); data/osmo-bts-1.2.1+dfsg1/src/common/paging.c:229: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(&pr->u.paging.identity_lv, identity_lv, identity_lv[0]+1); data/osmo-bts-1.2.1+dfsg1/src/common/paging.c:267: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(pr->u.imm_ass.msg, data, GSM_MACBLOCK_LEN); data/osmo-bts-1.2.1+dfsg1/src/common/paging.c:588:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(out_buf, pr[num_pr]->u.imm_ass.msg, data/osmo-bts-1.2.1+dfsg1/src/common/pcu_sock.c:156: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(info_ind->nse_timer, bts->gprs.nse.timer, 7); data/osmo-bts-1.2.1+dfsg1/src/common/pcu_sock.c:157: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(info_ind->cell_timer, bts->gprs.cell.timer, 11); data/osmo-bts-1.2.1+dfsg1/src/common/pcu_sock.c:310: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(ai_req->data, app_data, ai_req->len); data/osmo-bts-1.2.1+dfsg1/src/common/pcu_sock.c:376: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(data_ind->data, data, len); data/osmo-bts-1.2.1+dfsg1/src/common/pcu_sock.c:461: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(pag_req->identity_lv, identity_lv, identity_lv[0] + 1); data/osmo-bts-1.2.1+dfsg1/src/common/pcu_sock.c:487: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(data_cnf->data, data, len); data/osmo-bts-1.2.1+dfsg1/src/common/pcu_sock.c:535: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(msg->l3h, data_req->data, data_req->len); data/osmo-bts-1.2.1+dfsg1/src/common/phy_link.c:168: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. static char buf[32]; data/osmo-bts-1.2.1+dfsg1/src/common/rsl.c:356:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(GSM_BTS_SI2Q(bts, bts->si2q_index), TLVP_VAL(&tp, RSL_IE_FULL_BCCH_INFO), len); data/osmo-bts-1.2.1+dfsg1/src/common/rsl.c:359:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(bts->si_buf[osmo_si], TLVP_VAL(&tp, RSL_IE_FULL_BCCH_INFO), len); data/osmo-bts-1.2.1+dfsg1/src/common/rsl.c:389: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(bts->si_buf[osmo_si], data/osmo-bts-1.2.1+dfsg1/src/common/rsl.c:591: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 + 2, current, len); data/osmo-bts-1.2.1+dfsg1/src/common/rsl.c:960: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(GSM_LCHAN_SI(lchan, osmo_si), GSM_BTS_SI(bts, osmo_si), sizeof(sysinfo_buf_t)); data/osmo-bts-1.2.1+dfsg1/src/common/rsl.c:989: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(lchan->encr.key, val, lchan->encr.key_len); data/osmo-bts-1.2.1+dfsg1/src/common/rsl.c:1217: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(lchan->mr_bts_lv, TLVP_VAL(&tp, RSL_IE_MR_CONFIG) - 1, data/osmo-bts-1.2.1+dfsg1/src/common/rsl.c:1391:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(msgb_put(fake_msg, rc), mid_buf, rc); data/osmo-bts-1.2.1+dfsg1/src/common/rsl.c:1596: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(lchan->mr_bts_lv, TLVP_VAL(&tp, RSL_IE_MR_CONFIG) - 1, data/osmo-bts-1.2.1+dfsg1/src/common/rsl.c:1979: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. static char hostbuf[256]; data/osmo-bts-1.2.1+dfsg1/src/common/rsl.c:2084: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 cname[32]; data/osmo-bts-1.2.1+dfsg1/src/common/scheduler.c:744: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(msg->l2h, l2, l2_len); data/osmo-bts-1.2.1+dfsg1/src/common/scheduler.c:774: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(msg->l2h, tch, tch_len); data/osmo-bts-1.2.1+dfsg1/src/common/scheduler.c:1113: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(chan_state->dl_encr_key, key, key_len); data/osmo-bts-1.2.1+dfsg1/src/common/scheduler.c:1117: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(chan_state->ul_encr_key, key, key_len); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:228: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). int trx_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:395:19: [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). g_vty_port_num = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:407: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). int bts_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:432: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). int site_id = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:433: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). int bts_id = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:502:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). bts->rtp_jitter_buf_ms = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:518: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). start = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:519:8: [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). end = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:556: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). paging_set_queue_max(bts->paging_state, atoi(argv[0])); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:569:41: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). paging_set_lifetime(bts->paging_state, atoi(argv[0])); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:586:33: [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). bts->agch_queue.thresh_level = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:587:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). bts->agch_queue.low_level = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:588:31: [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). bts->agch_queue.high_level = atoi(argv[2]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:615:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). bts->ul_power_target = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:627: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). bts->min_qual_rach = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:639: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). bts->min_qual_norm = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:699:29: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). bts->smscb_queue_max_len = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:708:29: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). bts->smscb_queue_tgt_len = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:717: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). bts->smscb_queue_hyst = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:728:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int val = atoi(valstr); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:782:45: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). trx->power_params.ramp.step_interval_sec = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:818:43: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). struct phy_link *plink = phy_link_by_num(atoi(argv[0])); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:827:37: [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). pinst = phy_instance_by_num(plink, atoi(argv[1])); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:942:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). bts_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:995:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). bts_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:1004:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). trx_nr = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:1053:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). bts_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:1062:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). trx_nr = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:1071:11: [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). ts_nr = atoi(argv[2]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:1305:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). bts_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:1317:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). trx_nr = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:1329:11: [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). ts_nr = atoi(argv[2]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:1341: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). lchan_nr = atoi(argv[3]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:1382: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). int bts_nr = atoi(argv[idx+0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:1383: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). int trx_nr = atoi(argv[idx+1]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:1384: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). int ts_nr = atoi(argv[idx+2]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:1385:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int lchan_nr = atoi(argv[idx+3]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:1466: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). int phy_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:1486: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). int inst_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:1511: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). int inst_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/common/vty.c:1558:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int jitbuf_ms = atoi(argv[4]), rc; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/calib_file.c:139: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 fname[PATH_MAX]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/calib_file.c:151: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). st->fp = fopen(fname, "rb"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/hw_misc.c:66: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("/var/lc15/leds/led0/brightness", O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/hw_misc.c:77: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("/var/lc15/leds/led1/brightness", O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/l1_if.c:410:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/l1_if.c:427: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(lchan->tch.dtx.facch, msg->l2h, data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/l1_if.c:457:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/l1_if.c:916: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(msu_param->u8Buffer, fill_frame, GSM_MACBLOCK_LEN); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/l1_transp_hw.c:252: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 buf[PATH_MAX]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/l1_transp_hw.c:262: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). rc = open(buf, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/l1_transp_hw.c:283:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). rc = open(buf, O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/lc15bts_vty.c:115: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). int trx_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/lc15bts_vty.c:149: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). int phy_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/lc15bts_vty.c:167: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). int phy_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/lc15bts_vty.c:187: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). int phy_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/lc15bts_vty.c:188: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). int inst_nr = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/lc15bts_vty.c:235: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). int trx_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/lc15bts_vty.c:236: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). int ts_nr = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/lc15bts_vty.c:237:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int lchan_nr = atoi(argv[3]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/lc15bts_vty.c:257: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). int trx_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/lc15bts_vty.c:258: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). int power = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/lc15bts_vty.c:273: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). int trx_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/lc15bts_vty.c:274: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). int ts_nr = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/lc15bts_vty.c:275:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int lchan_nr = atoi(argv[2]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/lc15bts_vty.c:292: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). int trx_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/lc15bts_vty.c:293: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). int ts_nr = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/lc15bts_vty.c:294:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int lchan_nr = atoi(argv[2]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/lc15bts_vty.c:309:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int nominal_power = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/main.c:57: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 tmp[PATH_MAX+1]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/main.c:62:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). outf = fopen(tmp, "w"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_bid.c:78:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen(src, "r"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_bid.c:147: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. static char model_name[64] = {0, }; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_bts.c:55: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 str[64] = "\0"; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_bts.c:59:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen("/var/run/osmo-bts/state", "r")) == NULL) { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_clock.c:56: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 szVal[32] = {0}; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_clock.c:76: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 szVal[32] = {0}; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_clock.c:78: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. n = sprintf(szVal, "%d", val); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_clock.c:104: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). clkerr_fd_err = open(CLKERR_ERR_SYSFS, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_clock.c:112: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). clkerr_fd_accuracy = open(CLKERR_ACC_SYSFS, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_clock.c:120: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). clkerr_fd_interval = open(CLKERR_INT_SYSFS, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_clock.c:128:21: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). clkerr_fd_fault = open(CLKERR_FLT_SYSFS, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_clock.c:136: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). clkerr_fd_refresh = open(CLKERR_RFS_SYSFS, O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_clock.c:144:28: [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). clkerr_fd_reset = open(CLKERR_RST_SYSFS, O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_clock.c:215:29: [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). ocxodac_fd_value = open(OCXODAC_VAL_SYSFS, O_RDWR); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_clock.c:223:28: [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). ocxodac_fd_save = open(OCXODAC_ROM_SYSFS, O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_led.c:71: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). if ((fd = open(path, O_WRONLY)) == -1) data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_led.c:246: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 str[1024]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_nl.c:80: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, val, len); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_nl.c:91:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char mac_str[20] = {0, }; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_nl.c:92: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. static char model_name[64] = {0, }; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_nl.c:93: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. static char ser_str[20] = {0, }; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_nl.c:97: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 loc_ip[INET_ADDRSTRLEN]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_nl.c:109: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_eth = open(ETH0_ADDR_SYSFS, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_nl.c:155: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 src[INET_ADDRSTRLEN]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c:402:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). limit->thresh_warn_min = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c:411:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). limit->thresh_crit_min = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c:420:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). limit->thresh_warn_max = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c:429:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). limit->thresh_crit_max = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c:438:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). limit->thresh_warn_max = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c:447:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). limit->thresh_crit_max = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c:757:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int pattern_id = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c:773: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). int state = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c:789:31: [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). s_mgr->temp.limit.variable = atoi(argv[0]); \ data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c:827:31: [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). s_mgr->volt.limit.variable = atoi(argv[0]); \ data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c:842:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). s_mgr->pwr.limit.variable = atoi(argv[0]); \ data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c:859:31: [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). s_mgr->vswr.limit.variable = atoi(argv[0]); \ data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_vty.c:874:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). s_mgr->gps.limit.variable = atoi(argv[0]); \ data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_misc.c:351: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 *fw_sysfs[_NUM_FW] = { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_misc.c:364: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). fd = open(fw_sysfs[type], O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_nl.c:55: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[1024]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_nl.c:79: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(RTA_DATA(rta), dest, sizeof(*dest)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_nl.c:116: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(loc_source, RTA_DATA(rta), RTA_PAYLOAD(rta)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_par.c:105:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fpath, mode); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_par.c:187: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 fpath[PATH_MAX]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_par.c:194:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fpath, "r"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_par.c:211: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 fpath[PATH_MAX]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_par.c:218:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fpath, "w"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c:36: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 *power_enable_devs[_NUM_POWER_SOURCES] = { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.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. static const char *power_sensor_devs[_NUM_POWER_SOURCES] = { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c:47: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 *power_sensor_type_str[_NUM_POWER_TYPES] = { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c:58: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[PATH_MAX]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c:59:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pwrstr[10]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c:71: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(buf, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c:86:11: [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). *power = atoi(pwrstr); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c:103: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(PA_SUPPLY_MAX_SYSFS, O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c:114: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(PA_SUPPLY_MIN_SYSFS, O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c:127: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(power_enable_devs[source], O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c:149: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 enstr[10]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c:151: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(power_enable_devs[source], O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c:176: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 *vswr_devs[_NUM_VSWR_SENSORS] = { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c:183: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[PATH_MAX]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c:184: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 vswrstr[8]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c:193: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(buf, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c:208: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). *vswr = atoi(vswrstr); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_temp.c:32: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 *temp_devs[_NUM_TEMP_SENSORS] = { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_temp.c:46: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[PATH_MAX]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_temp.c:47: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 tempstr[8]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_temp.c:56: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(buf, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_temp.c:71: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). *temp = atoi(tempstr); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_util.c:146:48: [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). rc = lc15bts_par_set_int(tall_util_ctx, par, atoi(write_arg)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_util.c:152:4: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). atoi(write_arg)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/oml.c:1404: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(cfgr->cfgParams.setCipheringParams.u8Kc, data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/tch.c:69: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(cur, l1_payload, GSM_FR_BYTES); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/tch.c:86: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(l1_payload, rtp_payload, GSM_FR_BYTES); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/tch.c:103: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(cur, l1_payload, GSM_EFR_BYTES); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/tch.c:117: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(l1_payload, rtp_payload, payload_len); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/tch.c:139: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(cur, l1_payload, GSM_HR_BYTES); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/tch.c:162: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(l1_payload, rtp_payload, GSM_HR_BYTES); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/tch.c:179: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(cur, l1_payload+2, amr_if2_len); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/tch.c:203: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(l1_payload, rtp_payload, payload_len); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/tch.c:455: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(sid_first, payload, payload_len); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/calib_file.c:122: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 fname[PATH_MAX]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/calib_file.c:134: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). st->fp = fopen(fname, "rb"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/hw_misc.c:66: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("/var/oc2g/leds/led0/brightness", O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/hw_misc.c:77: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("/var/oc2g/leds/led1/brightness", O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/l1_if.c:454:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/l1_if.c:471: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(lchan->tch.dtx.facch, msg->l2h, data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/l1_if.c:501:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/l1_if.c:972: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(msu_param->u8Buffer, fill_frame, GSM_MACBLOCK_LEN); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/l1_if.c:1706:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(alarm_sig_data.spare, &sys_prim->id, sizeof(unsigned int)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/l1_transp_hw.c:252: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 buf[PATH_MAX]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/l1_transp_hw.c:262: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). rc = open(buf, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/l1_transp_hw.c:283:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). rc = open(buf, O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/main.c:57: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 tmp[PATH_MAX+1]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/main.c:62:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). outf = fopen(tmp, "w"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_bid.c:83:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(BOARD_REV_MAJ_SYSFS, "r"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_bid.c:95:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(BOARD_REV_MIN_SYSFS, "r"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_bid.c:112: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. static char model_name[64] = {0, }; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_bid.c:136:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(BOARD_OPT_SYSFS, "r"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_bts.c:55: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 str[64] = "\0"; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_bts.c:59:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen("/var/run/osmo-bts/state", "r")) == NULL) { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_clock.c:56: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 szVal[32] = {0}; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_clock.c:76: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 szVal[32] = {0}; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_clock.c:78: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. n = sprintf(szVal, "%d", val); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_clock.c:105: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). clkerr_fd_err = open(CLKERR_ERR_SYSFS, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_clock.c:113: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). clkerr_fd_accuracy = open(CLKERR_ACC_SYSFS, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_clock.c:121: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). clkerr_fd_interval = open(CLKERR_INT_SYSFS, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_clock.c:129:21: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). clkerr_fd_fault = open(CLKERR_FLT_SYSFS, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_clock.c:137: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). clkerr_fd_refresh = open(CLKERR_RFS_SYSFS, O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_clock.c:145:28: [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). clkerr_fd_reset = open(CLKERR_RST_SYSFS, O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_clock.c:216:29: [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). ocxodac_fd_value = open(OCXODAC_VAL_SYSFS, O_RDWR); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_clock.c:224:28: [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). ocxodac_fd_save = open(OCXODAC_ROM_SYSFS, O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_led.c:70: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). if ((fd = open(path, O_WRONLY)) == -1) data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_led.c:245: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 str[1024]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c:92:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fpath, "r"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c:122:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fpath, "w"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c:621: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). int cause = atoi(cmd->reply); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_nl.c:80: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, val, len); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_nl.c:91:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char mac_str[20] = {0, }; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_nl.c:92: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. static char model_name[64] = {0, }; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_nl.c:93: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. static char ser_str[20] = {0, }; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_nl.c:97: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 loc_ip[INET_ADDRSTRLEN]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_nl.c:111: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_eth = open(ETH0_ADDR_SYSFS, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_nl.c:168: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 src[INET_ADDRSTRLEN]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c:366:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). limit->thresh_warn_min = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c:375:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). limit->thresh_crit_min = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c:384:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). limit->thresh_warn_max = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c:393:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). limit->thresh_crit_max = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c:402:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). limit->thresh_warn_max = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c:411:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). limit->thresh_crit_max = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c:667:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int pattern_id = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c:683: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). int state = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c:699:31: [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). s_mgr->temp.limit.variable = atoi(argv[0]); \ data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c:731:31: [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). s_mgr->volt.limit.variable = atoi(argv[0]); \ data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c:746:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). s_mgr->pwr.limit.variable = atoi(argv[0]); \ data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c:761:31: [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). s_mgr->vswr.limit.variable = atoi(argv[0]); \ data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_vty.c:774:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). s_mgr->gps.limit.variable = atoi(argv[0]); \ data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_misc.c:351: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 *fw_sysfs[_NUM_FW] = { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_misc.c:362: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). fd = open(fw_sysfs[type], O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_nl.c:55: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[1024]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_nl.c:79: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(RTA_DATA(rta), dest, sizeof(*dest)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_nl.c:116: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(loc_source, RTA_DATA(rta), RTA_PAYLOAD(rta)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_par.c:97:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fpath, mode); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_par.c:108: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 fpath[PATH_MAX]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_par.c:118:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fpath, "r"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_par.c:134: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 fpath[PATH_MAX]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_par.c:144:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fpath, "w"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_par.c:162: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 fpath[PATH_MAX]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_par.c:172:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fpath, "rb"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_par.c:187: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 fpath[PATH_MAX]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_par.c:197:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fpath, "wb"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.c:31: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 *power_enable_devs[_NUM_POWER_SOURCES] = { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.c:35: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 *power_sensor_devs[_NUM_POWER_SOURCES] = { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.c:40: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 *power_sensor_type_str[_NUM_POWER_TYPES] = { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.c:51: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[PATH_MAX]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.c:52: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 pwrstr[10]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.c:64: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(buf, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.c:79:11: [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). *power = atoi(pwrstr); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.c:95: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(power_enable_devs[source], O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.c:117: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 enstr[10]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.c:119: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(power_enable_devs[source], O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.c:144: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 *vswr_devs[_NUM_VSWR_SENSORS] = { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.c:150: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[PATH_MAX]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.c:151: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 vswrstr[8]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.c:160: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(buf, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.c:175: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). *vswr = atoi(vswrstr); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_temp.c:32: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 *temp_devs[_NUM_TEMP_SENSORS] = { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_temp.c:44: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[PATH_MAX]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_temp.c:45: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 tempstr[8]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_temp.c:54: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(buf, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_temp.c:69: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). *temp = atoi(tempstr); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_util.c:140:33: [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). rc = oc2gbts_par_set_int(par, atoi(write_arg)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_util.c:146:4: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). atoi(write_arg)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:141: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). int trx_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:175: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). int phy_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:193: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). int phy_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:213: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). int phy_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:214: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). int inst_nr = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:261: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). int trx_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:262: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). int ts_nr = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:263:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int lchan_nr = atoi(argv[3]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:283: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). int trx_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:284: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). int power = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:299: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). int trx_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:300: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). int ts_nr = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:301:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int lchan_nr = atoi(argv[2]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:318: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). int trx_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:319: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). int ts_nr = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:320:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int lchan_nr = atoi(argv[2]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:335:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int nominal_power = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:355:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int cell_size = (uint8_t)atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:389:28: [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). uint8_t period = (uint8_t)atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:422:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int val = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:439:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int val = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:470:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). trx_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:480:11: [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). ts_nr = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oc2gbts_vty.c:490: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). lchan_nr = atoi(argv[2]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oml.c:1521: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(cfgr->cfgParams.setCipheringParams.u8Kc, data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/tch.c:69: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(cur, l1_payload, GSM_FR_BYTES); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/tch.c:86: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(l1_payload, rtp_payload, GSM_FR_BYTES); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/tch.c:103: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(cur, l1_payload, GSM_EFR_BYTES); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/tch.c:117: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(l1_payload, rtp_payload, payload_len); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/tch.c:139: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(cur, l1_payload, GSM_HR_BYTES); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/tch.c:162: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(l1_payload, rtp_payload, GSM_HR_BYTES); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/tch.c:179: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(cur, l1_payload+2, amr_if2_len); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/tch.c:203: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(l1_payload, rtp_payload, payload_len); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/tch.c:467: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(sid_first, payload, payload_len); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/l1_if.c:555: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(data_req->Data.abyDataContent, msg->l2h, msgb_l2len(msg)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/l1_if.c:1097: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(data_req->Data.abyDataContent, fill_frame, data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/l1_if.c:1825: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(fl1h->phy_addr.sll_addr, plink->u.octphy.phy_addr.sll_addr, data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/l1_oml.c:556: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(pcc->Config.abyKey, lchan->encr.key, lchan->encr.key_len); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/l1_oml.c:1167: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 ver_hdr[32]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/l1_tch.c:96: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(cur, l1_payload, GSM_HR_BYTES); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/l1_tch.c:120: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(l1_payload, rtp_payload, GSM_HR_BYTES); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/octphy_vty.c:115: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). plink->u.octphy.rf_port_index = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/octphy_vty.c:133:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). plink->u.octphy.rx_ant_id = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/octphy_vty.c:150:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). plink->u.octphy.tx_ant_id = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/octphy_vty.c:169:31: [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). plink->u.octphy.rx_gain_db = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/octphy_vty.c:191:33: [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). plink->u.octphy.tx_atten_db = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/octphy_vty.c:212:5: [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(atoi(argv[0])) data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/octphy_vty.c:273: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). int phy_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/octphy_vty.c:280:51: [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). octphy_hw_get_rf_port_stats(plink->u.octphy.hdl, atoi(argv[1]), data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/octphy_vty.c:352: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). int phy_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/octphy_vty.c:418: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). int phy_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-omldummy/main.c:18: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). int site_id = atoi(argv[2]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/calib_file.c:216: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 fname[PATH_MAX]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/calib_file.c:222: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). in = fopen(fname, "r"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/eeprom.c:227:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char szSn[16]; ///< Serial number data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/eeprom.c:308:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char szSn[16]; ///< Serial number data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/eeprom.c:384: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 szSn[16]; ///< System serial number data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/eeprom.c:385: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 szPartNum[20]; ///< System part number data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/eeprom.c:521: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( (void *)pSysInfo->szSn, ee.cfg.v1.sysInfo.szSn, sizeof(pSysInfo->szSn) ); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/eeprom.c:1628:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen( EEPROM_DEV, "r+" ); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/eeprom.c:1697:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen( EEPROM_DEV, "r+" ); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/eeprom.c:1761:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen( EEPROM_DEV, "r+" ); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/eeprom.h:67:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char szSn[16]; ///< Serial number data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/hw_misc.c:45: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 tmp[PATH_MAX+1]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/hw_misc.c:62: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(tmp, O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/hw_misc.c:80: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 tmp[PATH_MAX+1]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/hw_misc.c:88: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). temperature_f[i] = fopen(tmp, "r"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/hw_misc.c:105: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). in = fopen(tmp, "r"); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/l1_if.c:407:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/l1_if.c:424: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(lchan->tch.dtx.facch, msg->l2h, data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/l1_if.c:454:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, msg->l2h, data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/l1_if.c:917: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(msu_param->u8Buffer, fill_frame, GSM_MACBLOCK_LEN); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/l1_if.c:1024: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(sap_msg->l2h, data_ind->msgUnitParam.u8Buffer, data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/l1_transp_hw.c:268: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). rc = open(rd_devnames[q], O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/l1_transp_hw.c:286: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). rc = open(wr_devnames[q], O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts-calib.c:203: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). cal_arfcn = atoi(optarg); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts-calib.c:206:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). initial_cor = atoi(optarg); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts-calib.c:209:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). steps = atoi(optarg); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts-layer1.c:58: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). sys_dsp2arm = open(BTS_DSP2ARM, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts-layer1.c:64: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). sys_arm2dsp = open(BTS_ARM2DSP, O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts-layer1.c:70: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). sig_dsp2arm = open(L1_SIG_DSP2ARM, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts-layer1.c:76: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). sig_arm2dsp = open(L1_SIG_ARM2DSP, O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts-layer1.c:745: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(data, prim.u.phDataInd.msgUnitParam.u8Buffer, *size); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr_calib.c:354: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). cal_err_int = atoi(cal_err); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr_nl.c:72: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, val, len); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr_nl.c:83: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. static char mac_str[20] = {0, }; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr_nl.c:85: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. static char ser_str[20] = {0, }; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr_nl.c:89: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 loc_ip[INET_ADDRSTRLEN]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr_nl.c:146: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 src[INET_ADDRSTRLEN]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c:240: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). limit->thresh_warn = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c:249: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). limit->thresh_crit = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_misc.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. static const char *temp_type_str[_NUM_TEMP_TYPES] = { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_misc.c:60: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[PATH_MAX]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_misc.c:61: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 tempstr[8]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_misc.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(buf, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_misc.c:91: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(tempstr); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_misc.c:213: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 *fw_names[_NUM_FW] = { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_misc.c:217: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 *fw_devs[_NUM_FW] = { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_misc.c:224: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 name[PATH_MAX]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_misc.c:235: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_in = open(name, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_misc.c:242: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). fd_out = open(fw_devs[type], O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_nl.c:52: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[1024]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_nl.c:76: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(RTA_DATA(rta), dest, sizeof(*dest)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_nl.c:113:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(loc_source, RTA_DATA(rta), RTA_PAYLOAD(rta)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_par.c:74: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). fd = open(EEPROM_PATH, O_RDONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_par.c:95: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(&g_ee.ee, ee, sizeof(*ee)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_par.c:97: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(EEPROM_PATH, O_WRONLY); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_par.c:263: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, ptr, len); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_par.c:297: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(ptr, buf, size); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_util.c:112: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). net_mode = atoi(optarg); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_util.c:238: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). rc = sysmobts_par_set_int(par, atoi(write_arg)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_util.c:244:4: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). atoi(write_arg)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/oml.c:1426: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(cfgr->cfgParams.setCipheringParams.u8Kc, data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_ctrl.c:242:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). fl1h->clk_cal = atoi(cmd->value); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:94:24: [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). unsigned int clkcal = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:107: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). int clkcal = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:158:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). trx->bts->ul_power_target = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:170: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). trx->nominal_power = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:205: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). int phy_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:222: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). int trx_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:256: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). int phy_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:274: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). int phy_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:294: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). int phy_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:295: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). int inst_nr = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:340: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). int trx_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:341: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). int ts_nr = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:342:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int lchan_nr = atoi(argv[3]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:361: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). int trx_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:362: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). int power = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:375: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). int trx_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:388: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). int trx_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:403: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). int trx_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:404: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). int ts_nr = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:405:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int lchan_nr = atoi(argv[2]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:422: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). int trx_nr = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:423: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). int ts_nr = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/sysmobts_vty.c:424:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int lchan_nr = atoi(argv[2]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/tch.c:67: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(cur, l1_payload, GSM_FR_BYTES); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/tch.c:96: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(l1_payload, rtp_payload, GSM_FR_BYTES); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/tch.c:122: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(cur, l1_payload, GSM_EFR_BYTES); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/tch.c:150: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(l1_payload, rtp_payload, payload_len); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/tch.c:218: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(cur, l1_payload, GSM_HR_BYTES); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/tch.c:220: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(cur, l1_payload, GSM_HR_BYTES); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/tch.c:251: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(l1_payload, rtp_payload, GSM_HR_BYTES); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/tch.c:253: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(l1_payload, rtp_payload, GSM_HR_BYTES); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/tch.c:277: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(cur, l1_payload+2, amr_if2_len); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/tch.c:334: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(l1_payload, rtp_payload, payload_len); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/tch.c:604: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(sid_first, payload, payload_len); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:134: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(bits + 3, burst, 39); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:135: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(bits + 42, _sched_sch_train, 64); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:136: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(bits + 106, burst + 39, 39); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:223: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(bits + 3, burst, 58); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:224: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(bits + 61, _sched_tsc[gsm_ts_tsc(ts)], 26); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:225: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(bits + 87, burst + 58, 58); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:307: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(bits + 9, burst, 174); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:308: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(bits + 183, _sched_egprs_tsc[gsm_ts_tsc(ts)], 78); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:309: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(bits + 261, burst + 174, 174); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:317: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(bits + 3, burst, 58); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:318: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(bits + 61, _sched_tsc[gsm_ts_tsc(ts)], 26); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:319: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(bits + 87, burst + 58, 58); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:562: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(*bursts_p, *bursts_p + 464, 464); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:598: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(bits + 3, burst, 58); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:599: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(bits + 61, _sched_tsc[gsm_ts_tsc(ts)], 26); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:600: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(bits + 87, burst + 58, 58); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:650: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(*bursts_p, *bursts_p + 232, 232); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:652:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*bursts_p + 232, *bursts_p + 464, 232); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:693: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(bits + 3, burst, 58); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:694: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(bits + 61, _sched_tsc[gsm_ts_tsc(ts)], 26); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:695: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(bits + 87, burst + 58, 58); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:740: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. static const char synch_seq_ref[RACH_SYNCH_SEQ_NUM][RACH_SYNCH_SEQ_LEN] = { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:952: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(burst, bi->burst + 3, 58); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:953: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(burst + 58, bi->burst + 87, 58); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:1070: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(burst, bi->burst + 9, 174); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:1071: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(burst + 174, bi->burst + 261, 174); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:1075: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(burst, bi->burst + 3, 58); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:1076: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(burst + 58, bi->burst + 87, 58); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:1177: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(burst, bi->burst + 3, 58); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:1178: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(burst + 58, bi->burst + 87, 58); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:1231: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(*bursts_p, *bursts_p + 464, 464); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:1379: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(burst, bi->burst + 3, 58); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:1380: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(burst + 58, bi->burst + 87, 58); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:1397: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(*bursts_p, *bursts_p + 232, 232); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:1398: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(*bursts_p + 232, *bursts_p + 464, 232); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:1443: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(*bursts_p, *bursts_p + 232, 232); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:1444: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(*bursts_p + 232, *bursts_p + 464, 232); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_if.c:96: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[1500]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_if.c:149: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[1500]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_if.c:379: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 cmd[50]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_if.c:380: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 params[100]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_if.c:582: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[1500]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_if.c:825: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. static char buf[256]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_if.c:1103: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 + 6, bits, nbits); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_if.h:8: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 cmd[28]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_if.h:9: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 params[100]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_vty.c:170:29: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). vty_bts->ul_power_target = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_vty.c:220: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). l1h->config.maxdly = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_vty.c:246:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). l1h->config.maxdlynb = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_vty.c:301:35: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). plink->u.osmotrx.clock_advance = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_vty.c:315:33: [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). plink->u.osmotrx.rts_advance = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_vty.c:329: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). l1h->config.rxgain = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_vty.c:346:22: [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). l1h->config.power = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_vty.c:462:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). plink->u.osmotrx.base_port_local = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_vty.c:464:39: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). plink->u.osmotrx.base_port_remote = atoi(argv[1]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_vty.c:505: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). max_ver = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-virtual/scheduler_virtbts.c:51: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. static char buf[256]; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-virtual/virtualbts_vty.c:118:32: [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). plink->u.virt.ms_mcast_port = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-virtual/virtualbts_vty.c:152:33: [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). plink->u.virt.bts_mcast_port = atoi(argv[0]); data/osmo-bts-1.2.1+dfsg1/tests/agch/agch_test.c:60:24: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 gsm_a_ccch_data[23] = { data/osmo-bts-1.2.1+dfsg1/tests/agch/agch_test.c:82:24: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 gsm_a_ccch_data[23] = { data/osmo-bts-1.2.1+dfsg1/tests/misc/misc_test.c:63: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(msg->l1h, ipa_rsl_connect, sizeof(ipa_rsl_connect)); data/osmo-bts-1.2.1+dfsg1/tests/misc/misc_test.c:72: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(msg->l1h, ipa_rsl_connect, size); data/osmo-bts-1.2.1+dfsg1/tests/misc/misc_test.c:81: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(msg->l1h, ipa_rsl_connect, sizeof(ipa_rsl_connect)); data/osmo-bts-1.2.1+dfsg1/tests/misc/misc_test.c:95: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(msg->l2h, data, len); data/osmo-bts-1.2.1+dfsg1/tests/paging/paging_test.c:136: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(&bts.si_buf[SYSINFO_TYPE_3][0], &si3, sizeof(si3)); data/osmo-bts-1.2.1+dfsg1/tests/sysmobts/sysmobts_test.c:156: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(msgb_put(msg, ARRAY_SIZE(cipher_cmd)), cipher_cmd, ARRAY_SIZE(cipher_cmd)); data/osmo-bts-1.2.1+dfsg1/tests/sysmobts/sysmobts_test.c:167: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(&unit.u8Buffer[0], too_early_classmark, ARRAY_SIZE(too_early_classmark)); data/osmo-bts-1.2.1+dfsg1/tests/sysmobts/sysmobts_test.c:174: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(&unit.u8Buffer[0], first_ciphered_cipher_cmpl, ARRAY_SIZE(first_ciphered_cipher_cmpl)); data/osmo-bts-1.2.1+dfsg1/contrib/eeprom_reader.c:42:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, buf, STEP); data/osmo-bts-1.2.1+dfsg1/src/common/oml.c:164: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(bts->sub_model)) { data/osmo-bts-1.2.1+dfsg1/src/common/oml.c:192: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). phy_version = pinst && strlen(pinst->version) ? pinst->version : "Unknown"; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_clock.c:60:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, szVal, sizeof(szVal) - 1); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_clock.c:93: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). rc = write(fd, str, strlen(str)+1); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_led.c:76: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). write(fd, str, strlen(str)+1); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_nl.c:111:4: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd_eth, mac_str, sizeof(mac_str)-1); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_nl.c:120:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(model_name, get_hwversion_desc(), sizeof(model_name)-1); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_nl.c:132: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). quirk_l16tv_put(msg, strlen(mac_str) + 1, IPAC_IDTAG_MACADDR, (uint8_t *) mac_str); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_nl.c:136: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). quirk_l16tv_put(msg, strlen(loc_ip) + 1, IPAC_IDTAG_IPADDR, (uint8_t *) loc_ip); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_nl.c:139: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). quirk_l16tv_put(msg, strlen(ser_str) + 1, IPAC_IDTAG_SERNR, (uint8_t *) ser_str); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_mgr_nl.c:142: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). quirk_l16tv_put(msg, strlen(model_name) + 1, IPAC_IDTAG_UNIT, (uint8_t *) model_name); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c:75:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, pwrstr, sizeof(pwrstr)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c:138:10: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. if (en) usleep(50*1000); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c:156:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, enstr, sizeof(enstr)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_power.c:197:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, vswrstr, sizeof(vswrstr)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/misc/lc15bts_temp.c:60:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, tempstr, sizeof(tempstr)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-litecell15/oml_router.h:13:100: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int oml_router_init(struct gsm_bts *bts, const char *path, struct osmo_fd *accept, struct osmo_fd *read); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_clock.c:60:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, szVal, sizeof(szVal) - 1); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_clock.c:93: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). rc = write(fd, str, strlen(str)+1); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_led.c:75: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). write(fd, str, strlen(str)+1); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_nl.c:113:4: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd_eth, mac_str, sizeof(mac_str)-1); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_nl.c:145: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). quirk_l16tv_put(msg, strlen(mac_str) + 1, IPAC_IDTAG_MACADDR, (uint8_t *) mac_str); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_nl.c:149: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). quirk_l16tv_put(msg, strlen(loc_ip) + 1, IPAC_IDTAG_IPADDR, (uint8_t *) loc_ip); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_nl.c:152: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). quirk_l16tv_put(msg, strlen(ser_str) + 1, IPAC_IDTAG_SERNR, (uint8_t *) ser_str); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_mgr_nl.c:155: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). quirk_l16tv_put(msg, strlen(model_name) + 1, IPAC_IDTAG_UNIT, (uint8_t *) model_name); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.c:68:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, pwrstr, sizeof(pwrstr)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.c:106:10: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. if (en) usleep(50*1000); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.c:124:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, enstr, sizeof(enstr)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_power.c:164:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, vswrstr, sizeof(vswrstr)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/misc/oc2gbts_temp.c:58:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, tempstr, sizeof(tempstr)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-oc2g/oml_router.h:13:100: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int oml_router_init(struct gsm_bts *bts, const char *path, struct osmo_fd *accept, struct osmo_fd *read); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/l1_if.c:1806:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifr.ifr_name, phy_dev, sizeof(ifr.ifr_name)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/l1_oml.c:1204: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). OSMO_ASSERT(strlen(ver_hdr) < sizeof(pinst->version)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/l1_oml.c:1205: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). osmo_strlcpy(pinst->version, ver_hdr, strlen(ver_hdr)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-octphy/octpkt.c:138:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifr.ifr_name, bind_dev, sizeof(ifr.ifr_name)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/l1_transp_fwd.c:75:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(ofd->fd, msg->l1h, msgb_tailroom(msg)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts-layer1.c:100:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int rc = read(sys_dsp2arm, prim, sizeof(*prim)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts-layer1.c:176:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(sig_dsp2arm, prim, sizeof(*prim)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts-layer1.c:211:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(sig_dsp2arm, prim, sizeof(*prim)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts-layer1.c:777:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(sys_dsp2arm, &prim, sizeof(prim)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts-layer1.c:785:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(sig_dsp2arm, &prim, sizeof(prim)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr_2050.c:71:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, msg->tail, numbytes - bread); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr_nl.c:123: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). quirk_l16tv_put(msg, strlen(mac_str) + 1, IPAC_IDTAG_MACADDR, (uint8_t *) mac_str); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr_nl.c:127: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). quirk_l16tv_put(msg, strlen(loc_ip) + 1, IPAC_IDTAG_IPADDR, (uint8_t *) loc_ip); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr_nl.c:130: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). quirk_l16tv_put(msg, strlen(ser_str) + 1, IPAC_IDTAG_SERNR, (uint8_t *) ser_str); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_mgr_nl.c:133: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). quirk_l16tv_put(msg, strlen(model_name) + 1, IPAC_IDTAG_UNIT, (uint8_t *) model_name); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_misc.c:78:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, tempstr, sizeof(tempstr)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_misc.c:250:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((rc = read(fd_in, buf, sizeof(buf)))) { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_par.c:65:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int read; data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/misc/sysmobts_par.c:78:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fd, &g_ee.ee, sizeof(g_ee.ee)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-sysmo/oml_router.h:13:100: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int oml_router_init(struct gsm_bts *bts, const char *path, struct osmo_fd *accept, struct osmo_fd *read); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/scheduler_trx.c:1651:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(ofd->fd, (void *) &expire_count, sizeof(expire_count)); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_if.c:224: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). tcm->cmd_len = strlen(tcm->cmd); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_if.c:230: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). tcm->params_len = strlen(tcm->params); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_if.c:403:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(rsp->cmd, buf_in + 4, p - buf_in - 4); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_if.c:415: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). k = p + strlen(p); data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_if.c:417: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(k) >= sizeof(rsp->params)) { data/osmo-bts-1.2.1+dfsg1/src/osmo-bts-trx/trx_if.c:419: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(k), sizeof(rsp->params)); ANALYSIS SUMMARY: Hits = 637 Lines analyzed = 79612 in approximately 2.25 seconds (35324 lines/second) Physical Source Lines of Code (SLOC) = 59645 Hits@level = [0] 458 [1] 59 [2] 532 [3] 17 [4] 29 [5] 0 Hits@level+ = [0+] 1095 [1+] 637 [2+] 578 [3+] 46 [4+] 29 [5+] 0 Hits/KSLOC@level+ = [0+] 18.3586 [1+] 10.6799 [2+] 9.69067 [3+] 0.77123 [4+] 0.48621 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.