try to protect against malformated messages

git-svn-id: https://svn.fhem.de/fhem/trunk@3515 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme1968
2013-07-28 09:00:56 +00:00
parent 7778be540f
commit b210726012

View File

@@ -693,6 +693,8 @@ SWAP_Parse($$)
{
my ($hash, $msg) = @_;
return undef if( $msg !~ m/^[\dA-F]{12,}$/ );
my $dest = substr($msg, 0, 2);
my $src = substr($msg, 2, 2);
my $hop = substr($msg, 4, 1);