Skip to content

ublox: fix out-of-bounds array accesses

Ben Chan requested to merge benchan/ModemManager:modem-helpers-ublox-fix into master

This patch fixes several invalid checks like this:

array[i] && i < G_N_ELEMENTS (array)

which should instead be:

i < G_N_ELEMENTS (array) && array[i]

to avoid an out-of-bounds access of the array.

Fixes: c1aa6588

Merge request reports

Loading