Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing length_max check at in SIGNALduino_Maverick #348

Open
sidey79 opened this issue Nov 11, 2018 · 2 comments
Open

Missing length_max check at in SIGNALduino_Maverick #348

sidey79 opened this issue Nov 11, 2018 · 2 comments
Labels

Comments

@sidey79
Copy link
Contributor

sidey79 commented Nov 11, 2018

Expected Behavior

length_max is checked in sub SIGNALduino_Maverick and messages containing more bits are not dispatched

Actual Behavior

length_max is not checked

Steps to Reproduce the Problem

test Data currently not available, so not setp by step guide to reproduce this

Specifications

#332

@HomeAutoUser
Copy link
Contributor

@sidey79 hier ist dito so ein schlummerndes Issues.
Ist das schon erledigt wie dieses #347 (comment) ?

@sidey79
Copy link
Contributor Author

sidey79 commented Jun 3, 2021

Leider auch noch nicht erledigt :(

sub mcBit2Maverick {
my $self = shift // carp 'Not called within an object' && return (0,'no object provided');
my $name = shift // 'anonymous';
my $bitData = shift // carp 'bitData must be perovided' && return (0,'no bitData provided');
my $id = shift // carp 'protocol ID must be provided' && return (0,'no protocolId provided');
my $mcbitnum = shift // length $bitData;
if ($bitData =~ m/(101010101001100110010101)/xms)
{ # Valid Maverick header detected
my $header_pos=$+[1];
$self->_logging( qq[lib/mcBit2Maverick, protocol detected: header_pos = $header_pos], 4 );
my $hex=lib::SD_Protocols::binStr2hexStr(substr($bitData,$header_pos,26*4));
return (1,$hex); ## Return the bits unchanged in hex
} else {
return return (-1,undef);
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants