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

Crash on unclosed title quote in image links #16

Open
hiltjo opened this issue May 13, 2021 · 2 comments
Open

Crash on unclosed title quote in image links #16

hiltjo opened this issue May 13, 2021 · 2 comments

Comments

@hiltjo
Copy link

hiltjo commented May 13, 2021

The following one-liner crashes smu:

echo '![a](b ")' | smu

The issue is introduced in the commit:

68edb1b#diff-fc97d482e4d5c1bf47ff0b7daa1e07b0af189f6cb83a554ca4ce6a3fdaf3d6d2

This is because the title pointer points after titleend.

@karlb
Copy link
Contributor

karlb commented May 22, 2021

Thanks for spotting this problem, @hiltjo!

This should be solved by karlb#4. Do you agree, or would you expect different output in this case?

@karlb
Copy link
Contributor

karlb commented May 22, 2021

Your fix in https://git.codemadness.org/smu/commit/84c908fb6f3609c25ea60c57c7009490c3c77044.html breaks the following commonmark:

Foo [bar](/url/ "Title with "quotes" inside").

I can understand if you see this as a pathological case and don't want to support it, but I still want to let you know to make sure that you don't break it unintentionally.

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

No branches or pull requests

2 participants