From 82837dbf63616a9ead25500ebe5f140924ad4379 Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Sat, 2 Mar 2013 13:49:06 +0000 Subject: [PATCH] Minor bugfix: Guard against NULL pointer in sprintf argument. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22820 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/import-export/aqbanking/dialog-ab-trans.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/import-export/aqbanking/dialog-ab-trans.c b/src/import-export/aqbanking/dialog-ab-trans.c index 0750a18dce..3c1ab60eea 100644 --- a/src/import-export/aqbanking/dialog-ab-trans.c +++ b/src/import-export/aqbanking/dialog-ab-trans.c @@ -542,6 +542,8 @@ gnc_ab_trans_dialog_verify_values(GncABTransDialog *td) if (!localBIC || !localIBAN || (strlen(localBIC) == 0) || (strlen(localIBAN) == 0)) { + const char* localBankCode = AB_Transaction_GetLocalBankCode(td->ab_trans); + const char* localAccountCode = AB_Transaction_GetLocalAccountNumber(td->ab_trans); values_ok = FALSE; gnc_error_dialog(td->dialog, _("Your local bank account does not yet have the SEPA account information stored. " @@ -549,8 +551,8 @@ gnc_ab_trans_dialog_verify_values(GncABTransDialog *td) "which has not yet been implemented directly in gnucash. " "Please execute the command line program \"aqhbci-tool\" for your account, as follows: " "aqhbci-tool4 getaccsepa -b %s -a %s"), - AB_Transaction_GetLocalBankCode(td->ab_trans), - AB_Transaction_GetLocalAccountNumber(td->ab_trans)); + (localBankCode ? localBankCode : ""), + (localAccountCode ? localAccountCode : "")); } }