aboutsummaryrefslogtreecommitdiffstats
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 1fcbb8662f..81067a9081 100644
--- a/lib-src/ebrowse.c
+++ b/lib-src/ebrowse.c
@@ -1700,6 +1700,11 @@ yylex (void)
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;