Bug 3365 - segfault in src/wizard.c
Summary: segfault in src/wizard.c
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: UI (show other bugs)
Version: 3.11.1
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2015-01-14 16:07 UTC by Michael Schwendt
Modified: 2015-01-15 23:17 UTC (History)
0 users

See Also:


Attachments
Fix proposal (1.15 KB, patch)
2015-01-14 16:40 UTC, Ricardo Mones
no flags Details | Diff

Description Michael Schwendt 2015-01-14 16:07:18 UTC
http://git.claws-mail.org/?p=claws.git;a=blob;f=src/wizard.c;h=717bb9fd0581adc47e3232c5e78dcceef8ba5867;hb=HEAD#l1371

1371         if (strchr(address, '@') == NULL) {
1372                 g_free(address);
1373                 gtk_label_set_text(GTK_LABEL(wizard->auto_configure_lbl),
1374                            _("Failed (wrong address)"));
1375         }
1376         domain = strchr(address, '@') + 1;

1388                         recv_data->domain = g_strdup(domain);

The error-handling for the case "no @ found in address" frees the address ptr, but accesses it in lines 1376 and 1388 again. domain ptr becomes 0x1 causing a crash.

https://bugzilla.redhat.com/1123895
Comment 1 Ricardo Mones 2015-01-14 16:40:48 UTC
Created attachment 1471 [details]
Fix proposal

Analogous fix(es) from 3364 for the wizard.c
Comment 2 users 2015-01-14 16:50:04 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	2015-01-14 16:50:02.435589581 +0100
http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=00729e26d5d3e849874f45a59ddd578a43860b62
Merge: 0a0b2b2 c0810db
Author: Colin Leroy <colin@colino.net>
Date:   Wed Jan 14 16:50:01 2015 +0100

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

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=c0810db8bfb77999ceae738e88c7ff11352bb366
Author: Colin Leroy <colin@colino.net>
Date:   Wed Jan 14 16:46:21 2015 +0100

    Fix bug #3364, segfault in src/wizard.c: add missing return
    Fix bug #3365, segfault in src/prefs_account.c: add missing return

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