gnumeric r16392 - in branches/gnumeric-1-8: . plugins/lotus-123



Author: mortenw
Date: Wed Feb 20 14:10:33 2008
New Revision: 16392
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16392&view=rev

Log:
2008-02-20  Morten Welinder  <terra gnome org>

	* lotus.c (lotus_read_new): Handle stray rldb records.  Fixes
	#517591.



Modified:
   branches/gnumeric-1-8/NEWS
   branches/gnumeric-1-8/plugins/lotus-123/ChangeLog
   branches/gnumeric-1-8/plugins/lotus-123/lotus.c

Modified: branches/gnumeric-1-8/NEWS
==============================================================================
--- branches/gnumeric-1-8/NEWS	(original)
+++ branches/gnumeric-1-8/NEWS	Wed Feb 20 14:10:33 2008
@@ -21,7 +21,7 @@
 	* Work around Qt theme bug.  [#512752]
 	* Fix paste-as-text bug.  [#514438]
 	* Fix corrupted-mps-bug.  [#517141]
-	* Fix corrupted-qpro-bugs.  [#517144] [#517376]
+	* Fix corrupted-qpro-bugs.  [#517144] [#517376] [#517591]
 	* Make <control>KP_Subtract work as <control>minus.  [#516358]
 	* Make <control>KP_Add work as <control>plus.
 

Modified: branches/gnumeric-1-8/plugins/lotus-123/lotus.c
==============================================================================
--- branches/gnumeric-1-8/plugins/lotus-123/lotus.c	(original)
+++ branches/gnumeric-1-8/plugins/lotus-123/lotus.c	Wed Feb 20 14:10:33 2008
@@ -2176,18 +2176,35 @@
 		}
 
 		case LOTUS_RLDB_DATANODE: /* No length check needed.  */ {
+			if (!rldb) {
+				g_warning ("Ignoring stray RLDB_DATANODE");
+				break;
+			}
+
 			lotus_rldb_data (rldb, r->data, r->len);
 			break;
 		}
 
 		case LOTUS_RLDB_REGISTERID: CHECK_RECORD_SIZE (== 2) {
 			guint16 id = GSF_LE_GET_GUINT16 (r->data);
+
+			if (!rldb) {
+				g_warning ("Ignoring stray RLDB_REGISTERID");
+				break;
+			}
+
 			lotus_rldb_register_id (rldb, id);
 			break;
 		}
 
 		case LOTUS_RLDB_USEREGISTEREDID: CHECK_RECORD_SIZE (== 2) {
 			guint16 id = GSF_LE_GET_GUINT16 (r->data);
+
+			if (!rldb) {
+				g_warning ("Ignoring stray RLDB_USEID");
+				break;
+			}
+
 			lotus_rldb_use_id (rldb, id);
 			break;
 		}



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