From: SourceForge.net <no...@so...> - 2004-12-24 14:17:13
|
Patches item #1088093, was opened at 2004-12-19 23:17 Message generated for change (Comment added) made by thuriaux You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300235&aid=1088093&group_id=235 Category: segfault Group: None >Status: Open Resolution: Accepted Priority: 5 Submitted By: Thomas Huriaux (thuriaux) Assigned to: Mark Doliner (thekingant) Summary: segfault using some characters from iso-8859-1 with gadugadu Initial Comment: When sending messages using some characters from iso-8859-1 encoding with gadu gadu, gaim crashes with segfault. These characters are a-grave, e-grave, other characters such as e-acute or c-cedil are ok. --- Backtrace: --- #0 0xb788ffd3 in strlen () from /lib/tls/libc.so.6 #1 0xb71e4084 in gg_send_message_richtext () from /usr/lib/gaim/libgg.so #2 0xb71e3fb2 in gg_send_message () from /usr/lib/gaim/libgg.so #3 0xb71e7aab in login_callback () from /usr/lib/gaim/libgg.so #4 0x0809286c in serv_send_im () #5 0x08075d46 in gaim_connections_get_handle () #6 0x080bf17a in away_on_login () #7 0x080c2181 in away_on_login () #8 0xb7d4d934 in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0 #9 0xb7b13c20 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #10 0xb7b27c28 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0 #11 0xb7b269be in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #12 0xb7b26ee4 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #13 0xb7e4c957 in gtk_widget_send_expose () from /usr/lib/libgtk-x11-2.0.so.0 #14 0xb7e5a9ef in gtk_window_propagate_key_event () from /usr/lib/libgtk-x11-2.0.so.0 #15 0xb7e5aa8c in gtk_window_propagate_key_event () from /usr/lib/libgtk-x11-2.0.so.0 #16 0xb7d4d934 in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0 #17 0xb7b13fb7 in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0 #18 0xb7b13c20 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #19 0xb7b27655 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0 #20 0xb7b269be in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #21 0xb7b26ee4 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #22 0xb7e4c957 in gtk_widget_send_expose () from /usr/lib/libgtk-x11-2.0.so.0 #23 0xb7d4bf7e in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0 #24 0xb7d4ac26 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0 #25 0xb7c01185 in _gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0 #26 0xb7aa9c02 in g_main_depth () from /usr/lib/libglib-2.0.so.0 #27 0xb7aaacf8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #28 0xb7aab030 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #29 0xb7aab673 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #30 0xb7d4a4e3 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #31 0x080fd743 in main () ---------------------------------------------------------------------- >Comment By: Thomas Huriaux (thuriaux) Date: 2004-12-24 15:17 Message: Logged In: YES user_id=1181326 Please remove the first return in the modified method. After this, it will work. ---------------------------------------------------------------------- Comment By: Mark Doliner (thekingant) Date: 2004-12-24 02:48 Message: Logged In: YES user_id=20979 I applied a modified version of this to head. It might be a good idea to try it sometime to make sure my changes didn't break anything. Thanks. ---------------------------------------------------------------------- Comment By: Thomas Huriaux (thuriaux) Date: 2004-12-21 13:16 Message: Logged In: YES user_id=1181326 I did some tests in two situations : Gaim patched (under Linux) sending to Gaim not patched (under linux) and Gaim patched (under Linux) sending to Windows Gadu Gadu client. If sending "text with é (e-acute)" both received the correct text if sending "text with è (e-grave)", the receiving Gaim shows "text with ?? (e-grave)" and gg client shows "text with Ã" (e-grave)" if sending "text with é (e-acute) and è (e-grave)" the receiving Gaim shows "text with ?? (e-acute) and ?? (e-grave)" and gg client shows "text with é (e-acute) and Ã" (e-grave)" It is fully understandable, as it considers it is CP1250 but the message is sent in UTF-8. But the most important (which answers to your question) is that the message is delivered, and Gaim do not segfault anymore. ---------------------------------------------------------------------- Comment By: Evan Schoenberg (evands) Date: 2004-12-21 08:28 Message: Logged In: YES user_id=669684 I can verify from the Adium crash reporter that the crash is definitely a fairly common one for g-g users :) As far as the patch goes, does it leak msg in the case in which it is not able to be converted? Or is it always the case that if (err != NULL) then (msg == NULL)? ---------------------------------------------------------------------- Comment By: Luke Schierer (lschiere) Date: 2004-12-20 02:46 Message: Logged In: YES user_id=28833 Ethan, I know you haven't worked with the gadu-gadu code, but can you please look this over? ---------------------------------------------------------------------- Comment By: Thomas Huriaux (thuriaux) Date: 2004-12-20 02:21 Message: Logged In: YES user_id=1181326 The problem comes from g_convert() in glib which returns null when a failure occurs converting to CP1250 used by gadu gadu. This was not catched for gadu gadu protocol, that's why it turned itself into segfault. I have used what I found for the same problem in protocols/irc/parse.c to write the patch I join here. It results that gaim is sending the message in utf-8 instead of CP1250 if it fails to convert it. The receiver has problems to read it, but it's still readable if he guesses extra characters. I don't think there is any other solution which still respect the initial protocol. Please check this patch and if it is ok, please include it. Thanks for your time. ---------------------------------------------------------------------- Comment By: Luke Schierer (lschiere) Date: 2004-12-19 23:55 Message: Logged In: YES user_id=28833 the Gadu-Gadu maintainer has left the project, and none of the rest of us have any significant ability to use a protocol where almost everyone is speaking polish. Please provide a patch for this. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300235&aid=1088093&group_id=235 |