Skip to content

Commit

Permalink
Avoid tools::parseLatex() crash on '\verb{}'. By Ivan Krylov <krylov.…
Browse files Browse the repository at this point in the history
…r00t@gmail.com>.

git-svn-id: https://svn.r-project.org/R/trunk@84726 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
hornik committed Jul 22, 2023
1 parent e543679 commit 01d8689
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/library/tools/src/gramLatex.y
Original file line number Diff line number Diff line change
Expand Up @@ -846,8 +846,8 @@ static int mkVerb(int c)
TEXT_PUSH('\\'); TEXT_PUSH('v'); TEXT_PUSH('e'); TEXT_PUSH('r'); TEXT_PUSH('b');
TEXT_PUSH(c);
while ((c = xxgetc()) != delim) TEXT_PUSH(c);
TEXT_PUSH(c);
while (((c = xxgetc()) != delim) && c != R_EOF) TEXT_PUSH(c);
if (c != R_EOF) TEXT_PUSH(c);
PRESERVE_SV(yylval = mkString2(stext, bp - stext));
if(stext != st0) free(stext);
Expand Down

0 comments on commit 01d8689

Please sign in to comment.