diff options
author | Joe Matarazzo <joe.matarazzo@gmail.com> | 2010-11-27 11:29:22 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2010-11-27 11:29:22 +0200 |
commit | da2b5401e8747adb28558684b48328806bf43e1e (patch) | |
tree | 292f11648f62dbbc86588b2265e8a8fd56a0460f | |
parent | 09ffa822f8c0ff82d7a277d1bc673cc0831010b6 (diff) | |
download | emacs-da2b5401e8747adb28558684b48328806bf43e1e.tar.gz |
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.
-rw-r--r-- | lib-src/ChangeLog | 5 | ||||
-rw-r--r-- | lib-src/ebrowse.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index ba98132521d..0f518445a45 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2010-11-27 Joe Matarazzo <joe.matarazzo@gmail.com> (tiny change) + + * ebrowse.c (yylex): If end of input buffer encountered while + searching for a newline after "//", return YYEOF. (Bug#7446) + 2010-11-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> * emacsclient.c (set_local_socket) [DARWIN_OS]: Add fall-back diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index b51b4aa6965..67c9637daba 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c @@ -1784,6 +1784,11 @@ yylex () case '/': while (GET (c) && c != '\n') ; + /* Don't try to read past the end of the input buffer if + the file ends in a C++ comment without a newline. */ + if (c == 0) + return YYEOF; + INCREMENT_LINENO; break; |