From 43df43ff9d35eb7c169d495abcc2ff8cfe97dbee Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 26 Sep 2021 11:05:51 +0200 Subject: [PATCH] Fix container overflow detected in ASAN mode --- src/algorithms/PVT/libs/rtklib_solver.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/algorithms/PVT/libs/rtklib_solver.cc b/src/algorithms/PVT/libs/rtklib_solver.cc index bf6fcb187..92ddc657e 100644 --- a/src/algorithms/PVT/libs/rtklib_solver.cc +++ b/src/algorithms/PVT/libs/rtklib_solver.cc @@ -902,8 +902,7 @@ bool Rtklib_Solver::get_PVT(const std::map &gnss_observables_ } } - std::vector azel; - azel.reserve(used_sats * 2); + std::vector azel(used_sats * 2); int index_aux = 0; for (auto &i : rtk_.ssat) {