minor changes, virtual dtors added
fsfw/fsfw/pipeline/pr-development There was a failure building this commit Details

This commit is contained in:
Robin Müller 2022-07-21 18:17:37 +02:00
parent 61bc867bed
commit 0981ee6f7e
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
4 changed files with 9 additions and 4 deletions

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;
}