Skip to content

Commit 07871ca

Browse files
mindneverf5soh
authored andcommitted
Merged in mindnever/librepilot/LP-545_ubx_null_ptr_dereference_fix (pull request #513)
LP-545 ubx null ptr dereference fix Approved-by: Vladimir Zidar <mr_w@mindnever.org> Approved-by: Jan NIJS <dr.oblivium@gmail.com> Approved-by: Philippe Renon <philippe_renon@yahoo.fr> Approved-by: Lalanne Laurent <f5soh@free.fr>
2 parents 2f075df + 3ba6fea commit 07871ca

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)