Skip to content

Commit 3ba6fea

Browse files
committed
LP-545 ubx null ptr dereference fix
1 parent a4c0bcf commit 3ba6fea

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

flight/modules/GPS/ubx_autoconfig.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,9 @@ void gps_ubx_reset_sensor_type()
243243
ubxSensorType = GPSPOSITIONSENSOR_SENSORTYPE_UNKNOWN;
244244
GPSPositionSensorSensorTypeSet(&ubxSensorType);
245245
// make the sensor type / autobaud code time out immediately to send the request immediately
246-
status->lastStepTimestampRaw += 0x8000000UL;
246+
if (status) {
247+
status->lastStepTimestampRaw += 0x8000000UL;
248+
}
247249
}
248250
--mutex;
249251
}

0 commit comments

Comments
 (0)