Bug 296977

Summary: CSV Plugin causes KMM crash if header row/s have fewer columns than body.
Product: [Applications] kmymoney Reporter: allan <agander93>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: git (master)   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description allan 2012-03-28 16:56:08 UTC
User-Agent:       Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Build Identifier: 

When importing a csv file, on changing from one file to another, an incorrect starting row number was selected.  The validity check therefore tested the header rows, which had fewer columns than the body text.  The table item accessed did not exist, resulting in a crash.

Reproducible: Always

Steps to Reproduce:
1. Import a csv file with a header row with just a few columns.
2. Select a numeric (e.g. amount) column beyond its columns.
3. Proceed with import.
Actual Results:  
Crash.

Expected Results:  
Non-existent cells should not be accessed.
Comment 1 allan 2012-03-29 10:04:22 UTC
Git commit 6d4dc68ef9efed1f1447910193d172c67d5f8f08 by Allan Anderson.
Committed on 29/03/2012 at 11:56.
Pushed by allananderson into branch 'master'.
than body.

Fix row number sometimes incorrect in validity check message.

M  +7    -1    kmymoney/plugins/csvimport/csvdialog.cpp

http://commits.kde.org/kmymoney/6d4dc68ef9efed1f1447910193d172c67d5f8f08