[Kmymoney-devel] Review Request: Crash in CSVPlugin, with invalid column selection

Allan Anderson agander93 at gmail.com
Fri Jan 21 12:57:29 CET 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/6394/
-----------------------------------------------------------

Review request for kmymoney.


Summary
-------

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. 


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


Diffs
-----

  /trunk/extragear/office/kmymoney/kmymoney/plugins/csvimport/csvprocessing.cpp 1216094 

Diff: http://svn.reviewboard.kde.org/r/6394/diff


Testing
-------

Tested with files that produce the necessary conditions.


Thanks,

Allan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kmymoney-devel/attachments/20110121/aea82fa9/attachment.htm 


More information about the KMyMoney-devel mailing list