* bug#7446: Emacs 23.2 [windows] - Buffer overrun bug with ebrowse.exe
@ 2010-11-20 0:39 Joe Matarazzo
2010-11-27 9:32 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Joe Matarazzo @ 2010-11-20 0:39 UTC (permalink / raw)
To: 7446
When the input file ends with a C++ style "//" comment line, without a
newline at the end, the parser will attempt to read past the end of
the input buffer. This produces undefined results, among them putting
the parser in a bogus state that makes all subsequent input files
parse incorrectly. Here's a possible fix:
--- old/ebrowse.c 2010-04-03 15:26:07 -0700
+++ new/ebrowse.c 2010-11-19 16:36:13 -0800
@@ -1784,6 +1784,10 @@
case '/':
while (GET (c) && c != '\n')
;
+
+ if (c == 0)
+ return YYEOF;
+
INCREMENT_LINENO;
break;
I'm not subscribed to the list. Please direct any follow up questions
directly to my email.
Thanks,
Joe
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#7446: Emacs 23.2 [windows] - Buffer overrun bug with ebrowse.exe
2010-11-20 0:39 bug#7446: Emacs 23.2 [windows] - Buffer overrun bug with ebrowse.exe Joe Matarazzo
@ 2010-11-27 9:32 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2010-11-27 9:32 UTC (permalink / raw)
To: Joe Matarazzo; +Cc: 7446-done
> Date: Fri, 19 Nov 2010 16:39:49 -0800
> From: Joe Matarazzo <joe.matarazzo@gmail.com>
> Cc:
>
> When the input file ends with a C++ style "//" comment line, without a
> newline at the end, the parser will attempt to read past the end of
> the input buffer. This produces undefined results, among them putting
> the parser in a bogus state that makes all subsequent input files
> parse incorrectly. Here's a possible fix:
Thanks, I applied this patch to the Emacs 23 branch.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-27 9:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-20 0:39 bug#7446: Emacs 23.2 [windows] - Buffer overrun bug with ebrowse.exe Joe Matarazzo
2010-11-27 9:32 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.