Bug 310794

Summary: CSV Plugin- Crash if memoColumn value in a saved profile does not match the file to be imported.
Product: [Applications] kmymoney Reporter: allan <agander93>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: git (master)   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description allan 2012-11-28 00:27:15 UTC
A bank may change the format of its statement file.  If a file which is being loaded has fewer columns than the file whose values were saved in the profile, and if the saved memocolumn value is out of bounds for the present file, the plugin will crash.
Other column settings are loaded into their comboboxes, and out of bounds values are not accepted.  As the memocolumn can have more than one value, the profile values are loaded into a QStringList();

Reproducible: Always

Steps to Reproduce:
1. Load a CSV file using a profile which was produced by a newer statement format with more columns.
2. If the memocolumn in the profile is set to capture the account balance, which tends to be the last column, that column value may not be present in an earlier version of the statement for the same account.
3. Attempt to load that file via the CSV plugin.
Actual Results:  
Crash.

Expected Results:  
No crash.  Out of bounds settings should not be accepted.
Comment 1 allan 2012-12-04 20:59:59 UTC
Git commit 4bd568a458b8909d501177771a4a5094c86455cc by Allan Anderson.
Committed on 04/12/2012 at 21:52.
Pushed by allananderson into branch 'master'.
the file to be imported.

M  +4    -2    kmymoney/plugins/csvimport/csvdialog.cpp

http://commits.kde.org/kmymoney/4bd568a458b8909d501177771a4a5094c86455cc