[goffice] Fix hang when writing date with invalid format. [#587171]



commit 8594307dc84595f19aa75dbf3a0efbea9d842505
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Sun Jun 28 12:42:26 2009 -0600

    Fix hang when writing date with invalid format. [#587171]
    
    2009-06-28  Andreas J. Guelzow  <aguelzow pyrshep ca>
    
    	* goffice/utils/go-format.c (go_format_output_date_to_odf): when we
    	  encounter a error in tokenizing, skip forward

 ChangeLog                 |    5 +++++
 NEWS                      |    1 +
 goffice/utils/go-format.c |    2 ++
 3 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d162908..9317a42 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-28  Andreas J. Guelzow  <aguelzow pyrshep ca>
+
+	* goffice/utils/go-format.c (go_format_output_date_to_odf): when we
+	  encounter a error in tokenizing, skip forward
+	
 2009-06-25  Andreas J. Guelzow  <aguelzow pyrshep ca>
 
 	* goffice/utils/go-string.h (go_string_get_cstr): deleted
diff --git a/NEWS b/NEWS
index 6f1a361..2e36b8f 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ goffice 0.7.9:
 Andreas:
 	* Improve number style output to ODF. [#586564]
 	* Improve currency output to ODF.
+	* Fix hang when writing date with invalid format. [#587171]
 
 Jean:
 	* Align surface ticks with grid. [#585298]
diff --git a/goffice/utils/go-format.c b/goffice/utils/go-format.c
index 603cdf0..c2b410c 100644
--- a/goffice/utils/go-format.c
+++ b/goffice/utils/go-format.c
@@ -5899,7 +5899,9 @@ go_format_output_date_to_odf (GsfXMLOut *xout, GOFormat const *fmt,
 		case TOK_REPEATED_CHAR:
 		case TOK_CONDITION:
 		case TOK_LOCALE:
+			break;
 		case TOK_ERROR:
+			xl++;
 			break;
 
 		default:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]