r23596 - gnucash/trunk/src/backend/xml - Load old version 1 XML files without crashing.

Mike Alexander mta at code.gnucash.org
Sun Dec 22 17:13:37 EST 2013


Author: mta
Date: 2013-12-22 17:13:36 -0500 (Sun, 22 Dec 2013)
New Revision: 23596
Trac: http://svn.gnucash.org/trac/changeset/23596

Modified:
   gnucash/trunk/src/backend/xml/io-gncxml-v1.c
   gnucash/trunk/src/backend/xml/sixtp-utils.c
Log:
Load old version 1 XML files without crashing.

Modified: gnucash/trunk/src/backend/xml/io-gncxml-v1.c
===================================================================
--- gnucash/trunk/src/backend/xml/io-gncxml-v1.c	2013-12-22 16:48:58 UTC (rev 23595)
+++ gnucash/trunk/src/backend/xml/io-gncxml-v1.c	2013-12-22 22:13:36 UTC (rev 23596)
@@ -758,7 +758,7 @@
                              SIXTP_NO_MORE_HANDLERS),
                TRUE,
                "hex", hex_binary_kvp_value_parser_new(),
-               0);
+               NULL, NULL);
 }
 
 /*********************************/
@@ -1083,7 +1083,7 @@
     if (!(sixtp_add_some_sub_parsers(
                 top_level, TRUE,
                 "s", kvp_frame_slot_parser_new(top_level),
-                0)))
+                NULL, NULL)))
     {
         return NULL;
     }
@@ -1246,7 +1246,7 @@
                 "pricedb", gnc_pricedb_parser_new(),
                 "account", gnc_account_parser_new(),
                 "transaction", gnc_transaction_parser_new(),
-                0))
+                NULL, NULL))
     {
         return NULL;
     }
@@ -1795,9 +1795,9 @@
                 "parent", sixtp_add_some_sub_parsers(
                     parent_lookup_parser_new(), TRUE,
                     "guid", generic_guid_parser_new(),
-                    0),
+                    NULL, NULL),
                 "slots", kvp_frame_parser_new(),
-                0))
+                NULL, NULL))
     {
         sixtp_destroy(ret);
         return NULL;
@@ -2012,7 +2012,7 @@
                 "name", simple_chars_only_parser_new(NULL),
                 "xcode", simple_chars_only_parser_new(NULL),
                 "fraction", simple_chars_only_parser_new(NULL),
-                0))
+                NULL, NULL))
     {
         return NULL;
     }
@@ -2173,7 +2173,7 @@
                 top_level, TRUE,
                 "space", simple_chars_only_parser_new(NULL),
                 "id", simple_chars_only_parser_new(NULL),
-                0))
+                NULL, NULL))
     {
         return NULL;
     }
@@ -2964,7 +2964,7 @@
                 "quantity", generic_gnc_numeric_parser_new(),
                 "value", generic_gnc_numeric_parser_new(),
                 "slots", kvp_frame_parser_new(),
-                0))
+                NULL, NULL))
     {
         return NULL;
     }
@@ -3019,7 +3019,7 @@
                 generic_timespec_parser_new(txn_rest_date_entered_end_handler),
                 "slots", kvp_frame_parser_new(),
                 "split", gnc_txn_restore_split_parser_new(),
-                0)))
+                NULL, NULL)))
     {
         sixtp_destroy(top_level);
         return NULL;

Modified: gnucash/trunk/src/backend/xml/sixtp-utils.c
===================================================================
--- gnucash/trunk/src/backend/xml/sixtp-utils.c	2013-12-22 16:48:58 UTC (rev 23595)
+++ gnucash/trunk/src/backend/xml/sixtp-utils.c	2013-12-22 22:13:36 UTC (rev 23596)
@@ -603,7 +603,7 @@
                 top_level, TRUE,
                 "s", timespec_sixtp_new(generic_timespec_secs_end_handler),
                 "ns", timespec_sixtp_new(generic_timespec_nsecs_end_handler),
-                0))
+                NULL, NULL))
     {
         return NULL;
     }



More information about the gnucash-changes mailing list