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

BadInputs cause StackOverflow/Access Violation #198

Closed
kulgg opened this issue Apr 11, 2021 · 4 comments · Fixed by #197
Closed

BadInputs cause StackOverflow/Access Violation #198

kulgg opened this issue Apr 11, 2021 · 4 comments · Fixed by #197
Assignees
Labels
bug The result of a coding Error
Milestone

Comments

@kulgg
Copy link
Contributor

kulgg commented Apr 11, 2021

Description
On certain inputs some v2.8 Datatype structures are stuck in an endless recursive loop calling their own constructor. This causes a StackOverflow Exception in net461 and an access violation exit in netcoreapp 3.1. This recursive loop is caused because the Datatype implementation is not according to the HL7 Definition.

Exceptions and Inputs

  • StackOverflow/Access violation
    b"MSH|^|||||||ADT^A40|||2.8\rIN2||||||||||||||||||||||||||||A"
    b"MSH|^|||||||ADT^A40|||2.8\rIN2|||||||||||||||||||||||||||||A"

Environmental Details

  • OS: Ubuntu 20.04
  • Target Framework net641, netcoreapp3.1, probably generally
  • Version 3.0.0 preview 2

Additional context
The 2.8 Datatypes RMC, PTA and PPN implemented withdrawn fields wrongly.
See 2A.3.65, 2A.3.59 and 2A.3.56 of spec.

@milkshakeuk
Copy link
Member

@JlKmn again thank you for this.

The message structures specific to each hl7 version are generated from the HL7 database. Which suggests perhaps the database also needs updating, I'll have a look into this and reach out to the maintainer of the database if this is the case.

@milkshakeuk
Copy link
Member

@JlKmn is this fixed by #197

@kulgg
Copy link
Contributor Author

kulgg commented Apr 12, 2021

Yes

@kulgg
Copy link
Contributor Author

kulgg commented Apr 12, 2021

I decided to add the solution in there

@milkshakeuk milkshakeuk added this to the v3.0.0.0 milestone Apr 12, 2021
@milkshakeuk milkshakeuk added bug The result of a coding Error and removed awaiting review labels Apr 12, 2021
@milkshakeuk milkshakeuk added this to To Do in NHapi Kanban via automation Apr 12, 2021
NHapi Kanban automation moved this from To Do to Development Done Apr 12, 2021
@milkshakeuk milkshakeuk moved this from Development Done to In Pre-Release in NHapi Kanban Jun 2, 2021
@milkshakeuk milkshakeuk moved this from In Pre-Release to Released in NHapi Kanban Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The result of a coding Error
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants