[evolution-patches] 67211, portability using regexec




fixes a crash on solaris (probably!).

--
Michael Zucchi <notzed ximian com>
"born to die, live to work, it's all downhill from here"
Novell's Evolution and Free Software Developer
Index: camel/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.2251.2.15
diff -u -3 -r1.2251.2.15 ChangeLog
--- camel/ChangeLog	11 Oct 2004 01:37:41 -0000	1.2251.2.15
+++ camel/ChangeLog	11 Oct 2004 09:14:21 -0000
@@ -1,3 +1,11 @@
+2004-10-11  Not Zed  <NotZed Ximian com>
+
+	** See bug #67211.
+
+	* camel-mime-utils.c (camel_header_raw_check_mailing_list):
+	initialise the match start/end pointers, since some regexec's
+	don't seem to do it.
+
 2004-10-08  Not Zed  <NotZed Ximian com>
 
 	** See bug #67170.
Index: camel/camel-mime-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-mime-utils.c,v
retrieving revision 1.214.2.1
diff -u -3 -r1.214.2.1 camel-mime-utils.c
--- camel/camel-mime-utils.c	23 Sep 2004 04:12:29 -0000	1.214.2.1
+++ camel/camel-mime-utils.c	11 Oct 2004 09:14:22 -0000
@@ -3842,10 +3842,14 @@
 {
 	const char *v;
 	regmatch_t match[3];
-	int i;
+	int i, j;
 	
 	for (i = 0; i < sizeof (mail_list_magic) / sizeof (mail_list_magic[0]); i++) {
 		v = camel_header_raw_find (list, mail_list_magic[i].name, NULL);
+		for (j=0;j<3;j++) {
+			match[i].rm_so = -1;
+			match[i].rm_eo = -1;
+		}
 		if (v != NULL && regexec (&mail_list_magic[i].regex, v, 3, match, 0) == 0 && match[1].rm_so != -1) {
 			char *list;
 			int len1, len2;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]