From 3ba6fea7105870752e8e94a369dd3ba7485eff94 Mon Sep 17 00:00:00 2001 From: Vladimir Zidar Date: Fri, 9 Feb 2018 12:58:43 +0100 Subject: [PATCH] LP-545 ubx null ptr dereference fix --- flight/modules/GPS/ubx_autoconfig.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flight/modules/GPS/ubx_autoconfig.c b/flight/modules/GPS/ubx_autoconfig.c index b1dee67ad..1f692b6d1 100644 --- a/flight/modules/GPS/ubx_autoconfig.c +++ b/flight/modules/GPS/ubx_autoconfig.c @@ -243,7 +243,9 @@ void gps_ubx_reset_sensor_type() ubxSensorType = GPSPOSITIONSENSOR_SENSORTYPE_UNKNOWN; GPSPositionSensorSensorTypeSet(&ubxSensorType); // make the sensor type / autobaud code time out immediately to send the request immediately - status->lastStepTimestampRaw += 0x8000000UL; + if (status) { + status->lastStepTimestampRaw += 0x8000000UL; + } } --mutex; }