From ed041c00b81b4f8dd1a4f424ca46f53c6dbfb75a Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 7 Jun 2017 20:12:49 +0200 Subject: [PATCH] Fix out-of-bound read --- src/algorithms/libs/rtklib/rtklib_sbas.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/algorithms/libs/rtklib/rtklib_sbas.cc b/src/algorithms/libs/rtklib/rtklib_sbas.cc index 6cddfce3c..577199268 100644 --- a/src/algorithms/libs/rtklib/rtklib_sbas.cc +++ b/src/algorithms/libs/rtklib/rtklib_sbas.cc @@ -185,9 +185,9 @@ int decode_sbstype6(const sbsmsg_t *msg, sbssat_t *sbssat) { iodf[i] = getbitu(msg->msg, 14+i*2, 2); } - for (i = 0;insat && insat && i < MAXSAT; i++) { - if (sbssat->sat[i].fcorr.iodf != iodf[i/13]) continue; + if (sbssat->sat[i].fcorr.iodf != iodf[i/22]) continue; udre = getbitu(msg->msg, 22+i*4, 4); sbssat->sat[i].fcorr.udre = udre+1; }