After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 99873 - crash when sending mail with non-default charset in ja locale
crash when sending mail with non-default charset in ja locale
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
pre-0.13.3 betas
Other other
: Normal normal
: 0.13.3
Assigned To: Christophe Lambin
Pan QA Team
Depends on:
Blocks:
 
 
Reported: 2002-11-29 06:13 UTC by Jens Petersen
Modified: 2006-06-18 05:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
crash backtrace (12.94 KB, text/plain)
2002-11-30 06:49 UTC, Jens Petersen
Details

Description Jens Petersen 2002-11-29 06:13:18 UTC
Start pan-0.13.2 in ja locale:

| % LANG=ja_JP.eucJP pan

Then reply to a posting by mail.  Enter some Japanese text
or a Euro symbol, and change the message encoding to UTF-8
in the More Headers tab.  Press the send mail button:

| ** (pan:21156): WARNING **: Invalid UTF8 string passed to
pango_layout_set_text()
|
|
| zsh: segmentation fault  pan
Comment 1 Jens Petersen 2002-11-29 06:23:59 UTC
I just tried with pan-0.13.2.90-nospell1
and the problem still seems to be present there.
Comment 2 Charles Kerr 2002-11-29 17:49:44 UTC
Could you provide a backtrace as described at
http://pan.rebelbase.com/bugs/ ?
Comment 3 Jens Petersen 2002-11-30 06:49:21 UTC
Created attachment 12650 [details]
crash backtrace
Comment 4 Christophe Lambin 2002-12-04 22:45:40 UTC
I can reproduce this with a different backtrace:

  • #0 strlen
    at ../sysdeps/i386/strlen.c line 28
  • #1 pan_socket_putline
    at sockets.c line 357
  • #2 smtp_send_line
    at smtp.c line 110
  • #3 smtp_send_line_va
    at smtp.c line 141
  • #4 smtp_send_message
    at smtp.c line 260
  • #5 smtp_send
    at smtp.c line 384
  • #6 send_message_now
    at task-post.c line 229
  • #7 task_post_run
    at task-post.c line 320
  • #8 task_run
    at task.c line 180
  • #9 queue_run_thread
    at queue.c line 958
  • #10 g_thread_pool_thread_proxy
    at gthreadpool.c line 110
  • #11 g_thread_create_proxy
    at gthread.c line 538
  • #12 pthread_start_thread
    at manager.c line 284

Comment 5 Christophe Lambin 2002-12-04 22:46:23 UTC
will look into this tomorrow.
Comment 6 Charles Kerr 2002-12-05 20:32:23 UTC
Pearls of wisdom from fejj:

<fejj> if you do
       printf ("%.*s", num_bytes_to_print, jp_locale_string);
       it will not do what you expect, instead of using that
       number of bytes - glibc will use that number of glyphs
       (characters - even if they are multibyte)
<chris> charles: this causes
        http://bugzilla.gnome.org/show_bug.cgi?id=99873
<fejj> so what we did in evo was to make a temp buffer strcpy'd
       it into the tmp buffer and then did printf ("%s", tmp);
<fejj> so...
       tmp = alloca (num_bytes_to_print + 1);
       memcpy (tmp, jp_locale_string, num_bytes_to_print);
       tmp[num_bytes_to_printf] = '\0';
       printf ("%s", tmp);
Comment 7 Charles Kerr 2002-12-05 21:05:24 UTC
Background information on using "%.*s" on other charsets:
http://bugzilla.redhat.com/bugzilla/long_list.cgi?buglist=70518