[kmymoney4] [Bug 372254] Crash when importing CSV file
allan
bugzilla_noreply at kde.org
Thu Nov 10 13:25:17 UTC 2016
https://bugs.kde.org/show_bug.cgi?id=372254
--- Comment #2 from allan <agander93 at gmail.com> ---
I think I can see what has happened.
I have created a profile for one of my banks, but I have more than one account
there. The checking account has one column for the Amount, whereas the savings
account has columns for both credits and debits. The latter therefore has more
columns, and the column numbers from this account were saved in the resource
file.
If now a checking account is loaded, the saved column details will include more
columns than in the checking file. Therefore, the result is that an attempt is
made to access a nonexistent column, and an out-of-bounds index is generated.
This happens circa line 576-578 in bankingwizardpage.cpp -
if (!memo.isEmpty())
memo.append(QChar(QLatin1Char('\n')));
memo.append(m_columnList[m_wiz->m_memoColList[i]]);
I have inserted
if (m_wiz->m_memoColList[i] < m_columnList.count()) // avoid out of bounds
before the last line to avoid it going out of bounds.
This avoids the problem, but an additional profile will be needed to cover the
different formats. Has anyone else a more elegant solution?
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the KMyMoney-devel
mailing list