Space Packet Parser CRC Check #41

Merged
meierj merged 3 commits from meier/space-packet-crc-check into main 2024-11-15 10:21:29 +01:00
Showing only changes of commit d34db0a3be - Show all commits

View File

@ -11,12 +11,12 @@ PduHeaderReader::PduHeaderReader(const uint8_t *pduBuf, size_t maxSize) {
} }
ReturnValue_t PduHeaderReader::parseData() { ReturnValue_t PduHeaderReader::parseData() {
if (pointers.rawPtr == nullptr) {
return returnvalue::FAILED;
}
if (maxSize < 7) { if (maxSize < 7) {
return SerializeIF::STREAM_TOO_SHORT; return SerializeIF::STREAM_TOO_SHORT;
} }
if (pointers.rawPtr == nullptr) {
return returnvalue::FAILED;
}
pointers.fixedHeader = pointers.fixedHeader =
reinterpret_cast<PduHeaderFixedStruct *>(const_cast<uint8_t *>(pointers.rawPtr)); reinterpret_cast<PduHeaderFixedStruct *>(const_cast<uint8_t *>(pointers.rawPtr));
sourceIdRaw = &pointers.fixedHeader->variableFieldsStart; sourceIdRaw = &pointers.fixedHeader->variableFieldsStart;