Missing addresses



A piece of spam with a weird `From:' header (From: "" <>, according to 
Message=>View Source) caused a flurry of error messages from Balsa:

** (balsa:17550): CRITICAL **: file address.c: line 666 
(libbalsa_address_to_gchar_p): assertion `LIBBALSA_IS_ADDRESS(address)' 
failed

I propose that, instead of trying to catch all instances where an 
address might be NULL, we change libbalsa_address_to_gchar to return 
g_strdup(_("(No address)")).

In parts of the code where we really care, we can still check; where 
we're just looking for something to use as a label, this change allows 
the caller to blithely call libbalsa_address_to_gchar and be assured of 
getting a nonNULL, newly allocated string.

Comments?

Peter



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