git.iko.soy/typeable/pandoc
on master help sign in
LaTeX reader: fixed a hang/memory leak in certain circumstances.

We were using `grouped blocks` instead of `grouped block`. This caused the reader to hang in an infinite loop (with a memory leak) on e.g. `\parbox{1em}{#1}`. Closes #5845.

commit4b58384c0a832ceee5b8d26dd77b38611976a7fd authorJohn MacFarlane <jgm@berkeley.edu> dateSat 2 Nov 2019, 09:33 (7 years ago) parent180c96f
1 file changed+3−3
src/Text/Pandoc/Readers/LaTeX.hs+3−3
src/Text/Pandoc/Readers/LaTeX.hs+3−3
@@ -1689,8 +1689,8 @@ looseItem = do
16891689
16901690epigraph :: PandocMonad m => LP m Blocks
16911691epigraph = do
1692− p1 <- grouped blocks
1693− p2 <- grouped blocks
1692+ p1 <- grouped block
1693+ p2 <- grouped block
16941694 return $ divWith ("", ["epigraph"], []) (p1 <> p2)
16951695
16961696resetCaption :: PandocMonad m => LP m ()
@@ -1771,7 +1771,7 @@ parbox = try $ do
17711771 oldInTableCell <- sInTableCell <$> getState
17721772 -- see #5711
17731773 updateState $ \st -> st{ sInTableCell = False }
1774− res <- grouped blocks
1774+ res <- grouped block
17751775 updateState $ \st -> st{ sInTableCell = oldInTableCell }
17761776 return res
17771777