Subject: rfc822_write_address

From: Jonas Nielsen <[email-masked]>
Date: Mon, 31 Jul 2000 13:38:37 +0200

Hi

rfc822_write_address takes a pointer to a buffer and an address
structure containing the addresses, and return the text string in the
buffer.

It doesn't allocate the memory for the buffer, so one need to malloc.
How do one know how much memory to allocate ?
-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Mon, 31 Jul 2000 23:30:59 -0700 (PDT)

> How do one know how much memory to allocate ?

Either you allocate "more than enough" in advance, or you use some routine
other than rfc822_write_address().

rfc822_write_address() is only used by rfc822_header(), which is simply a
demonstration/default function to use in outgoing SMTP to show you what you
need to do.  Most advanced applications supply their own routine that they use
instead of rfc822_header(), since rfc822_header() and rfc822_write_address()
are not flexible and are not save from buffer overflows.