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 528306 - OFX import crashes gnucash: bug in libofx-0.9.0
OFX import crashes gnucash: bug in libofx-0.9.0
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Import - OFX
2.2.x
Other All
: Normal critical
: ---
Assigned To: Benoit Grégoire
Benoit Grégoire
Depends on:
Blocks:
 
 
Reported: 2008-04-15 20:53 UTC by olivier D
Modified: 2018-06-29 22:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for libofx-0.9.0 to fix this crash (877 bytes, patch)
2008-12-02 10:32 UTC, Christian Stimming
committed Details | Review

Description olivier D 2008-04-15 20:53:10 UTC
Steps to reproduce:
1. Import the OFX file in attachment (see stack trace)
2. 
3. 


Stack trace:

1. The trace in /var/log/message is  
Apr 15 22:39:40 olive kernel: gnucash-bin[4962]: segfault at 00000000 eip b6089813 esp bfd6c6a0 error 4

2. uname -r is 2.6.24-1-486 (debian testing)

 
3.The file to import is bellow, generated by a bank site:

OFXHEADER:100
DATA:OFXSGML
VERSION:102
SECURITY:NONE
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:NONE
<OFX><SIGNONMSGSRSV1><SONRS><STATUS><CODE>0<SEVERITY>INFO</STATUS><DTSERVER>20080415222905<LANGUAGE>FRE</SONRS></SIGNONMSGSRSV1><BANKMSGSRSV1><STMTTRNRS><TRNUID>120829134XXX<STATUS><CODE>0<SEVERITY>INFO</STATUS><CLTCOOKIE>1208291345XXX<STMTRS><CURDEF>EUR<BANKACCTFROM><BANKID>20XXX<BRANCHID>00XXX<ACCTID>5239XXXXXXX<ACCTTYPE>CHECKING<ACCTKEY>XX</BANKACCTFROM><BANKTRANLIST><DTSTART>20080318<DTEND>20080415<STMTTRN><TRNTYPE>DIRECTDEP<DTPOSTED>20080414<TRNAMT>300.00<FITID>P$92L8LLGM<NAME>VIREMENT DE MR name OLIVIER</STMTTRN><STMTTRN><TRNTYPE>PAYMENT<DTPOSTED>20080414<TRNAMT>-33.00<FITID>P$92L8LCOO<NAME>PRELEVEMENT DE PRELEVEMENT SFR</STMTTRN><STMTTRN><TRNTYPE>CHECK<DTPOSTED>20080414<TRNAMT>-60.00<FITID>P$92L8CQB3<CHECKNUM>6763020<NAME>CHEQUE N°6763020</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080414<TRNAMT>-340.00<FITID>P$92L8LLE_<NAME>ACHAT CB ARGENT D ANTAN 13.04.08</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080414<TRNAMT>-41.40<FITID>P$92L8LC8O<NAME>ACHAT CB NEW NIRVANA    12.04.08</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080414<TRNAMT>-36.20<FITID>P$92L8LCEO<NAME>ACHAT CB ATAC MAG CHATI 13.04.08</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080414<TRNAMT>-20.00<FITID>P$92L8LLEF<NAME>ACHAT CB CAVES ST GILLE 12.04.08</STMTTRN><STMTTRN><TRNTYPE>ATM<DTPOSTED>20080414<TRNAMT>-80.00<FITID>P$92L8LLL2<NAME>CARTE PREMIER  12/04/08 A 16H23</STMTTRN><STMTTRN><TRNTYPE>DIRECTDEP<DTPOSTED>20080414<TRNAMT>200.00<FITID>P$92L8LLCK<NAME>BANQUE EN LIGNE</STMTTRN><STMTTRN><TRNTYPE>DIRECTDEP<DTPOSTED>20080411<TRNAMT>39.09<FITID>P$924PLT%O<NAME>VIREMENT DE CPAM DES HAUTS DE SE</STMTTRN><STMTTRN><TRNTYPE>DIRECTDEP<DTPOSTED>20080410<TRNAMT>145.00<FITID>P$921PLCOJ<NAME>VIREMENT DE MME name name ANNE-</STMTTRN><STMTTRN><TRNTYPE>PAYMENT<DTPOSTED>20080410<TRNAMT>-29.99<FITID>P$921PL5YF<NAME>PRELEVEMENT DE Free Telecom</STMTTRN><STMTTRN><TRNTYPE>CHECK<DTPOSTED>20080410<TRNAMT>-5.00<FITID>P$921PMQB3<CHECKNUM>6763018<NAME>CHEQUE N°6763018</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080410<TRNAMT>-145.00<FITID>P$921PLWOJ<NAME>ACHAT CB ARGENT D ANTAN 09.04.08</STMTTRN><STMTTRN><TRNTYPE>ATM<DTPOSTED>20080408<TRNAMT>-60.00<FITID>P$92YPLLG9<NAME>CARTE MASTERCA 07/04/08 A 14H05</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080407<TRNAMT>-90.00<FITID>P$92NPLL32<NAME>ACHAT CB OPERA DE PARIS 06.04.08</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080407<TRNAMT>-65.83<FITID>P$92NPL8SS<NAME>ACHAT CB ATAC MAG CHATI 04.04.08</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080407<TRNAMT>-44.20<FITID>P$92NPLCGO<NAME>ACHAT CB RESTAURANT AKA 05.04.08</STMTTRN><STMTTRN><TRNTYPE>CHECK<DTPOSTED>20080404<TRNAMT>-195.00<FITID>P$92GP%QB3<CHECKNUM>6763017<NAME>CHEQUE N°6763017</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080403<TRNAMT>-18.10<FITID>P$92TPLE2F<NAME>ACHAT CB TY BREIZ       02.04.08</STMTTRN><STMTTRN><TRNTYPE>CHECK<DTPOSTED>20080402<TRNAMT>-890.03<FITID>P$920PVQB3<CHECKNUM>6763016<NAME>CHEQUE N°6763016</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080402<TRNAMT>-88.00<FITID>P$920PLLC2<NAME>ACHAT CB SNCF INTERNET  01.04.08</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080402<TRNAMT>-85.00<FITID>P$920PLCK2<NAME>ACHAT CB SNCF           01.04.08</STMTTRN><STMTTRN><TRNTYPE>DEBIT<DTPOSTED>20080402<TRNAMT>-20.40<FITID>P$920PL5EF<NAME>COTISATION TRIMESTRIELLE</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080401<TRNAMT>-8.20<FITID>P$92HPLLWC<NAME>ACHAT CB MES L13 ADUP   31.03.08</STMTTRN><STMTTRN><TRNTYPE>DIRECTDEP<DTPOSTED>20080331<TRNAMT>900.00<FITID>P$92BPLEVF<NAME>VIREMENT DE MR name OLIVIER</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080331<TRNAMT>-87.60<FITID>P$92BPLLW2<NAME>ACHAT CB MES L13 AS     30.03.08</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080331<TRNAMT>-14.00<FITID>P$92BPLLLQ<NAME>ACHAT CB BLEUBUOI       28.03.08</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080328<TRNAMT>-20.50<FITID>P$92ZPLE7F<NAME>ACHAT CB TY BREIZ       27.03.08</STMTTRN><STMTTRN><TRNTYPE>DIRECTDEP<DTPOSTED>20080325<TRNAMT>700.00<FITID>P$92_PLG9F<NAME>VIREMENT DE MME name name ANNE-</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080325<TRNAMT>-17.50<FITID>P$92_PLT9F<NAME>ACHAT CB VANILLE        22.03.08</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080321<TRNAMT>-203.40<FITID>P$92%PLC0K<NAME>ACHAT CB SNCF INTERNET  20.03.08</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080321<TRNAMT>-64.75<FITID>P$92%PLQFS<NAME>ACHAT CB PHARM HOMEO CE 20.03.08</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080320<TRNAMT>-40.00<FITID>P$92VPLLCO<NAME>ACHAT CB ARPEGE7860AXE  19.03.08</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080318<TRNAMT>-20.00<FITID>P$926PLLEF<NAME>ACHAT CB REST CHARLIE B 17.03.08</STMTTRN><STMTTRN><TRNTYPE>POS<DTPOSTED>20080318<TRNAMT>-14.10<FITID>P$926PLLEQ<NAME>ACHAT CB GAL.LAFAYETTE  15.03.08</STMTTRN><STMTTRN><TRNTYPE>ATM<DTPOSTED>20080318<TRNAMT>-60.00<FITID>P$926PLLG9<NAME>CARTE MASTERCA 17/03/08 A 10H20</STMTTRN></BANKTRANLIST><LEDGERBAL><BALAMT>310.37<DTASOF>20080414</LEDGERBAL><AVAILBAL><BALAMT>310.37<DTASOF>20080414</AVAILBAL></STMTRS></STMTTRNRS></BANKMSGSRSV1></OFX>

Other information:
Plase help me resolving/ find a workaround for this bug, even if the bank file is not well formed, since I use Gnucash for now 2 years and have plenty of data.

NOTE that the import file could contains CONFIDENTIAL data. I replaced it with XXX. But do not share it.

Thx olivier
Comment 1 Jérôme Vouillon 2008-08-03 20:33:30 UTC
This is a bug in libofx 0.9.0, which is triggered by OFX files containing non-ascii characters and very long lines (when transcoding the file to UTF-8, the iconv output buffer is too small and the error is not properly caught).

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=493597 for a patch.
Comment 2 Christian Stimming 2008-12-02 10:32:48 UTC
Created attachment 123786 [details] [review]
Patch for libofx-0.9.0 to fix this crash

Should be committed to libofx and a new libofx needs to be made.
Comment 3 Christian Stimming 2008-12-02 10:33:24 UTC
Forgot to mention: The patch in comment 2 is the one from Jerome from the debian bugreport.
Comment 4 Christian Stimming 2008-12-06 22:29:24 UTC
Fixed in libofx CVS. Now only the libofx admins should make a 0.9.1 release.
Comment 5 Christian Stimming 2009-02-09 20:33:27 UTC
libofx-0.9.1 has been released.
Comment 6 John Ralls 2018-06-29 22:03:34 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=528306. Please update any external references or bookmarks.