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 711493 - Gnucash crash if cancel the dialog of income account when import ofx file
Gnucash crash if cancel the dialog of income account when import ofx file
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Import - OFX
2.5.x
Other All
: Normal normal
: ---
Assigned To: gnucash-import-maint
gnucash-import-maint
Depends on:
Blocks:
 
 
Reported: 2013-11-05 15:25 UTC by Kuang-che Wu
Modified: 2018-06-29 23:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kuang-che Wu 2013-11-05 15:25:33 UTC
When first time import ofx file, gnucash will ask users the associated stock account and associated income account.
If users cancel the dialog of associated income account, gnucash crashes.

The relevant code in gnc-ofx-import.c, line 692:
                        income_account = gnc_import_select_account(
                                             gnc_gen_trans_list_widget(gnc_ofx_importer_gui),
                                             NULL,
                                             1,
                                             investment_account_text,
                                             currency,
                                             ACCT_TYPE_INCOME,
                                             NULL,
                                             NULL);
                        gnc_ofx_kvp_set_assoc_account(investment_account,
                                                      income_account);

If user canceled, "income_account" is NULL.
Then gnc_ofx_kvp_set_assoc_account() will crash because it tries to access the account pointer, which is NULL.
Comment 1 Christian Stimming 2013-11-05 21:44:57 UTC
Oops. Thanks for spotting this error. Fixed in r23383, which will appear in 2.5.8 and later.
Comment 2 John Ralls 2018-06-29 23:21:03 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=711493. Please update any external references or bookmarks.