Coredump of 1.4.3 on Solaris 8 SPARC with proposed fixes



Hello,

Yesturday I received an e-mail with the empty Subject field and 
requested delivery notification.  Separately both events are processed 
well by Balsa but together they caused coredump.  The true source of 
coredump is strlen(0x0) which is 0 on Linux and SEGV on Solaris.

In proposed fixes subj=0x0 is replaced by subj="".

I'm not using Balsa 2.x.x but the same problem may take place in it too.

Best regards,
                              Eliseev Vladimir
*** message.c.old	þÔ áÐÒ 10 14:51:04 2003
--- message.c.new	þÔ áÐÒ 10 14:50:40 2003
***************
*** 1031,1037 ****
          g_return_val_if_fail(CLIENT_CONTEXT_OPEN(msg->mailbox), NULL);
  	/* g_print("Returning libmutt's pointer\n"); */
  	return msg->header->env->subject;
!     } else
  	return msg->subj;
  }
  
--- 1031,1039 ----
          g_return_val_if_fail(CLIENT_CONTEXT_OPEN(msg->mailbox), NULL);
  	/* g_print("Returning libmutt's pointer\n"); */
  	return msg->header->env->subject;
!     } else if(NULL == msg->subj)
! 	return "";
!     else
  	return msg->subj;
  }
  
*** message.h.old	þÔ áÐÒ 10 14:50:57 2003
--- message.h.new	þÔ áÐÒ 10 14:50:34 2003
***************
*** 83,89 ****
       * on sending. */
      gchar *subj;
  #ifdef MESSAGE_COPY_CONTENT
! #define LIBBALSA_MESSAGE_GET_SUBJECT(m) ((m)->subj)
  #else
  #define LIBBALSA_MESSAGE_GET_SUBJECT(m) libbalsa_message_get_subject(m)
  #endif
--- 83,89 ----
       * on sending. */
      gchar *subj;
  #ifdef MESSAGE_COPY_CONTENT
! #define LIBBALSA_MESSAGE_GET_SUBJECT(m) ((m)->subj==NULL?"":(m)->subj)
  #else
  #define LIBBALSA_MESSAGE_GET_SUBJECT(m) libbalsa_message_get_subject(m)
  #endif


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