mirror of https://github.com/PentHertz/srsLTE.git
added a bound checker to bit_ref packer, and other fixes
This commit is contained in:
parent
f74efe908b
commit
94667beb00
|
@ -106,7 +106,7 @@ int bit_ref::distance_bytes() const
|
|||
|
||||
SRSASN_CODE bit_ref::pack(uint32_t val, uint32_t n_bits)
|
||||
{
|
||||
if (n_bits > 32) {
|
||||
if (n_bits >= 32) {
|
||||
srsasn_log_print(LOG_LEVEL_ERROR, "This method only supports packing up to 32 bits\n");
|
||||
return SRSASN_ERROR_ENCODE_FAIL;
|
||||
}
|
||||
|
|
|
@ -2446,7 +2446,7 @@ void rrc::apply_phy_scell_config(const asn1::rrc::scell_to_add_mod_r10_s* scell_
|
|||
srslte_cell_t scell = {};
|
||||
uint32_t earfcn = 0;
|
||||
|
||||
if (phy != nullptr) {
|
||||
if (phy == nullptr) {
|
||||
rrc_log->info("RRC not initialized. Skipping PHY config.\n");
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue