Index: NVDataMgmt.c =================================================================== diff -u -rf853004049bc4701d911701e48768cd17189faea -rb395dc71fff8f0d0572f02665843bc674c15bdfa --- NVDataMgmt.c (.../NVDataMgmt.c) (revision f853004049bc4701d911701e48768cd17189faea) +++ NVDataMgmt.c (.../NVDataMgmt.c) (revision b395dc71fff8f0d0572f02665843bc674c15bdfa) @@ -1288,6 +1288,9 @@ nvDataStartPtr = (U08*)&hdCalibrationRecord.hdCalibrationGroups.accelerometerSensorCalRecord; isNVDataValid = ( 0 == hdCalibrationRecord.hdCalibrationGroups.accelerometerSensorCalRecord.calibrationTime ? FALSE : TRUE ); break; + + default: + // TODO software fault #endif #ifdef _DG_ @@ -1366,12 +1369,15 @@ nvDataStartPtr = (U08*)&dgServiceGroup.dgServiceRecord; nvDataLength = sizeof( dgServiceGroup.dgServiceRecord ); break; + + default: + // TODO software fault #endif } // Make sure the provided buffer length is >= NV Data Length in the NV data management so the memory of the other variables is not // overridden. - if ( bufferLength >= nvDataLength ) + if ( ( bufferLength >= nvDataLength ) && ( nvDataStartPtr != 0 ) ) { // Copy the data into the provided buffer memcpy( bufferAddress, nvDataStartPtr, bufferLength );