[gnumeric] xml: fix problem with circular names
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] xml: fix problem with circular names
- Date: Tue, 16 Jun 2015 17:55:05 +0000 (UTC)
commit 0122da3bd22a936ec6ecd4afb6a536f3961c33b0
Author: Morten Welinder <terra gnome org>
Date: Tue Jun 16 13:54:42 2015 -0400
xml: fix problem with circular names
ChangeLog | 5 +++++
NEWS | 1 +
src/xml-sax-read.c | 11 ++++++++---
3 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 09906c3..c608b98 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-06-16 Morten Welinder <terra gnome org>
+
+ * src/xml-sax-read.c (handle_delayed_names): Check for circularity
+ in names. Fixes #751056.
+
2015-05-27 Morten Welinder <terra gnome org>
* src/print.c (compute_scale_fit_to): Attempt a workaround for fp
diff --git a/NEWS b/NEWS
index 755a3fc..d3d90bf 100644
--- a/NEWS
+++ b/NEWS
@@ -28,6 +28,7 @@ Morten:
* Make compilation with clang work again. [#749138]
* Fix xlsx problem with import of header/footer. [#750853]
* Fix xls save problem with characters outside codepage. [#750856]
+ * Fix named expression problem. [#751056]
--------------------------------------------------------------------------
Gnumeric 1.12.22
diff --git a/src/xml-sax-read.c b/src/xml-sax-read.c
index ed4d0a4..b042870 100644
--- a/src/xml-sax-read.c
+++ b/src/xml-sax-read.c
@@ -2932,11 +2932,16 @@ handle_delayed_names (XMLSaxParseState *state)
GNM_EXPR_PARSE_DEFAULT,
state->convs,
&perr);
- if (texpr) {
+ if (!texpr) {
+ go_io_warning (state->context, "%s", perr.err->message);
+ } else if (expr_name_check_for_loop (expr_name_name (nexpr), texpr)) {
+ g_printerr ("Ignoring would-be circular definition of %s\n",
+ expr_name_name (nexpr));
+ gnm_expr_top_unref (texpr);
+ } else {
nexpr->pos.eval = pp.eval;
expr_name_set_expr (nexpr, texpr);
- } else
- go_io_warning (state->context, "%s", perr.err->message);
+ }
parse_error_free (&perr);
g_free (expr_str);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]