aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorJoe Matarazzo2010-11-27 11:29:22 +0200
committerEli Zaretskii2010-11-27 11:29:22 +0200
commitda2b5401e8747adb28558684b48328806bf43e1e (patch)
tree292f11648f62dbbc86588b2265e8a8fd56a0460f /lib-src
parent09ffa822f8c0ff82d7a277d1bc673cc0831010b6 (diff)
downloademacs-da2b5401e8747adb28558684b48328806bf43e1e.tar.gz
emacs-da2b5401e8747adb28558684b48328806bf43e1e.zip
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.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog5
-rw-r--r--lib-src/ebrowse.c5
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 @@
12010-11-27 Joe Matarazzo <joe.matarazzo@gmail.com> (tiny change)
2
3 * ebrowse.c (yylex): If end of input buffer encountered while
4 searching for a newline after "//", return YYEOF. (Bug#7446)
5
12010-11-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 62010-11-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2 7
3 * emacsclient.c (set_local_socket) [DARWIN_OS]: Add fall-back 8 * 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 ()
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