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

Crash on footnotes referenced more than once #28

Closed jcoulombe closed 13 years ago

jcoulombe commented 13 years ago

This is ok:

$ cat footnotes.txt 
a note[^footnote].

[^footnote]: footnote content
$ cat footnotes.txt | multimarkdown -t latex
a note\footnote{footnote content}.

But this is not:

$ cat footnotes2.txt 
a note[^footnote], then another one[^footnote].

[^footnote]: footnote content
$ cat footnotes2.txt | multimarkdown -t latex
multimarkdown(92359) malloc: *** error for object 0x305f20: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
multimarkdown(92359) malloc: *** error for object 0x841f0f: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Bus error

P.S: I'm not using the latest release, but a personal fork. Maybe this is not relevant in current mainstream version...

fletcher commented 13 years ago

Fixed already - definitely check bug reports against latest versions, because there have been a lot of changes lately.