[Kmymoney-devel] [Bug 263861] New: Crash in CSVPlugin, with invalid column selection

allan agander93 at gmail.com
Fri Jan 21 12:58:12 CET 2011


https://bugs.kde.org/show_bug.cgi?id=263861

           Summary: Crash in CSVPlugin, with invalid column selection
           Product: kmymoney4
           Version: SVN trunk
          Platform: openSUSE RPMs
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: crash
          Priority: NOR
         Component: general
        AssignedTo: kmymoney-devel at kde.org
        ReportedBy: agander93 at gmail.com


Version:           SVN trunk (using KDE 4.5.85) 
OS:                Linux

When the plugin loads, it displays the column numbers saved from the last file.
If the user imports the new file without noticing that those saved selections
are not valid for his file, a crash may occur because of an invalid index.

When the plugin loads the values from the rc file, the values are checked to be
in range (1 to MAXCOL value (14)), and the relevant fields are flagged as
present.  During import, these flags are checked to ensure the vital fields are
present, and the import proceeds.  Now, it might be found that the new file has
fewer columns than the previous file, and that one or more of the columns
flagged as being present, are not now present.  The scan of the columns was
using an incorrect range, potentially allowing a valid field type to be
detected in an invalid column, resulting in the crash.

The range for column checking has been corrected, and additional checks added
that the vital fields are present in the new file, and not just remembered from
the previous file. 

Reproducible: Always

Steps to Reproduce:
Load a file having several columns, then exit, so the column values are saved
to the rc file.  Then load another file having fewer columns, and import it
without selecting appropriate columns.  If the column numbers saved from the
first file are outside the scope of the new file, KMM will crash.

Actual Results:  
KMM will crash.

Expected Results:  
The users oversight should be detected, and the problem avoided.

A patch will be entered in Reviewboard.
(http://svn.reviewboard.kde.org/r/6394/)

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the KMyMoney-devel mailing list