Skip to content

Commit

Permalink
Issue #78 - Found a problem in the length detection sequence, modifie…
Browse files Browse the repository at this point in the history
…d the if statement to ensure the message length is

only checked for Aplha messages, the other types calculate thier length while decoding

Also uprev'd the version number
  • Loading branch information
Zanoroy committed Sep 7, 2017
1 parent 2c98a28 commit 5a7d9e2
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions demod_flex.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* Version 0.8.5v (08 Sep 2017)
* Modification made by Bruce Quinton ([email protected])
* - Issue #78 - Found a problem in the length detection sequence, modified the if statement to ensure the message length is
* only checked for Aplha messages, the other types calculate thier length while decoding
* Version 0.8.4v (05 Sep 2017)
* Modification made by Bruce Quinton ([email protected])
* - Found a bug in the code that was not handling multiple group messages within the same frame,
Expand Down Expand Up @@ -674,14 +678,15 @@ static void decode_phase(struct Flex * flex, char PhaseNo) {
if (is_tone_page(flex))
mw1 = mw2 = 0;

if (mw1 > 87 || mw2 > 87){
verbprintf(3, "FLEX: Invalid Offsets\n");
continue; // Invalid offsets
}

//parse_alphanumeric(flex, phaseptr, PhaseNo, mw1, mw2, j, flex_groupmessage);
if (is_alphanumeric_page(flex))
// Check if this is an alpha message
if (is_alphanumeric_page(flex)) {
if (mw1 > 87 || mw2 > 87){
verbprintf(3, "FLEX: Invalid Offsets\n");
continue; // Invalid offsets
}
parse_alphanumeric(flex, phaseptr, PhaseNo, mw1, mw2, flex_groupmessage);
}
else if (is_numeric_page(flex))
parse_numeric(flex, phaseptr, PhaseNo, j);
else if (is_tone_page(flex))
Expand Down

0 comments on commit 5a7d9e2

Please sign in to comment.