mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 04:30:33 +00:00
Fix defects detected by Coverity Scan 2021.12.1: Out-of-bounds access (ARRAY_VS_SINGLETON)
callee_ptr_arith: Passing &this->d_acquisition_gnss_synchro->System to function basic_string which uses it as an array. This might corrupt or misinterpret adjacent memory locations
This commit is contained in:
parent
48b5538269
commit
c151b03b77
@ -178,8 +178,7 @@ void Galileo_E1_Tcp_Connector_Tracking_cc::start_tracking()
|
||||
d_carrier_doppler_hz = d_acq_carrier_doppler_hz;
|
||||
d_current_prn_length_samples = d_vector_length;
|
||||
|
||||
std::string sys_ = &d_acquisition_gnss_synchro->System;
|
||||
sys = sys_.substr(0, 1);
|
||||
sys = std::string(&d_acquisition_gnss_synchro->System, 0, 1);
|
||||
|
||||
// DEBUG OUTPUT
|
||||
std::cout << "Tracking of Galileo E1 signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
||||
|
@ -263,8 +263,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_cc::start_tracking()
|
||||
d_pll_to_dll_assist_secs_Ti = 0.0;
|
||||
d_code_phase_samples = d_acq_code_phase_samples;
|
||||
|
||||
const std::string sys_ = &d_acquisition_gnss_synchro->System;
|
||||
sys = sys_.substr(0, 1);
|
||||
sys = std::string(&d_acquisition_gnss_synchro->System, 0, 1);
|
||||
d_acc_carrier_phase_initialized = false;
|
||||
|
||||
// DEBUG OUTPUT
|
||||
|
@ -263,8 +263,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_sc::start_tracking()
|
||||
d_pll_to_dll_assist_secs_Ti = 0.0;
|
||||
d_code_phase_samples = d_acq_code_phase_samples;
|
||||
|
||||
const std::string sys_ = &d_acquisition_gnss_synchro->System;
|
||||
sys = sys_.substr(0, 1);
|
||||
sys = std::string(&d_acquisition_gnss_synchro->System, 0, 1);
|
||||
d_acc_carrier_phase_initialized = false;
|
||||
|
||||
// DEBUG OUTPUT
|
||||
|
@ -205,8 +205,7 @@ void Glonass_L1_Ca_Dll_Pll_Tracking_cc::start_tracking()
|
||||
|
||||
d_code_phase_samples = d_acq_code_phase_samples;
|
||||
|
||||
const std::string sys_ = &d_acquisition_gnss_synchro->System;
|
||||
sys = sys_.substr(0, 1);
|
||||
sys = std::string(&d_acquisition_gnss_synchro->System, 0, 1);
|
||||
d_acc_carrier_phase_initialized = false;
|
||||
|
||||
// DEBUG OUTPUT
|
||||
|
@ -259,8 +259,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_cc::start_tracking()
|
||||
d_pll_to_dll_assist_secs_Ti = 0.0;
|
||||
d_code_phase_samples = d_acq_code_phase_samples;
|
||||
|
||||
const std::string sys_ = &d_acquisition_gnss_synchro->System;
|
||||
sys = sys_.substr(0, 1);
|
||||
sys = std::string(&d_acquisition_gnss_synchro->System, 0, 1);
|
||||
|
||||
// DEBUG OUTPUT
|
||||
std::cout << "Tracking of GLONASS L2 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
||||
|
@ -260,8 +260,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_sc::start_tracking()
|
||||
d_pll_to_dll_assist_secs_Ti = 0.0;
|
||||
d_code_phase_samples = d_acq_code_phase_samples;
|
||||
|
||||
const std::string sys_ = &d_acquisition_gnss_synchro->System;
|
||||
sys = sys_.substr(0, 1);
|
||||
sys = std::string(&d_acquisition_gnss_synchro->System, 0, 1);
|
||||
|
||||
// DEBUG OUTPUT
|
||||
std::cout << "Tracking of GLONASS L2 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
||||
|
@ -206,8 +206,7 @@ void Glonass_L2_Ca_Dll_Pll_Tracking_cc::start_tracking()
|
||||
|
||||
d_code_phase_samples = d_acq_code_phase_samples;
|
||||
|
||||
const std::string sys_ = &d_acquisition_gnss_synchro->System;
|
||||
sys = sys_.substr(0, 1);
|
||||
sys = std::string(&d_acquisition_gnss_synchro->System, 0, 1);
|
||||
|
||||
// DEBUG OUTPUT
|
||||
std::cout << "Tracking of GLONASS L2 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
||||
|
@ -218,8 +218,7 @@ void Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::start_tracking()
|
||||
d_pll_to_dll_assist_secs_Ti = 0.0;
|
||||
d_code_phase_samples = d_acq_code_phase_samples;
|
||||
|
||||
const std::string sys_ = &d_acquisition_gnss_synchro->System;
|
||||
sys = sys_.substr(0, 1);
|
||||
sys = std::string(&d_acquisition_gnss_synchro->System, 0, 1);
|
||||
|
||||
// DEBUG OUTPUT
|
||||
std::cout << "Tracking of GPS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
||||
|
@ -302,8 +302,7 @@ void Gps_L1_Ca_Kf_Tracking_cc::start_tracking()
|
||||
|
||||
d_code_phase_samples = d_acq_code_phase_samples;
|
||||
|
||||
std::string sys_ = &d_acquisition_gnss_synchro->System;
|
||||
sys = sys_.substr(0, 1);
|
||||
sys = std::string(&d_acquisition_gnss_synchro->System, 0, 1);
|
||||
|
||||
// DEBUG OUTPUT
|
||||
std::cout << "Tracking of GPS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
||||
|
@ -203,8 +203,7 @@ void Gps_L1_Ca_Tcp_Connector_Tracking_cc::start_tracking()
|
||||
|
||||
d_code_phase_samples = d_acq_code_phase_samples;
|
||||
|
||||
std::string sys_ = &d_acquisition_gnss_synchro->System;
|
||||
sys = sys_.substr(0, 1);
|
||||
sys = std::string(&d_acquisition_gnss_synchro->System, 0, 1);
|
||||
|
||||
// DEBUG OUTPUT
|
||||
std::cout << "Tracking of GPS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
||||
|
Loading…
Reference in New Issue
Block a user