Skip to content

mm-modem-helpers-telit: fix undefined bitshifts

Eric Caruso requested to merge ejcaruso/ModemManager:fix-shifts into master

Since this plugin uses a bitmask to represent bands, we have to be wary of shifting outside the precision of the bitmask storage type. In this case, it was possible to generate 1 << 31 in a signed integer type as an intermediate step of B3G_FLAG, which is undefined behavior (and usually results in INT_MIN, breaking comparisons with the value).

This also updates the last band to be band 32.

Bug was reported to the chromium tracker at crbug.com/1019301

Edited by Aleksander Morgado

Merge request reports

Loading