This patch has been committed.
Vin Shelton <acs(a)xemacs.org> writes:
21.4 source patch:
Diff command: cvs -q diff -u
Files affected: lib-src/etags.c
Index: lib-src/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lib-src/ChangeLog,v
retrieving revision 1.115.2.25
diff -u -u -r1.115.2.25 ChangeLog
--- lib-src/ChangeLog 2004/12/06 01:08:10 1.115.2.25
+++ lib-src/ChangeLog 2004/12/17 15:15:03
@@ -1,3 +1,7 @@
+2004-12-17 Vin Shelton <acs(a)xemacs.org>
+ * etags.c (add_regex): Use zeropattern to initialize patbuf and
+ thus avoid a segv.
+
2004-12-05 Vin Shelton <acs(a)xemacs.org>
* XEmacs 21.4.16 is released
Index: lib-src/etags.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lib-src/etags.c,v
retrieving revision 1.24.2.2
diff -u -u -r1.24.2.2 etags.c
--- lib-src/etags.c 2004/06/24 04:02:29 1.24.2.2
+++ lib-src/etags.c 2004/12/17 15:15:03
@@ -5146,6 +5146,7 @@
bool ignore_case;
language *lang;
{
+ static struct re_pattern_buffer zeropattern;
char *name;
const char *err;
struct re_pattern_buffer *patbuf;
@@ -5166,11 +5167,9 @@
(void) scan_separators (name);
patbuf = xnew (1, struct re_pattern_buffer);
+ *patbuf = zeropattern;
/* Translation table to fold case if appropriate. */
patbuf->translate = (ignore_case) ? lc_trans : NULL;
- patbuf->fastmap = NULL;
- patbuf->buffer = NULL;
- patbuf->allocated = 0;
err = re_compile_pattern (regexp_pattern, strlen (regexp_pattern), patbuf);
if (err != NULL)