1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 20:20:35 +00:00

Fix out-of-bound read

This commit is contained in:
Carles Fernandez 2017-06-07 20:12:49 +02:00
parent 25508cf833
commit ed041c00b8

View File

@ -187,7 +187,7 @@ int decode_sbstype6(const sbsmsg_t *msg, sbssat_t *sbssat)
} }
for (i = 0; i < sbssat->nsat && i < MAXSAT; i++) for (i = 0; i < sbssat->nsat && 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); udre = getbitu(msg->msg, 22+i*4, 4);
sbssat->sat[i].fcorr.udre = udre+1; sbssat->sat[i].fcorr.udre = udre+1;
} }