Space Packet Parser CRC Check #41
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user