Re: Coredump of 1.4.3 on Solaris 8 SPARC with proposed fixes



Am 10.04.03 17:51 schrieb(en) Eliseev Vladimir:
> In proposed fixes subj=0x0 is replaced by subj="".

Hmmm, I would prefer to return _("(no subject)") in this case instead of 
the empty string. Opinions?

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

If it happens when building the dialog, then there are *lots* more in 
connection with the gpg stuff. As they always use the routine from 
message.c, it's also fixed with your patch. Good work! Well, mostly at 
least:

> --- 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;
>   }

This doesn't catch a NULL msg->header->env->subject (or is this 
impossible?). So I would propose

     if(msg->header && msg->mailbox) { /* a message in a mailbox... */
         g_return_val_if_fail(CLIENT_CONTEXT_OPEN(msg->mailbox), NULL);
	/* g_print("Returning libmutt's pointer\n"); */
	if (msg->header->env && msg->header->env->subject)
	    return msg->header->env->subject;
	else
	    return _("(no subject)");
     } else {
	if (msg->subj)
	    return msg->subj;
	else
	    return _("(no subject)");
     }

>   #ifdef MESSAGE_COPY_CONTENT
> ! #define LIBBALSA_MESSAGE_GET_SUBJECT(m) ((m)->subj==NULL?"":(m)->subj)

This has no effect in balsa 2, as MESSAGE_COPY_CONTENT is never defined. 
Any idea about it's use??? If it's just a leftover, IMHO it could be 
removed for clarity.

Cheers, Albrecht.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Albrecht Dreß  -  Johanna-Kirchner-Straße 13  -  D-53123 Bonn (Germany)
        Phone (+49) 228 6199571  -  mailto:albrecht.dress@arcor.de
_________________________________________________________________________

PGP signature



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