mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-11-04 01:03:04 +00:00 
			
		
		
		
	Fix bug in Galileo E5b generation (out of bounds read)
This commit is contained in:
		@@ -429,7 +429,7 @@ int signal_generator_c::general_work(int noutput_items __attribute__((unused)),
 | 
			
		||||
                                    // New random data bit
 | 
			
		||||
                                    current_data_bit_int_[sat] = (uniform_dist(e1) % 2) == 0 ? 1 : -1;
 | 
			
		||||
                                }
 | 
			
		||||
                            data_modulation_[sat] = current_data_bit_int_[sat] * (GALILEO_E5B_I_SECONDARY_CODE[((ms_counter_[sat] + delay_sec_[sat]) % 20)] == '0' ? 1 : -1);
 | 
			
		||||
                            data_modulation_[sat] = current_data_bit_int_[sat] * (GALILEO_E5B_I_SECONDARY_CODE[((ms_counter_[sat] + delay_sec_[sat]) % 4)] == '0' ? 1 : -1);
 | 
			
		||||
                            pilot_modulation_[sat] = (GALILEO_E5B_Q_SECONDARY_CODE[PRN_[sat] - 1][((ms_counter_[sat] + delay_sec_[sat]) % 100)] == '0' ? 1 : -1);
 | 
			
		||||
 | 
			
		||||
                            ms_counter_[sat] = ms_counter_[sat] + static_cast<int>(round(1e3 * GALILEO_E5B_CODE_PERIOD_S));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user