[Kmymoney-devel] [kmymoney4] [Bug 327535] New: Crash in CSV Importer.

allan agander93 at gmail.com
Tue Nov 12 23:44:36 UTC 2013


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

            Bug ID: 327535
           Summary: Crash in CSV Importer.
    Classification: Unclassified
           Product: kmymoney4
           Version: git master
          Platform: Mint (Ubuntu based)
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kmymoney-devel at kde.org
          Reporter: agander93 at gmail.com

This does not affect the stable releases.
If a file with say three columns, that  is with just a single 'Amount column',
is loaded after a file with Debit and Credit columns was previously loaded,
then during the process of column selection, when the Amount radio button is
clicked, KMyMoney crashes.

Reproducible: Always

Steps to Reproduce:
1. Import a file which has debit and credit columns.
2. Exit the plugin so that the settings are saved.
3. Load a file which has just the single Amount column.
4. The Amount column radio should be showing as deselected and the Debit/credit
columns radio should be showing as selected.
5. Click the Amount radio button.
6. KMM crashes.
Actual Results:  
as above.

Expected Results:  
KMM should not crash.

When the Amount column radio is clicked, the routine
CSVDialog::amountRadioClicked() is entered.  The m_debitColumn and
m_creditColumn integers are set to -1, that is set to invalid.  However, before
this action, a check is made - "the 'm_creditColumn and m_debitColumn' could
just have been reassigned, so ensure they == "credit or debit" before clearing
them".
so, before the current settings are cleared, they are actually used for this
check.
Unfortunately, it is likely that one or both of them points to a now
non-existent column, causing the m_columnTypeList QStringList[] to go out of
bounds, resulting in the crash.
The use of  a QStringList[] for this check needs to be changed to an indexOf()
operation.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the KMyMoney-devel mailing list