1
0
Fork 0

validate flags on stream input

This commit is contained in:
Kevin Matz 2021-08-13 12:02:06 -04:00
parent 13651c7cf2
commit 2c304859b9
1 changed files with 8 additions and 4 deletions

View File

@ -35,11 +35,15 @@ public:
: ACN::PDU::Pdu(vector_size)
{
// RDMnet PDU flags always 0xF
flags_.hasVector = true;
flags_.hasLength = true;
flags_.hasHeader = true;
flags_.hasData = true;
flags_.set(0xF0);
}
virtual void iStream(ACN::PDU::Stream stream) override
{
ACN::PDU::Pdu::iStream(stream);
if ((uint8_t)flags_ != 0xf0)
stream_->setstate(std::ios_base::failbit);
};
};