patch for segfault




Hye, this patch is the only way for me to send email again with balsa
(have a look at the previous mail I sent on the list)
Can any developper apply it or tell me what's wrong with it. 

PS: of course it doesn't explain why the variable had a NULL value but it
prevent balsa from accessing a NULL pointer.

Thanks

-- 
 > [Linux] c'est une philosophie un art de vivre, un état intérieur,
 > une sorte de fluide qui nous entoure et nous pénètre.
 Fais tourner stp !
     -+- Guillaume in Guide du linuxien pervers - "Tous drogués j'vous dis !"


*** balsa/libbalsa/send.c	Sat Jan  1 19:53:51 2000
--- balsa.perso/libbalsa/send.c	Mon Jan  3 18:54:40 2000
***************
*** 356,367 ****
    tmp = address_to_gchar (message->from);
    msg->env->from = rfc822_parse_adrlist (msg->env->from, tmp);
    g_free (tmp);
  
    tmp = address_to_gchar (message->reply_to);
    msg->env->reply_to = rfc822_parse_adrlist (msg->env->reply_to, tmp);
    g_free (tmp);
! 
    msg->env->subject = g_strdup (message->subject);
  
    msg->env->to = rfc822_parse_adrlist (msg->env->to, make_string_from_list (message->to_list));
    msg->env->cc = rfc822_parse_adrlist (msg->env->cc, make_string_from_list (message->cc_list));
--- 356,369 ----
    tmp = address_to_gchar (message->from);
    msg->env->from = rfc822_parse_adrlist (msg->env->from, tmp);
    g_free (tmp);
  
+   if (message->reply_to != NULL)
+   {
    tmp = address_to_gchar (message->reply_to);
    msg->env->reply_to = rfc822_parse_adrlist (msg->env->reply_to, tmp);
    g_free (tmp);
!   }
    msg->env->subject = g_strdup (message->subject);
  
    msg->env->to = rfc822_parse_adrlist (msg->env->to, make_string_from_list (message->to_list));
    msg->env->cc = rfc822_parse_adrlist (msg->env->cc, make_string_from_list (message->cc_list));
***************
*** 729,740 ****
    tmp = address_to_gchar (message->from);
    msg->env->from = rfc822_parse_adrlist (msg->env->from, tmp);
    g_free (tmp);
  
    tmp = address_to_gchar (message->reply_to);
    msg->env->reply_to = rfc822_parse_adrlist (msg->env->reply_to, tmp);
    g_free (tmp);
! 
    msg->env->subject = g_strdup (message->subject);
  
    msg->env->to = rfc822_parse_adrlist (msg->env->to, make_string_from_list (message->to_list));
    msg->env->cc = rfc822_parse_adrlist (msg->env->cc, make_string_from_list (message->cc_list));
--- 731,745 ----
    tmp = address_to_gchar (message->from);
    msg->env->from = rfc822_parse_adrlist (msg->env->from, tmp);
    g_free (tmp);
  
+   if (message->reply_to != NULL)
+   {
    tmp = address_to_gchar (message->reply_to);
    msg->env->reply_to = rfc822_parse_adrlist (msg->env->reply_to, tmp);
    g_free (tmp);
!   }
!   
    msg->env->subject = g_strdup (message->subject);
  
    msg->env->to = rfc822_parse_adrlist (msg->env->to, make_string_from_list (message->to_list));
    msg->env->cc = rfc822_parse_adrlist (msg->env->cc, make_string_from_list (message->cc_list));


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