fletcher / peg-multimarkdown

An implementation of MultiMarkdown in C, using a PEG grammar - a fork of jgm's peg-markdown. No longer under active development - see MMD 5.
Other
523 stars 55 forks source link

Improperly formatted footnotes cause segfault #115

Closed ttscoff closed 11 years ago

ttscoff commented 12 years ago

A Marked user sent me the following code because it crashed Marked, and I found that it caused a segmentation fault in MMD, too.

## Jauns notikums ##
Kas tas varētu būt par *notikumu*?
[Jaunums](www.apple.com) un citi zvēri footnote[^fn]
UN te citas [^fn]

[^fn]: Te ir **kājpiezīme.**
[^fn]: Te ir otra *kājpiezīme.*

| Jauns nosaukums  | Vēl jaunāks            |
| ---------------- | ---------------------- |
| Jauns sviests    |   Jaunas mēbeles       |

* Mēs pieļaujam, kas tas te kaut ko mnzīmīmē
    * apakšpunkts
* Galvenais punkc

Tezksts

Note that the same footnote identifier is used twice. Obviously not something I want MMD to be able to parse, but a graceful fail would be cool :).

fletcher commented 12 years ago

Added to my to-do list... Thanks for forwarding to me.

fletcher commented 11 years ago

Fixed in MMD-4