1
0
Fork 0

set badbit if stream is corrupt

This commit is contained in:
Kevin Matz 2023-05-18 14:45:38 -04:00
parent 8dc6c36e36
commit c4ab516efe
1 changed files with 1 additions and 1 deletions

View File

@ -185,7 +185,7 @@ void Pdu::iStream(Stream stream)
// abort if the remaining PDU length isn't available
if (!stream->good() || stream->available() < hd_length)
return stream->setstate(std::ios_base::failbit);
return stream->setstate(std::ios_base::badbit);
// create a stream buffer for the header and data
stream_ = Stream(new bufferstream(stream->data(), hd_length));