From 74365936aca7b5f4158fdd22d22bccf8c0536e61 Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Sun, 24 Jun 2007 08:20:07 +0000 Subject: [PATCH] Check ofx structure for sanity. Partly fixes #450276. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16209 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/import-export/ofx/gnc-ofx-import.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/import-export/ofx/gnc-ofx-import.c b/src/import-export/ofx/gnc-ofx-import.c index 94d82b7a76..1b7754d14e 100644 --- a/src/import-export/ofx/gnc-ofx-import.c +++ b/src/import-export/ofx/gnc-ofx-import.c @@ -336,7 +336,10 @@ int ofx_proc_transaction_cb(struct OfxTransactionData data, void * transaction_u xaccSplitSetMemo(split, data.memo); } } - else if(data.unique_id_valid==true&&data.security_data_ptr->secname_valid==true) + else if(data.unique_id_valid == true + && data.security_data_valid + && data.security_data_ptr != NULL + && data.security_data_ptr->secname_valid == true) { /************************ Process an investment transaction ******************************/ /* Note that the ACCT_TYPE_STOCK account type should be replaced with something