Bug 3138 - pgpinline crashes on signature check if gppme fails to init
Summary: pgpinline crashes on signature check if gppme fails to init
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Plugins/Privacy/PGP (show other bugs)
Version: 3.9.3
Hardware: PC Linux
: P3 minor
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2014-04-11 08:04 UTC by Timo Teräs
Modified: 2014-04-21 10:48 UTC (History)
0 users

See Also:


Attachments

Description Timo Teräs 2014-04-11 08:04:14 UTC
Core was generated by `claws-mail'.
Program terminated with signal 11, Segmentation fault.
#0  pgpinline_is_signed (mimeinfo=0x128b5ab0) at pgpinline.c:140
140		data->done_sigtest = TRUE;

(gdb) where
#0  pgpinline_is_signed (mimeinfo=0x128b5ab0) at pgpinline.c:140
#1  0x108b72e3 in privacy_mimeinfo_is_signed (
    mimeinfo=mimeinfo@entry=0x128b5ab0) at privacy.c:144
#2  0x107faf2e in msginfo_set_mime_flags (node=0x126c0a20, data=0x12566fc0)
    at folder.c:2869
#3  0x4fca3065 in g_node_children_foreach () from /usr/lib/libglib-2.0.so.0
#4  0x10803203 in folder_item_fetch_msg (item=0x1208af90, num=130685)
    at folder.c:2909
#5  0x108c01a3 in procmsg_get_message_file_path (
    msginfo=msginfo@entry=0x12566fc0) at procmsg.c:412
#6  0x10849931 in messageview_show (messageview=messageview@entry=0x11fd8870, 
    msginfo=msginfo@entry=0x12566fc0, all_headers=all_headers@entry=0)
    at messageview.c:1322
#7  0x108dd315 in summary_display_msg_full (
    summaryview=summaryview@entry=0x11f9ad40, row=0x126eac30, 
    new_window=new_window@entry=0, all_headers=all_headers@entry=0)
    at summaryview.c:3609
#8  0x108dd505 in summary_display_msg (
    summaryview=summaryview@entry=0x11f9ad40, row=<optimized out>)
    at summaryview.c:3421
#9  0x108e50fe in summary_key_pressed (widget=0x11e254c8, event=0x120dd820, 
    summaryview=0x11f9ad40) at summaryview.c:6741
#10 0x501baae0 in ?? () from /usr/lib/libgtk-x11-2.0.so.0

(gdb) p data
$2 = (PrivacyDataPGP *) 0x0

Suggested patch:
--- src/plugins/pgpinline/pgpinline.c.orig
+++ src/plugins/pgpinline/pgpinline.c
@@ -137,8 +137,10 @@
 		data = pgpinline_new_privacydata();
 		mimeinfo->privacy = (PrivacyData *) data;
 	}
-	data->done_sigtest = TRUE;
-	data->is_signed = TRUE;
+	if (data != NULL) {
+		data->done_sigtest = TRUE;
+		data->is_signed = TRUE;
+	}
 
 	return TRUE;
 }
Comment 1 Timo Teräs 2014-04-11 08:16:40 UTC
Same bug seems to be in pgpgmime plugin.
Comment 2 users 2014-04-13 11:29:03 UTC
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:
http://git.claws-mail.org/

++ ChangeLog	2014-04-13 11:29:03.487553513 +0200
http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=f0ba39a7ecb81911fcb1d51bee75ca58e8fdf616
Merge: ef42e8c 308f993
Author: Colin Leroy <colin@colino.net>
Date:   Sun Apr 13 11:29:02 2014 +0200

    Merge branch 'master' of file:///home/git/claws

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=308f9937247ca6ca0dc2ef554080705976a93a95
Author: Ricardo Mones <ricardo@mones.org>
Date:   Sat Apr 12 14:14:09 2014 +0200

    Fix bug #3138 “pgpinline crashes on signature check if gppme fails to init”

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=864fd8e5fe8be79f565c9234ceb1ac3d43054309
Author: Ricardo Mones <ricardo@mones.org>
Date:   Sat Apr 12 13:25:18 2014 +0200

    Fix bug #3094 “OK or Yes to create new directory?”

Note You need to log in before you can comment on or make changes to this bug.