From dfa11ab36400a56ebc4b12e5ce267bdc6143a328 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 7 Jun 2017 19:41:32 +0200 Subject: [PATCH] Fix out-of-bound access --- src/algorithms/libs/rtklib/rtklib_preceph.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/algorithms/libs/rtklib/rtklib_preceph.cc b/src/algorithms/libs/rtklib/rtklib_preceph.cc index c6dec6056..2e4d73911 100644 --- a/src/algorithms/libs/rtklib/rtklib_preceph.cc +++ b/src/algorithms/libs/rtklib/rtklib_preceph.cc @@ -355,8 +355,7 @@ void readsp3(const char *file, nav_t *nav, int opt) *-----------------------------------------------------------------------------*/ int readsap(const char *file, gtime_t time, nav_t *nav) { - pcv_t aux = { 0, {}, {}, {0,0}, {0,0}, {{},{}}, {{},{}} }; - pcvs_t pcvs = {0, 0, &aux }; + pcvs_t pcvs = {0, 0, (pcv_t*){ 0 } }; pcv_t pcv0 = { 0, {}, {}, {0,0}, {0,0}, {{},{}}, {{},{}} }, *pcv; int i;