[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BUG: etags segfaults
From: |
Daniel Bergström |
Subject: |
BUG: etags segfaults |
Date: |
Wed, 26 Mar 2003 17:52:30 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.2.1) Gecko/20030107 |
Hello!
In Emacs 21.3 the etags utility seg. faults. To recreate the error you
need to do the following steps:
* create a file named t.erl and add the following two lines:
-module(t).
-define().
* Then we execute the etags command:
etags -o TAGS t.erl
This results in a segfault and a core dumped. The reason to the segfault
was that in the routine erlang_attribute() it calculates the length of
the string between ( and ) to be -1. The if statement only checks if the
value isn't 0 to continue working with the string, while it should only
continue if its a possitive value greather then 0.
The patch attached should correct this problem.
Cheers,
Daniel
--- emacs-21.3/lib-src/etags.c.org Wed Mar 26 17:08:34 2003
+++ emacs-21.3/lib-src/etags.c Wed Mar 26 17:09:43 2003
@@ -4969,7 +4969,7 @@
{
pos = skip_spaces (s + pos) - s;
len = erlang_atom (s, pos);
- if (len != 0)
+ if (len > 0)
pfnote (savenstr (& s[pos], len), TRUE,
s, pos + len, lineno, linecharno);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- BUG: etags segfaults,
Daniel Bergström <=