Package: gnucash
Version: 2.2.4-2
Severity: serious
Justification: Might cause data loss
Tags: fixed-upstream patch

Hi Thomas,

on the Gnucash development mailing list Martin Preuß [1]reported a
crash which might occur if you do not start AqBanking's setup wizard
from within the Online Banking Setup druid. If some data were changed or
entered prior to the crash those changes/data would be lost by this
crash (hence severity serious).

1.
http://www.nabble.com/Re%3A-ofxdirectconnect-in-aqbanking3-branch-p18553656.html

The fix has been announced here: [2] which made its way into upstream
SVN in changeset [3]17370, which has been released with Gnucash 2.2.6
recently. I've extracted the changeset and attached it to this mail as a
patch. You should be able to apply this patch on top of the unpackaged
(thus already patched) source package of gnucash 2.2.4-2 using the
command "patch -p0 < /path/to/aqb_druid_crash.patch".

2.
http://www.nabble.com/Re%3A-ofxdirectconnect-in-aqbanking3-branch-p18564507.html
3. http://svn.gnucash.org/trac/changeset/17370

It would be very helpful if this patch finds its way into the release of
Debian Lenny.

Regards
  Micha



Index: src/core-utils/gnc-glib-utils.c
===================================================================
--- src/core-utils/gnc-glib-utils.c	(Revision 17369)
+++ src/core-utils/gnc-glib-utils.c	(Revision 17370)
@@ -186,6 +186,8 @@
   gchar *end;
   gint len;
 
+  g_return_if_fail(str);
+
   if (gnc_utf8_validate(str, -1, (const gchar **)&end))
     return;
 
Index: src/import-export/aqbanking/druid-ab-initial.c
===================================================================
--- src/import-export/aqbanking/druid-ab-initial.c	(Revision 17369)
+++ src/import-export/aqbanking/druid-ab-initial.c	(Revision 17370)
@@ -474,11 +474,12 @@
 {
     gchar *bankname;
     gchar *result;
-    const char *bankcode;
+    const char *ab_bankname, *bankcode;
 
     g_return_val_if_fail(ab_acc, NULL);
 
-    bankname = gnc_utf8_strip_invalid_strdup(AB_Account_GetBankName(ab_acc));
+    ab_bankname = AB_Account_GetBankName(ab_acc);
+    bankname = ab_bankname ? gnc_utf8_strip_invalid_strdup(ab_bankname) : NULL;
     bankcode = AB_Account_GetBankCode(ab_acc);
 
     /* Translators: Strings are 1. Account code, 2. Bank name, 3. Bank code. */

Reply via email to