Update FSFW from upstream #71

Closed
muellerr wants to merge 1112 commits from development into eive/develop
4 changed files with 9 additions and 4 deletions
Showing only changes of commit 0981ee6f7e - Show all commits

View File

@ -5,6 +5,8 @@
class ReadablePacketIF {
public:
virtual ~ReadablePacketIF() = default;
/**
* This method returns a raw uint8_t pointer to the readable data
*/

View File

@ -6,8 +6,9 @@
class RawUserDataReaderIF {
public:
virtual const uint8_t* getUserData() const = 0;
virtual size_t getUserDataLen() const = 0;
~RawUserDataReaderIF() = default;
[[nodiscard]] virtual const uint8_t* getUserData() const = 0;
[[nodiscard]] virtual size_t getUserDataLen() const = 0;
};
#endif // FSFW_TMTCPACKET_RAWDATAIF_H

View File

@ -23,7 +23,9 @@ ReturnValue_t PusTcReader::parseData(bool withCrc) {
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
if (spReader.getBufSize() < PusTcIF::MIN_SIZE) {
// We already have access to the space packet fields here, so we can perform a sanity check
// on the length field
if (spReader.getFullPacketLen() < spReader.getBufSize()) {
return SerializeIF::STREAM_TOO_SHORT;
}

View File

@ -57,7 +57,7 @@ ReturnValue_t PusTmReader::parseData(bool crcCheck) {
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
if (spReader.getBufSize() < PusTmIF::MIN_SIZE) {
if (spReader.getFullPacketLen() < spReader.getBufSize()) {
return SerializeIF::STREAM_TOO_SHORT;
}