diff -r -u jcr-0.2.4.orig/jabberd/xmlparse.c jcr-0.2.4/jabberd/xmlparse.c --- jcr-0.2.4.orig/jabberd/xmlparse.c 2003-10-13 04:02:38.000000000 +0200 +++ jcr-0.2.4/jabberd/xmlparse.c 2004-09-17 14:16:04.965934000 +0200 @@ -2275,7 +2275,7 @@ processor = epilogProcessor; eventPtr = s; for (;;) { - const char *next; + const char *next = NULL; int tok = XmlPrologTok(encoding, s, end, &next); eventEndPtr = next; switch (tok) { diff -r -u jcr-0.2.4.orig/jcomp/jcr_elements.c jcr-0.2.4/jcomp/jcr_elements.c --- jcr-0.2.4.orig/jcomp/jcr_elements.c 2004-07-09 15:16:54.000000000 +0200 +++ jcr-0.2.4/jcomp/jcr_elements.c 2004-09-17 14:16:04.968738000 +0200 @@ -120,7 +120,7 @@ if (parent == NULL) { x = xmlnode_dup(jcr->current); to = jid_new(x->p, xmlnode_get_attrib(x, "to")); - if (strncasecmp(jcr->jcr_i->id, to->server, strlen(jcr->jcr_i->id)) == 0) { + if (!to || strncasecmp(jcr->jcr_i->id, to->server, strlen(jcr->jcr_i->id)) == 0) { d = dpacket_new(x); if (d) (jcr->handler)(jcr->jcr_i, d, (void *)jcr->pdata); diff -r -u jcr-0.2.4.orig/src/main.c jcr-0.2.4/src/main.c --- jcr-0.2.4.orig/src/main.c 2004-07-09 16:59:43.000000000 +0200 +++ jcr-0.2.4/src/main.c 2004-09-17 14:17:13.892717000 +0200 @@ -39,7 +39,7 @@ GThread *dthread; /* the packet delivery thread */ GMainLoop *gmain; /* the receive packet event loop */ - jcr = (jcr_instance)malloc(sizeof(_jcr_instance)); + jcr = (jcr_instance)calloc(1, sizeof(_jcr_instance)); g_thread_init(NULL); fprintf(stderr, "%s -- %s\n%s\n\n", _JCOMP_NAME, _JCOMP_VERS, _JCOMP_COPY); @@ -177,7 +177,7 @@ sigaction(SIGKILL, &act, NULL); p = pool_new(); - jcr->jcr_i = (instance)pmalloc(p, sizeof(instance)); + jcr->jcr_i = (instance)pmalloc(p, sizeof(_instance)); jcr->jcr_i->p = p; jcr->jcr_i->id = pstrdup(p, xmlnode_get_data(xmlnode_get_tag(jcr->config,"host")));