[hamradio-commits] [gnss-sdr] 97/126: fix defect detected by coverity scan: rinex observables are printed if both GPS and Galileo observables are available. This avoids dereferencing an iterator though it is already past the end of its container (in case only one of them were available)
Carles Fernandez
carles_fernandez-guest at moszumanska.debian.org
Sat Dec 26 18:38:06 UTC 2015
This is an automated email from the git hooks/post-receive script.
carles_fernandez-guest pushed a commit to branch next
in repository gnss-sdr.
commit 450728dfeb49f722a9825f03397773ee59d50809
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date: Tue Dec 8 21:10:17 2015 +0100
fix defect detected by coverity scan: rinex observables are printed if
both GPS and Galileo observables are available. This avoids
dereferencing an iterator though it is already past the end of its
container (in case only one of them were available)
---
src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc
index d910c5d..d043d86 100644
--- a/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc
+++ b/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc
@@ -316,7 +316,7 @@ int hybrid_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin();
std::map<int, Gps_Ephemeris>::iterator gps_ephemeris_iter;
gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin();
- if ((galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) || (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) )
+ if ((galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) && (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) )
{
rp->log_rinex_obs(rp->obsFile, gps_ephemeris_iter->second, galileo_ephemeris_iter->second, d_rx_time, gnss_pseudoranges_map);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git
More information about the pkg-hamradio-commits
mailing list