Mercurial > emacs
comparison lib-src/ebrowse.c @ 111776:921c7579cd1a
Fix bug #7446 with overrunning input buffer in ebrowse.
ebrowse.c (yylex): If end of input buffer encountered while
searching for a newline after "//", return YYEOF.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 27 Nov 2010 11:29:22 +0200 |
parents | f039ef236594 |
children | 141d3f14d8c3 794f724ca655 |
comparison
equal
deleted
inserted
replaced
111775:81cac26277b0 | 111776:921c7579cd1a |
---|---|
1782 return DIVASGN; | 1782 return DIVASGN; |
1783 | 1783 |
1784 case '/': | 1784 case '/': |
1785 while (GET (c) && c != '\n') | 1785 while (GET (c) && c != '\n') |
1786 ; | 1786 ; |
1787 /* Don't try to read past the end of the input buffer if | |
1788 the file ends in a C++ comment without a newline. */ | |
1789 if (c == 0) | |
1790 return YYEOF; | |
1791 | |
1787 INCREMENT_LINENO; | 1792 INCREMENT_LINENO; |
1788 break; | 1793 break; |
1789 | 1794 |
1790 default: | 1795 default: |
1791 UNGET (); | 1796 UNGET (); |