mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-15 16:19:11 +00:00
Avoid unitialized values on strange msg length.
git-svn-id: https://svn.fhem.de/fhem/trunk@1479 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
37de8f83c8
commit
0ce595af59
@ -82,6 +82,10 @@ HMS_Parse($$)
|
||||
# 012345678901234567890123456789
|
||||
# 810e047f0214a001a81f000001000000 HMS100TFK
|
||||
my $val = substr($msg, 24, 8) if(length($msg) == 32);
|
||||
if(!defined($val)) {
|
||||
Log 3, "Strange HMS message $msg";
|
||||
return "";
|
||||
}
|
||||
|
||||
my $type = "";
|
||||
foreach my $c (keys %codes) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user