summaryrefslogtreecommitdiff
path: root/lib-src/ebrowse.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src/ebrowse.c')
-rw-r--r--lib-src/ebrowse.c5
1 files changed, 5 insertions, 0 deletions
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;