Re: printing new letter - horror



Am 04.04.02 15:06:11 schrieb(en) Pawel Salek:
> I could reproduce it. I have a patch fixing the crash but it needs some 
> extra testing to verify that it does not break the internationalization 
> (the bug was introduced whe the capability of handling different charsets 
> within single message were introduced: this worked perfect for received 
> messages but failed for the ones about to be send).

I guess your patch looks roughly like the one below, right? IMHO, the main 
problem is that the libbalsa routine did not check for a null pointer. With 
my patch, the printing problem is gone, and I think it does not break i18n, 
as the body->charset field should be set correctly via sendmsg-window. 
However, I still see a second critical message (#2 comes from the patch...):

** CRITICAL **: file message.c: line 366 (libbalsa_message_user_hdrs): 
assertion `message->mailbox' failed.

** CRITICAL **: file body.c: line 134 (libbalsa_message_body_get_parameter): 
assertion `body->mutt_body != NULL' failed.

Cheers,

	Albrecht.


~~~snip here~~~
--- balsa-1.3.4-orig/libbalsa/body.c    Tue Mar 19 21:31:12 2002
+++ balsa-1.3.4/libbalsa/body.c Thu Apr  4 21:11:31 2002
@@ -131,6 +131,7 @@
      gchar *res;

       g_return_val_if_fail(body != NULL, NULL);
+    g_return_val_if_fail(body->mutt_body != NULL, NULL);

       libbalsa_lock_mutt();
      res = mutt_get_parameter(param, body->mutt_body->parameter);
--- balsa-1.3.4-orig/src/print.c        Fri Feb 22 22:14:19 2002
+++ balsa-1.3.4/src/print.c     Thu Apr  4 21:22:50 2002
@@ -605,6 +605,8 @@

       /* get the necessary iconv structure, or use iso-8859-1 */
      charset = libbalsa_message_body_get_parameter(body, "charset");
+    if (!charset && body->charset)
+       charset = g_strdup(body->charset);

       if (charset) {
         pdata->conv = iconv_open("utf8", charset);
~~~snip here~~~

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



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