X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2F80221Bundle%2FTLVParser.cc;h=d677de866c463ffc267b5b03582a448def7082be;hb=0003d55730b447329342161d12cf2ed23b63459e;hp=ddc3340f55455468682c80af4e3745ae0e7b41e4;hpb=609676df269b2d400b11316800fbdcb733309c8f;p=senf.git diff --git a/senf/Packets/80221Bundle/TLVParser.cc b/senf/Packets/80221Bundle/TLVParser.cc index ddc3340..d677de8 100644 --- a/senf/Packets/80221Bundle/TLVParser.cc +++ b/senf/Packets/80221Bundle/TLVParser.cc @@ -51,7 +51,9 @@ prefix_ void senf::MIHBaseTLVParser::validateType(boost::uint8_t expectedType) const { if (! check( 1 + senf::bytes(length_()) + length()) ) - throw InvalidMIHPacketException("truncated TLV.") << " Type: " << unsigned(type()); + throw InvalidMIHPacketException("truncated TLV.") << " Type: " << unsigned(type()) + << ", size:" << 1 + senf::bytes(length_()) + length() + << ", available: " << std::distance(i(), data().end()); if (type() != expectedType) throw InvalidMIHPacketException("wrong TLV type. expected ") << unsigned(expectedType) << " got " << unsigned(type()); }