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

StackOverflowException is throw when converting special markdown to HTML #497

Closed
leonyang12 opened this issue Dec 7, 2020 · 6 comments · Fixed by #500
Closed

StackOverflowException is throw when converting special markdown to HTML #497

leonyang12 opened this issue Dec 7, 2020 · 6 comments · Fixed by #500
Labels

Comments

@leonyang12
Copy link

We use Markdig in our code to convert Markdown to HTML. It works perfect in most cases w.r.t. to performance. Recently we received reports that the library hangs and throws StackOverflowException when processing some special markdowns.

Here are the sample code:
`string input = ;
var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();

string result = Markdown.ToHtml(input, pipeline);`

@xoofx, I wouldn't paste the markdown payload here due to security reason, please let me know the best option to share it out to continue investigation.

@xoofx
Copy link
Owner

xoofx commented Dec 8, 2020

Could you compile a local version of Markdig, debug it with your markdown and try to extract a smaller repro that you could post?

@xoofx xoofx added the bug label Dec 8, 2020
@MihaZupan
Copy link
Collaborator

Feel free to share the input via any contact on my profile.

@leonyang12
Copy link
Author

@xoofx , thanks for the quick response. I reached out to @MihaZupan and shared the markdown input with repro.

@leonyang12
Copy link
Author

@MihaZupan , has there been any update with investigation?

@leonyang12
Copy link
Author

@xoofx , will you be able to review @MihaZupan 's fix? Thanks

@leonyang12
Copy link
Author

@xoofx, when can we expect a new version with the fix?

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

Successfully merging a pull request may close this issue.

3 participants