-
Notifications
You must be signed in to change notification settings - Fork 121
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
Repeating group decoder not cleaning reference to 'next' when decoding a new message #525
Comments
this has been fixed on #528 |
This fix makes the decoder no longer garbage free in the steady state: every time we receive a new message, we allocate a new repeating group decoder. Can we fix this by, instead of nulling out the group decoder, just resetting its properties instead? |
apologies for the undesirable effect - and thx for reaching out. I'll fix this in the way you suggested, @writeoncereadmany . Cheers |
the bug is fixed - hope it's all good now 👍 |
tyvm! |
When a repeating group decode is called, it's not nullifying the reference of 'next' element. As a consequence of this, if a previous message was successfully processed and it had a number X of elements in the same repeating group, then any succeeding message that is decoded which has an invalid value in the repeating group count tag will not detect the malformed repeating group because of the existing 'next' refence from previous decoding.
Example: Consider the messages below with repeating groups given by tags 120 and 121:
then
decoder.validate() == true //INCORRECT
The text was updated successfully, but these errors were encountered: