Sean Chittenden wrote:
Send me a patch, I can reproduce this problem in seconds with OS-X's
Mail.app. -sc
How about this one...
--
________________________________________________________________
Paul Stevens mailto:[EMAIL PROTECTED]
NET FACILITIES GROUP PGP: finger [EMAIL PROTECTED]
The Netherlands________________________________http://www.nfg.nl
diff -urNad dbmail-2.0.1/list.c /tmp/dpep.AQZA44/dbmail-2.0.1/list.c
--- dbmail-2.0.1/list.c 2004-11-22 21:49:55.000000000 +0100
+++ /tmp/dpep.AQZA44/dbmail-2.0.1/list.c 2004-11-22 21:59:03.000000000 +0100
@@ -81,6 +81,20 @@
return newstart;
}
+/*
+ * return a empty initialized element;
+ */
+static struct element *element_new(void)
+{
+ struct element *new = (struct element *)my_malloc(sizeof(struct element));
+ if (new != NULL) {
+ bzero(new,sizeof(struct element));
+ new->data = NULL;
+ new->dsize = NULL;
+ new->nextnode = NULL;
+ }
+ return new;
+}
/*
* list_nodeadd()
@@ -94,10 +108,23 @@
size_t dsize)
{
struct element *p;
-
+
if (!tlist)
return NULL; /* cannot add to non-existing list */
+ if (! (p = element_new()))
+ return NULL;
+
+ if (! (p->data = (void *)my_malloc(dsize))) {
+ my_free(p);
+ return NULL;
+ }
+ p->data = memcpy(p->data, data, dsize);
+ p->dsize=dsize;
+ p->nextnode=tlist->start;
+ tlist->start = p;
+
+#ifdef OLD
p = tlist->start;
tlist->start =
@@ -124,7 +151,8 @@
tlist->start->dsize = dsize;
tlist->start->nextnode = p;
-
+#endif
+
/* updating node count */
tlist->total_nodes++;
return tlist->start;