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

Memory overrun in latex writer #210

Closed
jgm opened this issue Jun 29, 2017 · 1 comment
Closed

Memory overrun in latex writer #210

jgm opened this issue Jun 29, 2017 · 1 comment

Comments

@jgm
Copy link
Member

jgm commented Jun 29, 2017

Reproduce with cmark -t latex:

2. a

   2. a

      2. a

         2. a

            2. a

               2. a

                  2. a

                     2. a

                        2. a

                           2. a

                              2. a

                                 2. a

                                    2. a

                                       2. a

                                          2. a

@jgm
Copy link
Member Author

jgm commented Jun 29, 2017

Found by google/oss-fuzz
The problem is that S_get_enumlevel returns the actual enumeration level, but we only handle levels up through 10. @kivikakk I'm about to post a fix.

@jgm jgm closed this as completed in f8737b1 Jun 29, 2017
ikedas pushed a commit to ikedas/cmark that referenced this issue Jun 30, 2017
We got an array overflow in enumerated lists nested more than
10 deep with start number =/= 1.

Found by google/oss-fuzz.
https://oss-fuzz.com/v2/testcase-detail/5546760854306816

This commit also ensures that we don't try to set `enum_` counters
that aren't defined by LaTeX (generally up to enumv).

Closes commonmark#210.
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

1 participant