[goffice] matrix inversion: fix crash.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] matrix inversion: fix crash.
- Date: Mon, 3 May 2010 13:47:28 +0000 (UTC)
commit 32dfbbd2c0a582065e753d07fc0ba54a35812e30
Author: Morten Welinder <terra gnome org>
Date: Mon May 3 09:47:08 2010 -0400
matrix inversion: fix crash.
ChangeLog | 4 ++++
NEWS | 1 +
goffice/math/go-regression.c | 3 +++
3 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6b0c848..6597160 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-05-03 Morten Welinder <terra gnome org>
+
+ * goffice/math/go-regression.c (LUPDecomp): Handle nan entries.
+
2010-05-01 Jean Brefort <jean brefort normalesup org>
* goffice/canvas/goc-graph.c (goc_graph_do_tooltip): use markup for tips.
diff --git a/NEWS b/NEWS
index 1c0858e..db104a9 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ Jean:
Morten:
* Fix week numbers issue.
+ * Fix matrix inversion crash. [Part of #617469]
--------------------------------------------------------------------------
goffice 0.8.2:
diff --git a/goffice/math/go-regression.c b/goffice/math/go-regression.c
index 538f78c..c6c56b1 100644
--- a/goffice/math/go-regression.c
+++ b/goffice/math/go-regression.c
@@ -219,6 +219,9 @@ SUFFIX(LUPDecomp) (DOUBLE **A, DOUBLE **LU, int *P, int n, DOUBLE *b_scaled,
if (max < lowest)
lowest = max;
+ if (mov == -1)
+ return GO_REG_invalid_data;
+
if (i != mov) {
/*swap the two rows */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]