[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kspread/functions
From: Sebastian Sauer <mail () dipe ! org>
Date: 2010-02-05 14:03:52
Message-ID: 1265378632.748163.9625.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1085595 by sebsauer:
Fix crash caused by a rows<0 that tehn was used to calculate count which went \
negative cause of it which then was used to allocate a negative number of Condition \
instances what leads to the crash. Fix that by making sure we abort parsing for \
invalid values that have zero number of rows.
M +5 -0 database.cpp
--- trunk/koffice/kspread/functions/database.cpp #1085594:1085595
@@ -188,6 +188,11 @@
rows = conds.rows() - 1;
cols = db.columns();
int count = rows * cols;
+
+ // if rows or cols is zero or negative, then we don't need to parse anything
+ if(count <= 0)
+ return;
+
cond = new Condition* [count];
for (int r = 0; r < count; ++r)
cond[r] = 0;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic