GNOME Bugzilla – Bug 711493
Gnucash crash if cancel the dialog of income account when import ofx file
Last modified: 2018-06-29 23:21:03 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.
Oops. Thanks for spotting this error. Fixed in r23383, which will appear in 2.5.8 and later.
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.