Index: NVDataMgmt.c =================================================================== diff -u -r68e2d83acc5a4a88c9d70cf2325372b9f6352be3 -reb48e9434b0c09abbd39c805cbffd9ea97025b95 --- NVDataMgmt.c (.../NVDataMgmt.c) (revision 68e2d83acc5a4a88c9d70cf2325372b9f6352be3) +++ NVDataMgmt.c (.../NVDataMgmt.c) (revision eb48e9434b0c09abbd39c805cbffd9ea97025b95) @@ -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 );