crashed on Re: Balsa has started crashing on me -- bugbuddy report attached



Hello,

A funny thing occured with my Balsa 2.0.13 (Solaris 8 for SPARC): every 
time I'm clicking the subjected message I crashed the program.  The 
first time I thought the message was a test case itself but further 
change my mind :-)  Debugging displays the place of the problem: strlen
(NULL).  The message has a bit incomplete rfc822 attachment information:

--EeQfGwPcQSOJBaQU
Content-Type: message/rfc822; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

From: Bobby D. Bryant <>
To: 
You can see empty address in "from" part of header.  This will cause 
body->embhdrs->from=NULL with evident result on Solaris.

ATTENTION! Developer, please be aware that *printf("%s", NULL) on Linux 
will work correctly but on Solaris will cause SIGSEGV!

The proposed patch of the problem is attached.

Best regards,
                               Eliseev Vladimir
*** src/balsa-message.c.orig	Wed Aug 13 16:21:05 2003
--- src/balsa-message.c	Mon Aug 25 12:43:59 2003
***************
*** 2460,2468 ****
  	if (g_ascii_strcasecmp(content_type, "message/rfc822") == 0 &&
  	    body->embhdrs) {
  	    gchar *from = libbalsa_address_to_gchar(body->embhdrs->from, 0);
! 	    icon_title = 
! 		g_strdup_printf(_("rfc822 message (from %s, subject \"%s\")"),
! 				from, body->embhdrs->subject);
  	    g_free(from);
  	} else if (is_multipart)
  	    icon_title = mpart_content_name(content_type);
--- 2460,2475 ----
  	if (g_ascii_strcasecmp(content_type, "message/rfc822") == 0 &&
  	    body->embhdrs) {
  	    gchar *from = libbalsa_address_to_gchar(body->embhdrs->from, 0);
! 	    if(NULL == from) {
! 		icon_title = 
! 		    g_strdup_printf(_("rfc822 message (subject \"%s\")"),
! 				    body->embhdrs->subject);
! 	    } else {
! 		icon_title = 
! 		    g_strdup_printf(_("rfc822 message (from %s, subject \"%s\")"),
! 				    from, body->embhdrs->subject);
! 		g_free(from);
! 	    }
  	    g_free(from);
  	} else if (is_multipart)
  	    icon_title = mpart_content_name(content_type);


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