--- error.c.old 2004-03-20 14:39:57.985636816 +0100 +++ error.c 2004-03-20 14:40:42.025941672 +0100 @@ -71,7 +71,13 @@ len += sprintf(&(buf->data[len]), "<%s xmlns='" uri_STREAM_ERR "'/>%s", _stream_errors[err], text); if(s->state < state_STREAM) - len += sprintf(&(buf->data[len]), ""); + { + char *streamend= ""; + printf ("About to write %d bytes\n", strlen (streamend)); + // len += sprintf(&(buf->data[len]), ""); + memcpy (&(buf->data[len]), streamend, strlen (streamend)); + len += strlen (streamend); + } assert(len == buf->len);