WMBus: add packet length check for frame type B
git-svn-id: https://svn.fhem.de/fhem/trunk@17979 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -1913,6 +1913,13 @@ sub decodeLinkLayer($$)
|
||||
# first contains the header (TL_BLOCK), L field and trailing crc
|
||||
# L field is included in crc calculation
|
||||
# each following block contains only data and trailing crc
|
||||
if (length($self->{msg}) < $self->{lfield}) {
|
||||
$self->{errormsg} = "message too short, expected " . $self->{lfield} . ", got " . length($self->{msg}) . " bytes";
|
||||
$self->{errorcode} = ERR_MSG_TOO_SHORT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
my $length = 129;
|
||||
if ($self->{lfield} < $length) {
|
||||
$length = $self->{lfield};
|
||||
|
||||
Reference in New Issue
Block a user